How to show a panel, only when a particular collection exist (or appended)?
Here a bit more explanation of what I am aiming for in case the question is not clear:
In the screenshot above you see there is a panel called 3point light Ctrl. What I want is that the panel "3Point Light Ctrl" only shows up after the user clicked on "Add 3 Point Light" in the "Add to scene" panel.
Often I see a poll function in other addons like:
@classmethod
def poll(cls, context):
return context.active_object is not None
And so I thought I could do it as follows:
@classmethod
def poll(cls, context):
return return bpy.data.collections[“ThreePointLight”]
But that doesn't work, and I realize it is expecting context, not bpy.data. Any idea how I can do this? (It's for Blender 2.80).