Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntonioya <blendergit@gmail.com>2018-11-21 11:03:17 +0300
committerAntonioya <blendergit@gmail.com>2018-11-21 11:03:17 +0300
commit3a64d7ca48cc238c706197eebecfc19e7ec15053 (patch)
tree801d19d11eb846bd53d6d464c0085ad21a0d73cc
parent7de712e1e54e6a94cccee25cef207169898507c5 (diff)
GP: Remove Target Weight switch
-rw-r--r--release/scripts/startup/bl_ui/space_topbar.py6
-rw-r--r--source/blender/blenloader/intern/versioning_280.c14
-rw-r--r--source/blender/editors/gpencil/gpencil_brush.c4
-rw-r--r--source/blender/makesdna/DNA_scene_types.h2
-rw-r--r--source/blender/makesrna/intern/rna_sculpt_paint.c7
5 files changed, 16 insertions, 17 deletions
diff --git a/release/scripts/startup/bl_ui/space_topbar.py b/release/scripts/startup/bl_ui/space_topbar.py
index 9303bbb47c0..8b9c47839e9 100644
--- a/release/scripts/startup/bl_ui/space_topbar.py
+++ b/release/scripts/startup/bl_ui/space_topbar.py
@@ -408,11 +408,7 @@ class _draw_left_context_mode:
row.prop(brush, "strength", slider=True)
row.prop(brush, "use_pressure_strength", text="")
- row = layout.row(align=True)
- row.prop(brush, "use_target_weight", text="", icon='WPAINT_HLT')
- sub = row.row(align=True)
- sub.enabled = brush.use_target_weight
- sub.prop(brush, "target_weight", slider=True)
+ layout.prop(brush, "target_weight", slider=True)
@staticmethod
def PARTICLE(context, layout, tool):
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);