0

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'}

0 Answers0