I'm trying to add a boolean to my addon preferences menu that when toggled will remove the selected panel. Unfortunately I have no idea how to do this without registering/unregistering which doesn't work once unregistered. Any ideas?

    if bpy.context.scene.hideCryptoBool == True:

    if bpy.context.scene.hideCryptoBool == False:

    return {'FINISHED'}
  • 1
    $\begingroup$ Test bpy.context.scene.hideCryptoBool in the panel's poll? $\endgroup$
    – scurest
    Feb 2, 2021 at 6:25
  • $\begingroup$ Re registering class see blender.stackexchange.com/questions/202889/… and import DARROW_PT_cryptoPanel from module where it is defined. $\endgroup$
    – batFINGER
    Feb 2, 2021 at 9:12
  • $\begingroup$ could you explain what exactly poll is, and how its useful? $\endgroup$ Feb 2, 2021 at 15:54


Browse other questions tagged .