snappyhexmesh_gui icon indicating copy to clipboard operation
snappyhexmesh_gui copied to clipboard

Missing panel options in Blender 3.2.0

Open Ikkesett opened this issue 2 years ago • 2 comments

After upgrading to Blender 3.2.0 some of the panel options does not appear in the top panel. bilde Running on Ubuntu 20.04.4 LTS

Ikkesett avatar Jun 15 '22 16:06 Ikkesett

Error found on line 288 in init.py: "Traceback (most recent call last): File "/home/openf/.config/blender/3.2/scripts/addons/snappyhexmesh_gui-master/init.py", line 288, in draw rowsub.prop(gui, "do_add_layers", text="", icon='HAIR') TypeError: UILayout.prop(): error with keyword argument "icon" - enum "HAIR" not found in ('NONE', 'QUESTION', 'ERROR', 'CANCEL', 'TRIA_RIGHT', 'TRIA_DOWN', 'TRIA_LEFT', 'TRIA_UP', 'ARROW_LEFTRIGHT', 'PLUS', 'DISCLOSURE_TRI_RIGHT', 'DISCLOSURE_TRI_DOWN', 'RADIOBUT_OFF', 'RADIOBUT_ON', 'MENU_PANEL', 'BLENDER', 'GRIP', 'DOT', 'COLLAPSEMENU', 'X', 'DUPLICATE', 'TRASH', 'COLLECTION_NEW"

Works when icon type is changed.

Ikkesett avatar Jun 15 '22 16:06 Ikkesett

Hi, thanks for the info, good to know there's once again icon name changes in upstream Blender! So, this needs to be fixed when upgrading the add-on for next Blender LTS version.

tkeskita avatar Jul 02 '22 06:07 tkeskita

I also had this issue with Blender 3.4

For anyone wishing to attempt to fix this themselves the new icon name is "STRANDS"

so change init.py line 228 from: rowsub.prop(gui, "do_add_layers", text="", icon='HAIR') to: rowsub.prop(gui, "do_add_layers", text="", icon='STRANDS')

Note that the GUI is essentially unusable without this fix, as there will be no "Export" button until the change to the python source code is made.

DWTheo avatar Dec 25 '22 17:12 DWTheo

note to self: bpy.types.UILayout.bl_rna.functions["prop"].parameters["icon"].enum_items.keys() lists available icon names

tkeskita avatar Dec 27 '22 11:12 tkeskita

Thanks @DWTheo for digging up the new icon name! I added some checks to code, so that this kind of breaking is less likely in future. Now SnappyHexMeshGUI should work with all Blender LTS versions (and probably newer ones as well, although I haven't tested).

tkeskita avatar Dec 28 '22 07:12 tkeskita