Post #3223: : post_03224
🏷️ Tags
⚙️ Related PME Features
- Macro Editor
- Python Scripting
💬 Content
Metin_Seven:
I want to create a macro operator that does the following:
- In Object Mode, add a Single Vertex (from the Mesh: Extra Objects add-on), or add a Plane, switch to Edit Mode and Merge the vertices to the center.
- Add a Skin modifier.
- Switch off the X Symmetry in the Skin modifier.
- Add a Subdivision modifier.
- Set the Subdivision modifier Viewport subdivisions to 2.
- Set the Subdivision modifier Quality to 6.
Try to add these slots:
bpy.ops.mesh.primitive_vert_add('EXEC_DEFAULT', True)bpy.ops.object.modifier_add('EXEC_DEFAULT', True, type='SKIN')C.object.modifiers[-1].use_x_symmetry = Falsebpy.ops.object.modifier_add('EXEC_DEFAULT', True, type='SUBSURF')C.object.modifiers[-1].levels = 2C.object.modifiers[-1].quality = 6
Adding 'EXEC_DEFAULT', True allows to skip context checking for context sensitive operators.
❤️ 4 likes