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:
bpy.utils.unregister_class(bpy.types.DARROW_PT_cryptoPanel)
if bpy.context.scene.hideCryptoBool == False:
bpy.utils.register_class(bpy.types.DARROW_PT_cryptoPanel)
return {'FINISHED'}
bpy.context.scene.hideCryptoBoolin the panel'spoll? – scurest Feb 02 '21 at 06:25DARROW_PT_cryptoPanelfrom module where it is defined. – batFINGER Feb 02 '21 at 09:12