📋 Metadata

💬 Content

Where can I find this panel?

anphung:

The original button is checking if the object has Custom Normals or not & showing Add or Clear based on that. How would you go about recreating such a context sensitive button?

You need Custom tab for this. The code should look like this:

L.operator("clear.operator" if has_custom_normals else "add.operator")

Check the source code of that button to find operator IDs and condition.


❤️ 3 likes


🔗 View on Blender Artists