Post #3171: sl

📋 Metadata

🏷️ Tags

popup-dialog macro custom-scripting intermediate solved

  • Popup Dialog Editor
  • Macro Editor
  • Property Editor
  • Python Scripting

💬 Content

sleeplessmind:

I have two buttons in a pop up panel and created property item named MyBool. when editing the first button, I chose MyBool under Menu tab. I have also created a separate MyMacro, how do set the second button command line to run MyMacro if MyBool is true?

Use props("MyBool") to check bool value, open_menu("MyMacro") to call macro (Custom tab):

row = L.row(); row.enabled = props("MyBool"); operator(row, "pme.exec", text=text, icon=icon, icon_value=icon_value, cmd="open_menu('MyMacro')")

❤️ 2 likes


🔗 View on Blender Artists