i created a custom blender ui.
i know that normally we should register multiple panel and sub-panel but i decided to do things differently.
my UI is based on bool properties, like this below
prop stored in addon preferences
class SCATTER_AddonPref(AddonPreferences):
bl_idname = __name__
addon_prefs = bpy.context.preferences.addons[__name__].preferences
scatter_sliders_display : BoolProperty(name="",description="",default=False)
scatter_sliders_vgroup : BoolProperty(name="",description="",default=False)
scatter_sliders_curv_is_open : BoolProperty(name="",description="",default=False)
scatter_sliders_curv_adv_is_open : BoolProperty(name="",description="",default=False)
scatter_proxy_is_open : BoolProperty(name="",description="",default=False)
and this is how i use it in the ui
layout.prop(addon_prefs,'scatter_camera_is_open',text="bla category",emboss=False,icon='BLENDER')
if addon_prefs.scatter_camera_is_open:
layout.label(text="blablabla")
i think it is a really nice method. i already saw this used in many many case, but the problem as we saw in the gif is that it leave a trace in the undo history.
so is thereâs a way to avoid this or am i screwed ?
anyhow i could ignore ctrl z with this specific property ?
for example, is it possible to create an operator that will toggle thoses addon pref on/off and will not show up in the history at all ?