We frequently see in a Panel class:
@classmethod def poll(cls, context): return context.active_object is not None
Any idea how to make it so that the panel only shows when a collection with a particular name excists in scene. Or in other words: Panel should only show up after appending a particular collection.
Update: coming a bit closer, I found:
>>> a = 0 >>> if bpy.data.collections["Backdrop_01"]: ... a = 1 ... >>> a 1
So I will try : return bpy.data.collections[“Backdrop_01”] is not None.
Update: ahw, that didn’t work. That will spawn errors that it couldn’t find backdrop
Update: Oops, I see it. It is asking for context. hmm. def poll(cls, context):