diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2011-05-04 17:15:42 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2011-05-04 17:15:42 +0400 |
commit | d000103e80c076fb5bbdfbc87dc978b5e693564d (patch) | |
tree | 17540c107989f234e4b2028c1d273f4a72bbe0f5 /source/blender/makesrna | |
parent | 5d1fdb73ce1457b39df893887951fe6571580897 (diff) |
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
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r-- | source/blender/makesrna/intern/rna_sculpt_paint.c | 15 |
1 files changed, 15 insertions, 0 deletions
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) |