diff options
Diffstat (limited to 'source/blender/editors/sculpt_paint/sculpt.c')
-rw-r--r-- | source/blender/editors/sculpt_paint/sculpt.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c index 05e60fe8f9c..e4385131db1 100644 --- a/source/blender/editors/sculpt_paint/sculpt.c +++ b/source/blender/editors/sculpt_paint/sculpt.c @@ -175,10 +175,15 @@ static int sculpt_has_active_modifiers(Scene *scene, Object *ob) int sculpt_modifiers_active(Scene *scene, Object *ob) { ModifierData *md; + Mesh *me= (Mesh*)ob->data; MultiresModifierData *mmd= sculpt_multires_active(scene, ob); if(mmd) return 0; + /* non-locked shaoe keys could be handled in the same way as deformed mesh */ + if((ob->shapeflag&OB_SHAPE_LOCK)==0 && me->key && ob->shapenr) + return 1; + md= modifiers_getVirtualModifierList(ob); /* exception for shape keys because we can edit those */ @@ -2708,7 +2713,7 @@ void sculpt_update_mesh_elements(Scene *scene, Object *ob, int need_fmap) ss->modifiers_active= sculpt_modifiers_active(scene, ob); - if((ob->shapeflag & OB_SHAPE_LOCK) && !mmd) ss->kb= ob_get_keyblock(ob); + if(!mmd) ss->kb= ob_get_keyblock(ob); else ss->kb= NULL; if(mmd) { @@ -3342,7 +3347,7 @@ static void sculpt_brush_init_tex(Sculpt *sd, SculptSession *ss) sculpt_update_tex(sd, ss); } -static int sculpt_brush_stroke_init(bContext *C, ReportList *reports) +static int sculpt_brush_stroke_init(bContext *C, ReportList *UNUSED(reports)) { Scene *scene= CTX_data_scene(C); Object *ob= CTX_data_active_object(C); @@ -3350,11 +3355,6 @@ static int sculpt_brush_stroke_init(bContext *C, ReportList *reports) SculptSession *ss = CTX_data_active_object(C)->sculpt; Brush *brush = paint_brush(&sd->paint); - if(ob_get_key(ob) && !(ob->shapeflag & OB_SHAPE_LOCK)) { - BKE_report(reports, RPT_ERROR, "Shape key sculpting requires a locked shape."); - return 0; - } - view3d_operator_needs_opengl(C); sculpt_brush_init_tex(sd, ss); |