I'm studying scripting in blender, I am pretty much taking notes of the actions I do in the blender interface and creating the same in a separated script.
One thing I can accomplish in the Blender UI that I can't in the script is extrude the base of a cone in edit mode, see script below:
import bpy
bpy.ops.mesh.primitive_cone_add(location=(0,0,0))
bpy.ops.transform.translate(value=(0, 0, 1.94102), constraint_axis=(False, False, True), constraint_orientation='GLOBAL', mirror=False, proportional='DISABLED', proportional_edit_falloff='SMOOTH', proportional_size=1, release_confirm=True)
bpy.ops.object.editmode_toggle()
bpy.ops.mesh.select_mode(use_extend=False, use_expand=False, type='FACE')
bpy.ops.mesh.select_all(action='TOGGLE')
bpy.ops.mesh.extrude_region_move(MESH_OT_extrude_region={"mirror":False}, TRANSFORM_OT_translate={"value":(-1.97143e-009, 3.68831e-009, 0.447236), "constraint_axis":(False, False, True), "constraint_orientation":'NORMAL', "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})
what am I missing?
select_all(action='TOGGLE')
which will deselect everything so there is no selection to extrude. You want to get the one bottom face selected. $\endgroup$prim = context.object
another isprim.copy()
transform translate in the context above is same asprim.location.z += 1.94
.. can expand into answer. How attached to using only listedf operators in your script? $\endgroup$