diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-06-26 23:56:39 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-06-26 23:56:39 +0300 |
commit | a61480c27103fbf449fd14ea8061b65c29f19eae (patch) | |
tree | 8d626b465ebe17936b7551aa91cc5b9d3b192607 /release/scripts/startup/bl_operators/view3d.py | |
parent | a3cd57ea8c57c10d4c65ddd51faa6cce14c98e10 (diff) | |
parent | 532c8ac58384309e77791e32ab78f448ad2a76a6 (diff) |
Merge branch 'master' into blender2.8
Diffstat (limited to 'release/scripts/startup/bl_operators/view3d.py')
-rw-r--r-- | release/scripts/startup/bl_operators/view3d.py | 94 |
1 files changed, 52 insertions, 42 deletions
diff --git a/release/scripts/startup/bl_operators/view3d.py b/release/scripts/startup/bl_operators/view3d.py index 18f91110053..f56c83be7d1 100644 --- a/release/scripts/startup/bl_operators/view3d.py +++ b/release/scripts/startup/bl_operators/view3d.py @@ -39,13 +39,16 @@ class VIEW3D_OT_edit_mesh_extrude_individual_move(Operator): totface = mesh.total_face_sel totedge = mesh.total_edge_sel - #~ totvert = mesh.total_vert_sel + # totvert = mesh.total_vert_sel if select_mode[2] and totface == 1: - bpy.ops.mesh.extrude_region_move('INVOKE_REGION_WIN', - TRANSFORM_OT_translate={ - "constraint_orientation": 'NORMAL', - "constraint_axis": (False, False, True)}) + bpy.ops.mesh.extrude_region_move( + 'INVOKE_REGION_WIN', + TRANSFORM_OT_translate={ + "constraint_orientation": 'NORMAL', + "constraint_axis": (False, False, True), + } + ) elif select_mode[2] and totface > 1: bpy.ops.mesh.extrude_faces_move('INVOKE_REGION_WIN') elif select_mode[1] and totedge >= 1: @@ -77,25 +80,32 @@ class VIEW3D_OT_edit_mesh_extrude_move(Operator): totface = mesh.total_face_sel totedge = mesh.total_edge_sel - #~ totvert = mesh.total_vert_sel + # totvert = mesh.total_vert_sel if totface >= 1: if use_vert_normals: - bpy.ops.mesh.extrude_region_shrink_fatten('INVOKE_REGION_WIN', - TRANSFORM_OT_shrink_fatten={}) + bpy.ops.mesh.extrude_region_shrink_fatten( + 'INVOKE_REGION_WIN', + TRANSFORM_OT_shrink_fatten={}, + ) else: - bpy.ops.mesh.extrude_region_move('INVOKE_REGION_WIN', - TRANSFORM_OT_translate={ - "constraint_orientation": 'NORMAL', - "constraint_axis": (False, False, True)}) - - elif totedge == 1: - bpy.ops.mesh.extrude_region_move('INVOKE_REGION_WIN', + bpy.ops.mesh.extrude_region_move( + 'INVOKE_REGION_WIN', TRANSFORM_OT_translate={ "constraint_orientation": 'NORMAL', - # not a popular choice, too restrictive for retopo. - #~ "constraint_axis": (True, True, False)}) - "constraint_axis": (False, False, False)}) + "constraint_axis": (False, False, True), + }, + ) + + elif totedge == 1: + bpy.ops.mesh.extrude_region_move( + 'INVOKE_REGION_WIN', + TRANSFORM_OT_translate={ + "constraint_orientation": 'NORMAL', + # not a popular choice, too restrictive for retopo. + # "constraint_axis": (True, True, False)}) + "constraint_axis": (False, False, False), + }) else: bpy.ops.mesh.extrude_region_move('INVOKE_REGION_WIN') @@ -134,40 +144,40 @@ class VIEW3D_OT_select_or_deselect_all(Operator): bl_options = {'UNDO'} extend = BoolProperty( - name="Extend", - description="Extend selection instead of deselecting everything first", - default=False, - ) + name="Extend", + description="Extend selection instead of deselecting everything first", + default=False, + ) toggle = BoolProperty( - name="Toggle", - description="Toggle the selection", - default=False, - ) + name="Toggle", + description="Toggle the selection", + default=False, + ) deselect = BoolProperty( - name="Deselect", - description="Remove from selection", - default=False, - ) + name="Deselect", + description="Remove from selection", + default=False, + ) center = BoolProperty( - name="Center", - description="Use the object center when selecting, in editmode used to extend object selection", - default=False, - ) + name="Center", + description="Use the object center when selecting, in editmode used to extend object selection", + default=False, + ) enumerate = BoolProperty( - name="Enumerate", - description="List objects under the mouse (object mode only)", - default=False, - ) + name="Enumerate", + description="List objects under the mouse (object mode only)", + default=False, + ) object = BoolProperty( - name="Object", - description="Use object selection (editmode only)", - default=False, - ) + name="Object", + description="Use object selection (editmode only)", + default=False, + ) @classmethod def poll(cls, context): |