Update for rename: constraint_orientation -> orient_type

This commit is contained in:
Campbell Barton 2019-02-28 12:28:54 +11:00
parent 0bbba588f7
commit aaf97075b4
15 changed files with 39 additions and 39 deletions

View File

@ -103,7 +103,7 @@ def Add_Chain():
bpy.ops.transform.translate(
value=(2, 0, 0),
constraint_axis=(True, False, False),
constraint_orientation='GLOBAL',
orient_type='GLOBAL',
mirror=False,
proportional='DISABLED',
proportional_edit_falloff='SMOOTH',

View File

@ -150,7 +150,7 @@ class makestructure(Operator):
bpy.ops.mesh.select_all(action='SELECT')
bpy.ops.transform.resize(
value=(sx, sy, sz), constraint_axis=(True, True, True),
constraint_orientation='GLOBAL', mirror=False, proportional='DISABLED',
orient_type='GLOBAL', mirror=False, proportional='DISABLED',
proportional_edit_falloff='SMOOTH', proportional_size=1, release_confirm=True
)
bpy.ops.object.mode_set(mode='OBJECT')
@ -160,17 +160,17 @@ class makestructure(Operator):
bpy.ops.object.select_grouped(type='GROUP')
bpy.ops.transform.rotate(
value=rot[0], axis=(1, 0, 0), constraint_axis=(False, False, False),
constraint_orientation='GLOBAL', mirror=False, proportional='DISABLED',
orient_type='GLOBAL', mirror=False, proportional='DISABLED',
proportional_edit_falloff='SMOOTH', proportional_size=1, release_confirm=True
)
bpy.ops.transform.rotate(
value=rot[1], axis=(0, 1, 0), constraint_axis=(False, False, False),
constraint_orientation='GLOBAL', mirror=False, proportional='DISABLED',
orient_type='GLOBAL', mirror=False, proportional='DISABLED',
proportional_edit_falloff='SMOOTH', proportional_size=1, release_confirm=True
)
bpy.ops.transform.rotate(
value=rot[2], axis=(0, 0, 1), constraint_axis=(False, False, False),
constraint_orientation='GLOBAL', mirror=False, proportional='DISABLED',
orient_type='GLOBAL', mirror=False, proportional='DISABLED',
proportional_edit_falloff='SMOOTH', proportional_size=1, release_confirm=True
)
bpy.context.view_layer.objects.active = obj # Again needed to avoid poll() taking me down

View File

@ -172,7 +172,7 @@ def extruir_vertices(longitud, cuantos_segmentos):
TRANSFORM_OT_translate={
"value": (longitud / cuantos_segmentos, 0, 0),
"constraint_axis": (True, False, False),
"constraint_orientation": 'GLOBAL', "mirror": False,
"orient_type": '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),
@ -341,7 +341,7 @@ class ClothRope(Operator):
MESH_OT_extrude_region={"mirror": False},
TRANSFORM_OT_translate={
"value": (0, 0.005, 0), "constraint_axis": (False, True, False),
"constraint_orientation": 'GLOBAL', "mirror": False,
"orient_type": '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),
@ -383,7 +383,7 @@ class ClothRope(Operator):
MESH_OT_duplicate={"mode": 1},
TRANSFORM_OT_translate={
"value": (0, 0, 0), "constraint_axis": (False, False, False),
"constraint_orientation": 'GLOBAL', "mirror": False,
"orient_type": '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),
@ -694,7 +694,7 @@ class BallRope(Operator):
TRANSFORM_OT_translate={
"value": (0, 0, z / i),
"constraint_axis": (False, False, True),
"constraint_orientation": 'GLOBAL', "mirror": False,
"orient_type": '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),
@ -721,13 +721,13 @@ class BallRope(Operator):
)
bpy.ops.transform.translate(
value=(0, 0, -z + 2), constraint_axis=(False, False, True),
constraint_orientation='GLOBAL', mirror=False, proportional='DISABLED',
orient_type='GLOBAL', mirror=False, proportional='DISABLED',
proportional_edit_falloff='SMOOTH', proportional_size=1
)
bpy.ops.transform.resize(
value=(longitud / 2, longitud / 2, longitud / 2),
constraint_axis=(False, False, False),
constraint_orientation='GLOBAL',
orient_type='GLOBAL',
mirror=False, proportional='DISABLED',
proportional_edit_falloff='SMOOTH', proportional_size=1
)
@ -743,7 +743,7 @@ class BallRope(Operator):
bpy.ops.transform.translate(
value=(0, 0, offset_del_suelo_real),
constraint_axis=(False, False, True),
constraint_orientation='GLOBAL', mirror=False,
orient_type='GLOBAL', mirror=False,
proportional='DISABLED', proportional_edit_falloff='SMOOTH',
proportional_size=1
)
@ -765,7 +765,7 @@ class BallRope(Operator):
bpy.ops.transform.rotate(
value=rotrope, axis=(1, 0, 0),
constraint_axis=(True, False, False),
constraint_orientation='GLOBAL',
orient_type='GLOBAL',
mirror=False, proportional='DISABLED',
proportional_edit_falloff='SMOOTH',
proportional_size=1

View File

@ -162,7 +162,7 @@ class add_BI_scene(Operator):
bpy.ops.object.editmode_toggle()
bpy.ops.transform.rotate(
value=-0.8, axis=(0, 0, 1), constraint_axis=(False, False, True),
constraint_orientation='GLOBAL', mirror=False, proportional='DISABLED',
orient_type='GLOBAL', mirror=False, proportional='DISABLED',
proportional_edit_falloff='SMOOTH', proportional_size=1
)
bpy.ops.uv.unwrap(method='CONFORMAL', margin=0.001)

View File

@ -328,7 +328,7 @@ class ARCHIPACK_OT_snap(ArchipackSnapBase, Operator):
bpy.ops.transform.translate('INVOKE_DEFAULT',
constraint_axis=SnapStore.constraint_axis,
constraint_orientation=SnapStore.transform_orientation,
orient_type=SnapStore.transform_orientation,
release_confirm=SnapStore.release_confirm)
logger.debug("Snap.invoke transform.translate done")

View File

@ -583,7 +583,7 @@ def camera_light_source(use_camera,
bpy.ops.transform.rotate(value=(90.0*2*pi/360.0),
axis=object_camera_vec,
constraint_axis=(False, False, False),
constraint_orientation='GLOBAL',
orient_type='GLOBAL',
mirror=False, proportional='DISABLED',
proportional_edit_falloff='SMOOTH',
proportional_size=1, snap=False,
@ -994,7 +994,7 @@ def draw_sticks_skin(all_atoms,
Stick_diameter*r_f,
Stick_diameter*r_f),
constraint_axis=(False, False, False),
constraint_orientation='GLOBAL',
orient_type='GLOBAL',
mirror=False,
proportional='DISABLED',
proportional_edit_falloff='SMOOTH',

View File

@ -98,13 +98,13 @@ class AutoMirror(Operator):
bpy.ops.transform.translate(
value=(X * orientation, Y * orientation, Z * orientation),
constraint_axis=((X == 1), (Y == 1), (Z == 1)),
constraint_orientation='LOCAL'
orient_type='LOCAL'
)
v2 = Vector((loc[0], loc[1], loc[2]))
bpy.ops.transform.translate(
value=(-X * orientation, -Y * orientation, -Z * orientation),
constraint_axis=((X == 1), (Y == 1), (Z == 1)),
constraint_orientation='LOCAL'
orient_type='LOCAL'
)
bpy.ops.object.mode_set(mode="EDIT")

View File

@ -2093,7 +2093,7 @@ def Rebool(context, self):
TRANSFORM_OT_translate={
"value": (0, 0, 0),
"constraint_axis": (False, False, False),
"constraint_orientation": 'GLOBAL',
"orient_type": 'GLOBAL',
"mirror": False,
"proportional": 'DISABLED',
"proportional_edit_falloff": 'SMOOTH',

View File

@ -789,7 +789,7 @@ class EdgeRoundifier(Operator):
old_location = self.obj.location.copy()
bpy.ops.transform.translate(
value=-old_location, constraint_axis=(False, False, False),
constraint_orientation='GLOBAL', mirror=False, proportional='DISABLED',
orient_type='GLOBAL', mirror=False, proportional='DISABLED',
proportional_edit_falloff='SMOOTH', proportional_size=1
)
bpy.ops.object.mode_set(mode='EDIT')
@ -820,7 +820,7 @@ class EdgeRoundifier(Operator):
# PKHG>INFO move origin object back print("old location = " , old_location)
bpy.ops.transform.translate(
value=old_location, constraint_axis=(False, False, False),
constraint_orientation='GLOBAL', mirror=False, proportional='DISABLED',
orient_type='GLOBAL', mirror=False, proportional='DISABLED',
proportional_edit_falloff='SMOOTH', proportional_size=1
)
bpy.ops.object.mode_set(mode='EDIT')

View File

@ -348,7 +348,7 @@ class Extrude_and_Reshape(Operator):
bmesh.update_edit_mesh(self.mesh, loop_triangles=True, destructive=True)
bpy.ops.transform.translate(
'INVOKE_DEFAULT', constraint_axis=(False, False, True),
constraint_orientation='NORMAL', release_confirm=True
orient_type='NORMAL', release_confirm=True
)
context.window_manager.modal_handler_add(self)

View File

@ -155,7 +155,7 @@ class dual_mesh(Operator):
MESH_OT_extrude_region={"mirror": False},
TRANSFORM_OT_translate={"value": (0, 0, 0),
"constraint_axis": (False, False, False),
"constraint_orientation": 'GLOBAL', "mirror": False,
"orient_type": 'GLOBAL', "mirror": False,
"proportional": 'DISABLED',
"proportional_edit_falloff": 'SMOOTH', "proportional_size": 1,
"snap": False, "snap_target": 'CLOSEST',

View File

@ -448,7 +448,7 @@ def generate_mesh(shape_object, size, thickness=0.8, finger_thickness=0.25, sub_
bpy.ops.object.skin_root_mark(override)
bpy.ops.transform.skin_resize(override,
value=(1 * thickness * (size / 10), 1 * thickness * (size / 10), 1 * thickness * (size / 10)),
constraint_axis=(False, False, False), constraint_orientation='GLOBAL',
constraint_axis=(False, False, False), orient_type='GLOBAL',
mirror=False, proportional='DISABLED', proportional_edit_falloff='SMOOTH',
proportional_size=1
)
@ -463,7 +463,7 @@ def generate_mesh(shape_object, size, thickness=0.8, finger_thickness=0.25, sub_
# by default set fingers thickness to 25 percent of body thickness
bpy.ops.transform.skin_resize(override,
value=(finger_thickness, finger_thickness, finger_thickness),
constraint_axis=(False, False, False), constraint_orientation='GLOBAL',
constraint_axis=(False, False, False), orient_type='GLOBAL',
mirror=False, proportional='DISABLED', proportional_edit_falloff='SMOOTH',
proportional_size=1
)
@ -492,7 +492,7 @@ def generate_mesh(shape_object, size, thickness=0.8, finger_thickness=0.25, sub_
bpy.ops.mesh.merge(type='CENTER')
bpy.ops.transform.skin_resize(override,
value=(corrective_thickness, corrective_thickness, corrective_thickness),
constraint_axis=(False, False, False), constraint_orientation='GLOBAL',
constraint_axis=(False, False, False), orient_type='GLOBAL',
mirror=False, proportional='DISABLED', proportional_edit_falloff='SMOOTH',
proportional_size=1
)
@ -505,7 +505,7 @@ def generate_mesh(shape_object, size, thickness=0.8, finger_thickness=0.25, sub_
bpy.ops.mesh.merge(type='CENTER')
bpy.ops.transform.skin_resize(override,
value=(corrective_thickness, corrective_thickness, corrective_thickness),
constraint_axis=(False, False, False), constraint_orientation='GLOBAL',
constraint_axis=(False, False, False), orient_type='GLOBAL',
mirror=False, proportional='DISABLED', proportional_edit_falloff='SMOOTH',
proportional_size=1
)
@ -519,7 +519,7 @@ def generate_mesh(shape_object, size, thickness=0.8, finger_thickness=0.25, sub_
corrective_thickness = 0.7
bpy.ops.transform.skin_resize(override,
value=(corrective_thickness, corrective_thickness, corrective_thickness),
constraint_axis=(False, False, False), constraint_orientation='GLOBAL',
constraint_axis=(False, False, False), orient_type='GLOBAL',
mirror=False, proportional='DISABLED', proportional_edit_falloff='SMOOTH',
proportional_size=1
)

View File

@ -753,7 +753,7 @@ def pov_sphere_define(context, op, ob, loc):
bpy.ops.mesh.select_all(action='SELECT')
bpy.ops.mesh.delete(type='VERT')
bpy.ops.mesh.primitive_ico_sphere_add(subdivisions=4, size=ob.pov.sphere_radius, location=loc, rotation=obrot)
#bpy.ops.transform.rotate(axis=obrot,constraint_orientation='GLOBAL')
#bpy.ops.transform.rotate(axis=obrot,orient_type='GLOBAL')
bpy.ops.transform.resize(value=obscale)
#bpy.ops.transform.rotate(axis=obrot, proportional_size=1)
@ -761,7 +761,7 @@ def pov_sphere_define(context, op, ob, loc):
bpy.ops.mesh.hide(unselected=False)
bpy.ops.object.mode_set(mode="OBJECT")
bpy.ops.object.shade_smooth()
#bpy.ops.transform.rotate(axis=obrot,constraint_orientation='GLOBAL')
#bpy.ops.transform.rotate(axis=obrot,orient_type='GLOBAL')
if not ob:
bpy.ops.mesh.primitive_ico_sphere_add(subdivisions=4, size=R, location=loc)
@ -1710,7 +1710,7 @@ class ImportPOV(bpy.types.Operator, ImportHelper):
# bpy.ops.object.mode_set(mode='EDIT')
# bpy.ops.mesh.reveal()
# bpy.ops.mesh.select_all(action='SELECT')
# bpy.ops.transform.resize(value=(1,1,scaleZ), constraint_orientation='LOCAL')
# bpy.ops.transform.resize(value=(1,1,scaleZ), orient_type='LOCAL')
# bpy.ops.mesh.hide(unselected=False)
# bpy.ops.object.mode_set(mode='OBJECT')

View File

@ -128,7 +128,7 @@ class AlignSelectedXYZ(Operator):
constraint_value = values[self.axis][1]
bpy.ops.transform.resize(
value=chosen_value, constraint_axis=constraint_value,
constraint_orientation='GLOBAL',
orient_type='GLOBAL',
mirror=False, proportional='DISABLED',
proportional_edit_falloff='SMOOTH',
proportional_size=1

View File

@ -873,26 +873,26 @@ class VIEW3D_MT_MirrorMenu(Menu):
layout.operator_context = 'INVOKE_REGION_WIN'
props = layout.operator("transform.mirror", text="X Global")
props.constraint_axis = (True, False, False)
props.constraint_orientation = 'GLOBAL'
props.orient_type = 'GLOBAL'
props = layout.operator("transform.mirror", text="Y Global")
props.constraint_axis = (False, True, False)
props.constraint_orientation = 'GLOBAL'
props.orient_type = 'GLOBAL'
props = layout.operator("transform.mirror", text="Z Global")
props.constraint_axis = (False, False, True)
props.constraint_orientation = 'GLOBAL'
props.orient_type = 'GLOBAL'
if context.edit_object:
UseSeparator(self, context)
props = layout.operator("transform.mirror", text="X Local")
props.constraint_axis = (True, False, False)
props.constraint_orientation = 'LOCAL'
props.orient_type = 'LOCAL'
props = layout.operator("transform.mirror", text="Y Local")
props.constraint_axis = (False, True, False)
props.constraint_orientation = 'LOCAL'
props.orient_type = 'LOCAL'
props = layout.operator("transform.mirror", text="Z Local")
props.constraint_axis = (False, False, True)
props.constraint_orientation = 'LOCAL'
props.orient_type = 'LOCAL'
UseSeparator(self, context)
layout.operator("object.vertex_group_mirror")