Post #39: ![](https://blenderartists.org/user_avatar/blenderartists.org/pitiwazou/48/45188

📋 Metadata

🏷️ Tags

popup-dialog conditional-visibility intermediate unsolved

  • Popup Dialog Editor
  • Python Scripting
  • Conditional menu logic

💬 Content

pitiwazou:

Is it possible to make conditions to show buttons ?

For example, use the same button to add and remove subsurf ?
Or if len >2 etc

Yep it is:

I have made lots of conditional menus with this addon. Works great.
Or here - dynotopo options marked in red are not visible when you are out of dynotopo:

Btw I’m not sure why, but when I create custom item in popup dialog:
if C.sculpt_object.use_dynamic_topology_sculpting: L.prop_menu_enum(C.tool_settings.sculpt, “detail_type_method”,text, icon=icon)
prop_menu_enum - dosen’t have arrow icon, that would indicate it is menu. Eg in image above, ‘detail slider’ is submenu but it is hard to see because there in no tiny arrow icon on right, like in other menus in blender.


🔗 View on Blender Artists