0
$\begingroup$

I'm trying to build an add-on that creates buttons in the viewport depending on the selected object/rig. I'm quite new to that and I'm not a dev but I really wished to be able to do it. I've just started the coding and already have my first headache. I'm creating a enumarator panel and wish that it appears in the viewport panel, the script runs but the enumarator isn't there. What am I doing wrong? enter image description here

Any advices in how to understand coding in Blender will be greatly appreciated! So far I'm watching tutorials (including scripting for artists) and looking for info in the api reference. Also, any advices on how to produce this custom button add-on (which sort of simulate the custom properties of an object data) will be appreciated! Cheers!

$\endgroup$
5
  • $\begingroup$ I'm not a Python user, but I don't know whether looking through the Templates > Python section in Blender's Text Editor menu helps at all? There seem to be quite a few UI examples there. $\endgroup$
    – John Eason
    Commented May 22, 2023 at 21:24
  • $\begingroup$ Also, look on YouTube. There are many creating Blender Python addon tutorials. $\endgroup$
    – curious_1
    Commented May 22, 2023 at 23:01
  • $\begingroup$ All right, I've been doing this. I just watched one and followed exactly, but with my own words. I'll update the image above. It doesn't execute because of the 'enum' prop. It says, 'p_type EnumProperty couldn't be registered' $\endgroup$
    – AAA Yerus
    Commented May 23, 2023 at 0:34
  • 2
    $\begingroup$ Enum Property items should be a enumerable of at least size 3 : (identifier, display_name, description). Description can be an empty string "". see docs.blender.org/api/current/… PropertyGroups don't support bl_idname, you can remove this line. You should unregister your classes in the reversed order from which you registered them, to avoid dependency clashes. (for cls in reversed(classes): $\endgroup$
    – Gorgious
    Commented May 23, 2023 at 8:56
  • $\begingroup$ Wow, was that it? Thanks very much! Is there a platform where I can present sort of 'work in progress' for people's appreciation? $\endgroup$
    – AAA Yerus
    Commented May 23, 2023 at 15:50

0

You must log in to answer this question.

Browse other questions tagged .