Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'release/scripts/startup/bl_operators/view3d.py')
-rw-r--r--release/scripts/startup/bl_operators/view3d.py94
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):