diff options
author | Antonioya <blendergit@gmail.com> | 2018-11-21 11:03:17 +0300 |
---|---|---|
committer | Antonioya <blendergit@gmail.com> | 2018-11-21 11:03:17 +0300 |
commit | 3a64d7ca48cc238c706197eebecfc19e7ec15053 (patch) | |
tree | 801d19d11eb846bd53d6d464c0085ad21a0d73cc /source/blender | |
parent | 7de712e1e54e6a94cccee25cef207169898507c5 (diff) |
GP: Remove Target Weight switch
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/blenloader/intern/versioning_280.c | 14 | ||||
-rw-r--r-- | source/blender/editors/gpencil/gpencil_brush.c | 4 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_scene_types.h | 2 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_sculpt_paint.c | 7 |
4 files changed, 15 insertions, 12 deletions
diff --git a/source/blender/blenloader/intern/versioning_280.c b/source/blender/blenloader/intern/versioning_280.c index 70c8e374096..a28b4ae7784 100644 --- a/source/blender/blenloader/intern/versioning_280.c +++ b/source/blender/blenloader/intern/versioning_280.c @@ -2276,6 +2276,20 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain) } } + /* Grease pencil target weight */ + if (!DNA_struct_elem_find(fd->filesdna, "GP_Sculpt_Settings", "float", "target_weight")) { + for (Scene *scene = bmain->scene.first; scene; scene = scene->id.next) { + /* sculpt brushes */ + GP_Sculpt_Settings *gset = &scene->toolsettings->gp_sculpt; + if (gset) { + for (int i = 0; i < GP_SCULPT_TYPE_MAX; i++) { + GP_Sculpt_Data *gp_brush = &gset->brush[i]; + gp_brush->target_weight = 1.0f; + } + } + } + } + if (!DNA_struct_elem_find(fd->filesdna, "SceneEEVEE", "float", "overscan")) { for (Scene *scene = bmain->scene.first; scene; scene = scene->id.next) { scene->eevee.overscan = 3.0f; diff --git a/source/blender/editors/gpencil/gpencil_brush.c b/source/blender/editors/gpencil/gpencil_brush.c index 84a05025cd7..657c3c8b9b6 100644 --- a/source/blender/editors/gpencil/gpencil_brush.c +++ b/source/blender/editors/gpencil/gpencil_brush.c @@ -911,9 +911,7 @@ static bool gp_brush_weight_apply( } /* verify target weight */ - if (gso->gp_brush->flag & GP_SCULPT_FLAG_TARGET_WEIGHT) { - CLAMP_MAX(curweight, gso->gp_brush->target_weight); - } + CLAMP_MAX(curweight, gso->gp_brush->target_weight); CLAMP(curweight, 0.0f, 1.0f); if (dw) { diff --git a/source/blender/makesdna/DNA_scene_types.h b/source/blender/makesdna/DNA_scene_types.h index 6737420b97c..029e8765c8d 100644 --- a/source/blender/makesdna/DNA_scene_types.h +++ b/source/blender/makesdna/DNA_scene_types.h @@ -1017,8 +1017,6 @@ typedef enum eGP_Sculpt_Flag { GP_SCULPT_FLAG_TMP_INVERT = (1 << 5), /* adjust radius using pen pressure */ GP_SCULPT_FLAG_PRESSURE_RADIUS = (1 << 6), - /* paint weight, define a target */ - GP_SCULPT_FLAG_TARGET_WEIGHT = (1 << 7), } eGP_Sculpt_Flag; /* GPencil Stroke Sculpting Settings */ diff --git a/source/blender/makesrna/intern/rna_sculpt_paint.c b/source/blender/makesrna/intern/rna_sculpt_paint.c index 83ce1a3bb23..d106e2db6eb 100644 --- a/source/blender/makesrna/intern/rna_sculpt_paint.c +++ b/source/blender/makesrna/intern/rna_sculpt_paint.c @@ -1293,13 +1293,6 @@ static void rna_def_gpencil_sculpt(BlenderRNA *brna) RNA_def_parameter_clear_flags(prop, PROP_ANIMATABLE, 0); RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL); - prop = RNA_def_property(srna, "use_target_weight", PROP_BOOLEAN, PROP_NONE); - RNA_def_property_boolean_sdna(prop, NULL, "flag", GP_SCULPT_FLAG_TARGET_WEIGHT); - RNA_def_property_ui_text(prop, "Target", - "Use predefined target weight to any point affected by the brush"); - RNA_def_parameter_clear_flags(prop, PROP_ANIMATABLE, 0); - RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL); - prop = RNA_def_property(srna, "use_pressure_strength", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", GP_SCULPT_FLAG_USE_PRESSURE); RNA_def_property_ui_icon(prop, ICON_STYLUS_PRESSURE, 0); |