I am working on a python script and to find the right function calls I have been cutting and pasting from the top bar of the scripting window after I do the step manually. It was going great. For instance, I went into edit on an object, selected some vertices and manually did and extrude restricting it to the Z axis. Then I put the code into my script:
bpy.ops.mesh.extrude_region_move(MESH_OT_extrude_region={"mirror":False},
TRANSFORM_OT_translate={"value":(0, 0, 0),
"constraint_axis":(False, False, False),
"constraint_orientation":'GLOBAL',
"mirror":False,
"proportional":'DISABLED',
"proportional_edit_falloff":'SMOOTH',
"proportional_size":1,
"snap":False,
"snap_target":'CLOSEST',
"snap_point":(0, 0, 0),
"snap_align":False,
"snap_normal":(0, 0, 0),
"gpencil_strokes":False,
"texture_space":False,
"remove_on_cancel":False,
"release_confirm":False})
and it worked fine.
But, then I selected a different ring of vertices and did an Extrude (E) -> Scale (S) then restricted the scaling to the XY plane (Shift+Z) and did the scaling extrusion. In the UI it worked fine. But, when I copy the code:
bpy.ops.mesh.extrude_region_move(MESH_OT_extrude_region={"mirror":False},
TRANSFORM_OT_resize={"value":(2.12492, 2.12492, 2.12492),
"constraint_axis":(True, True, False),
"constraint_orientation":'GLOBAL',
"mirror":False,
"proportional":'DISABLED',
"proportional_edit_falloff":'SMOOTH',
"proportional_size":1,
"snap":False,
"snap_target":'CLOSEST',
"snap_point":(0, 0, 0),
"snap_align":False,
"snap_normal":(0, 0, 0),
"gpencil_strokes":False,
"texture_space":False,
"remove_on_cancel":False,
"release_confirm":False})
to the script and run it, it says:
TypeError: Converting py args to operator properties: : keyword "TRANSFORM_OT_resize" unrecognized
Error: Python script fail, look in the console for now...
I searched for TRANSFORM_OT_resize and I can't find any ref to it.
TRANSFORM_OT_resizeis the class name (TYPE_OperatorType_name naming convention) of the scale operatorbpy.ops.transform.resize(...).TRANSFORM_OT_resizeis not a property of bpy.ops.mesh.extrude_move,TRANSFORM_OT_translateis. Suggest reporting to the Bug Tracker – batFINGER Aug 04 '17 at 06:15bpy.ops.transform.resize(value=(2, 2, 2), ...)– batFINGER Aug 04 '17 at 06:22