diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-03-22 12:14:27 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-03-22 12:14:27 +0300 |
commit | cfc904f3f1a00556032e12bb72395e261574669b (patch) | |
tree | d59327ccc718a75a0435b27fa873c7e3f342ddc6 /source/blender/editors/mesh | |
parent | a1567aa7c081ce6a3c7b24b7a772323940faa437 (diff) |
- support transform operators running in backgruond mode (was crashing)
- fix for crash getting the extrude mode enum value when a non-mesh edit object was active.
Diffstat (limited to 'source/blender/editors/mesh')
-rw-r--r-- | source/blender/editors/mesh/editmesh_tools.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/editors/mesh/editmesh_tools.c b/source/blender/editors/mesh/editmesh_tools.c index e22dab2f3c8..b4378829456 100644 --- a/source/blender/editors/mesh/editmesh_tools.c +++ b/source/blender/editors/mesh/editmesh_tools.c @@ -761,7 +761,7 @@ static EnumPropertyItem extrude_items[] = { {0, NULL, 0, NULL, NULL}}; -static EnumPropertyItem *extrude_itemf(bContext *C, PointerRNA *UNUSED(ptr), int *free) +static EnumPropertyItem *mesh_extrude_itemf(bContext *C, PointerRNA *UNUSED(ptr), int *free) { EnumPropertyItem *item= NULL; Object *obedit= CTX_data_edit_object(C); @@ -769,7 +769,7 @@ static EnumPropertyItem *extrude_itemf(bContext *C, PointerRNA *UNUSED(ptr), int int totitem= 0; - if(!obedit) + if(obedit==NULL || obedit->type != OB_MESH) return extrude_items; em = BKE_mesh_get_editmesh(obedit->data); @@ -849,7 +849,7 @@ void MESH_OT_extrude(wmOperatorType *ot) /* properties */ prop= RNA_def_enum(ot->srna, "type", extrude_items, 0, "Type", ""); RNA_def_property_flag(prop, PROP_HIDDEN); - RNA_def_enum_funcs(prop, extrude_itemf); + RNA_def_enum_funcs(prop, mesh_extrude_itemf); ot->prop= prop; } |