From 1eb90abf2b380207e5e69888c51a312e77ea1826 Mon Sep 17 00:00:00 2001 From: Thomas Dinges Date: Fri, 1 Nov 2013 13:14:17 +0000 Subject: * Extrude options where available in object mode (search menu), resulting in error msg. Added polls now, patch by Gottfried Hofmann (gottfried). --- release/scripts/startup/bl_operators/view3d.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'release') 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) -- cgit v1.2.3