From d000103e80c076fb5bbdfbc87dc978b5e693564d Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Wed, 4 May 2011 13:15:42 +0000 Subject: Own TODO item: sculpting on constructive modifiers - Constructive modifiers are enabled by default in sculpt mode. - There's option to disable all constructive modifiers in the "Options" panel of toolbox in sculpt mode, - Use one column in options panel to make strings easier to read - No modifiers would still be applied on multires --- source/blender/makesrna/intern/rna_sculpt_paint.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'source/blender/makesrna/intern/rna_sculpt_paint.c') diff --git a/source/blender/makesrna/intern/rna_sculpt_paint.c b/source/blender/makesrna/intern/rna_sculpt_paint.c index 58f19fe8799..ce018fdfd6e 100644 --- a/source/blender/makesrna/intern/rna_sculpt_paint.c +++ b/source/blender/makesrna/intern/rna_sculpt_paint.c @@ -184,6 +184,16 @@ static int rna_Brush_mode_poll(PointerRNA *ptr, PointerRNA value) return brush->ob_mode & mode; } +static void rna_Sculpt_update(Main *bmain, Scene *scene, PointerRNA *ptr) +{ + Object *ob= (scene->basact)? scene->basact->object: NULL; + + if(ob) { + DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + WM_main_add_notifier(NC_OBJECT|ND_MODIFIER, ob); + } +} + #else static void rna_def_paint(BlenderRNA *brna) @@ -260,6 +270,11 @@ static void rna_def_sculpt(BlenderRNA *brna) prop= RNA_def_property(srna, "use_threaded", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flags", SCULPT_USE_OPENMP); RNA_def_property_ui_text(prop, "Use OpenMP", "Take advantage of multiple CPU cores to improve sculpting performance"); + + prop= RNA_def_property(srna, "use_deform_only", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "flags", SCULPT_ONLY_DEFORM); + RNA_def_property_ui_text(prop, "Use Deform Only", "Use only deformation modifiers (temporary disable all constructive modifiers except multi-resolution)"); + RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, "rna_Sculpt_update"); } static void rna_def_vertex_paint(BlenderRNA *brna) -- cgit v1.2.3