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:
authorCampbell Barton <ideasman42@gmail.com>2011-03-22 12:14:27 +0300
committerCampbell Barton <ideasman42@gmail.com>2011-03-22 12:14:27 +0300
commitcfc904f3f1a00556032e12bb72395e261574669b (patch)
treed59327ccc718a75a0435b27fa873c7e3f342ddc6 /source/blender/editors/mesh
parenta1567aa7c081ce6a3c7b24b7a772323940faa437 (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.c6
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;
}