hi, I’d like to ask if there is a way in python that i could execute multiple commands at once, without having to list each of them every time. For example, let’s say i have an example list of commands
that i want to use them a few times through the script. Can I make a list including these commands, then call the “list” whenever i need it and run all the commands?
# Define a function that adds a plane and a solidify modifier
def addSolidPlane():
bpy.ops.mesh.primitive_plane_add(...)
bpy.ops.object.modifier_add(type='SOLIDIFY')
bpy.context.object.modifiers["Solidify"].thickness = 1
# Add a solid plane
addSolidPlane()
# Move the 3D cursor
....
# Add a second solid plane an the new location.
addSolidPlane()