STEAM GROUP
Blender Source Tools BleST
STEAM GROUP
Blender Source Tools BleST
381
IN-GAME
2,154
ONLINE
Founded
8 November, 2013
All Discussions > Bug Reports > Topic Details
Plat 8 Jul, 2022 @ 7:15am
GUI Panels are created opened
The addon creates 3 panels in Blender UI when loaded, but they start out opened with is probably not the desired behavior.
I have taken a look through the GUI.py included with the addon which creates said panels, and it looks like it uses deprecated commands for having the panels start out closed - and, given that they're deprecated, Blender 2.8+ just ignores them and opens the panels on creation.

In GUI.py, on lines 68, 342 and 595 there are three copies of the following line:
bl_default_closed = True
I couldn't find references to this in the current Blender API documentation, hence my conclusion of it being outdated.
What I have found in the current (3.2.1) API docs is the following line
bl_options = {'DEFAULT_CLOSED'}
(Source: https://docs.blender.org/api/current/bpy.types.Panel.html#bpy.types.Panel.bl_options)
Replacing all three instances of bl_default_closed = True with bl_options = {'DEFAULT_CLOSED'} on lines 68, 342 and 595 made all panels start out closed, which is probably the intended behavior as bl_default_closed = True hints.
Last edited by Plat; 8 Jul, 2022 @ 7:16am
< >
Showing 1-1 of 1 comments
Artfunkel 9 Jul, 2022 @ 7:44am 
Wow, thanks for spotting this! I've corrected it now.
< >
Showing 1-1 of 1 comments
Per page: 1530 50

All Discussions > Bug Reports > Topic Details