diff options
Diffstat (limited to 'source/blender/editors/object/object_modifier.c')
-rw-r--r-- | source/blender/editors/object/object_modifier.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/source/blender/editors/object/object_modifier.c b/source/blender/editors/object/object_modifier.c index 6b9f2db0d96..1742e1d1279 100644 --- a/source/blender/editors/object/object_modifier.c +++ b/source/blender/editors/object/object_modifier.c @@ -640,14 +640,19 @@ static int multires_subdivide_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } +static int multires_subdivide_poll(bContext *C) +{ + return NULL != CTX_data_active_object(C) && NULL == CTX_data_edit_object(C); +} + void OBJECT_OT_multires_subdivide(wmOperatorType *ot) { ot->name= "Multires Subdivide"; ot->description= "Add a new level of subdivision."; ot->idname= "OBJECT_OT_multires_subdivide"; - ot->poll= ED_operator_object_active; ot->exec= multires_subdivide_exec; + ot->poll= multires_subdivide_poll; /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; |