diff options
author | Thomas Dinges <blender@dingto.org> | 2013-11-01 17:14:17 +0400 |
---|---|---|
committer | Thomas Dinges <blender@dingto.org> | 2013-11-01 17:14:17 +0400 |
commit | 1eb90abf2b380207e5e69888c51a312e77ea1826 (patch) | |
tree | 4a3c836d7ee8dcd715e02b4fc617401375b1b0fb /release | |
parent | e8c54b682a2ab658a0e87b45f442220c1caaadcd (diff) |
* Extrude options where available in object mode (search menu), resulting in error msg.
Added polls now, patch by Gottfried Hofmann (gottfried).
Diffstat (limited to 'release')
-rw-r--r-- | release/scripts/startup/bl_operators/view3d.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/release/scripts/startup/bl_operators/view3d.py b/release/scripts/startup/bl_operators/view3d.py index 27d2a2361a1..bf51dc5672a 100644 --- a/release/scripts/startup/bl_operators/view3d.py +++ b/release/scripts/startup/bl_operators/view3d.py @@ -29,6 +29,11 @@ class VIEW3D_OT_edit_mesh_extrude_individual_move(Operator): bl_label = "Extrude Individual and Move" bl_idname = "view3d.edit_mesh_extrude_individual_move" + @classmethod + def poll(cls, context): + obj = context.active_object + return obj.mode == 'EDIT' + def execute(self, context): mesh = context.object.data select_mode = context.tool_settings.mesh_select_mode @@ -62,6 +67,11 @@ class VIEW3D_OT_edit_mesh_extrude_move(Operator): bl_label = "Extrude and Move on Normals" bl_idname = "view3d.edit_mesh_extrude_move_normal" + @classmethod + def poll(cls, context): + obj = context.active_object + return obj.mode == 'EDIT' + @staticmethod def extrude_region(context, use_vert_normals): mesh = context.object.data @@ -107,6 +117,11 @@ class VIEW3D_OT_edit_mesh_extrude_shrink_fatten(Operator): bl_label = "Extrude and Move on Individual Normals" bl_idname = "view3d.edit_mesh_extrude_move_shrink_fatten" + @classmethod + def poll(cls, context): + obj = context.active_object + return obj.mode == 'EDIT' + def execute(self, context): return VIEW3D_OT_edit_mesh_extrude_move.extrude_region(context, True) |