* Extrude options where available in object mode (search menu), resulting in error msg.

Added polls now, patch by Gottfried Hofmann (gottfried).
This commit is contained in:
Thomas Dinges 2013-11-01 13:14:17 +00:00
parent e8c54b682a
commit 1eb90abf2b

@ -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)