Post #4185: mi

πŸ“‹ Metadata

🏷️ Tags

macro scripting intermediate solved

  • Macro Editor
  • Python Scripting

πŸ’¬ Content

mijuku:

I want to make a macro, convert the object to mesh and keep the original object, and then disable the original object in the viewport.

Hi @mijuku,
You don’t need a macro operator in this case. Use this code in Command tab:

sel_obj_names = [o.name for o in C.selected_objects]; bpy.ops.object.convert(target='MESH', keep_original=True); [setattr(D.objects[n], "hide_select", True) for n in sel_obj_names]

❀️ 2 likes


πŸ”— View on Blender Artists