Post #2400: Any chance you could add something to help users need less code, like a simple ‘

📋 Metadata

🏷️ Tags

macro workflow-automation beginner intermediate unsolved

  • Macro Editor
  • Python Scripting

💬 Content

Any chance you could add something to help users need less code, like a simple ‘if this, then that’ system, where users can fill in boxes with, for example: if ‘selection’ ‘=’ ‘number of objects’ ‘>’ ‘2’, do ‘command’.
This might enable users to apply commands to multiple meshes (something currently difficult to do in Blender without code), or more easily read the state of a toggle and have their pies respond intelligently to it…

I’m talking about stuff like this that I’ve got right now: “mods = [m for m in C.active_object.modifiers if m.type == ‘SUBSURF’]; m = mods and mods[0]; operator(L, “wm.context_toggle”, text, icon, icon_value=icon_value, data_path=“active_object.modifiers[’%s’].show_viewport” % m.name) if m else operator(L, “object.modifier_add”, text, icon, icon_value=icon_value, type=‘SUBSURF’)”
It’s readable for most, but almost impossible to write for non-scripters.


🔗 View on Blender Artists