diff options
5 files changed, 18 insertions, 18 deletions
diff --git a/release/scripts/startup/bl_ui/properties_paint_common.py b/release/scripts/startup/bl_ui/properties_paint_common.py index 32c5acdf3b7..f36e5616c6e 100644 --- a/release/scripts/startup/bl_ui/properties_paint_common.py +++ b/release/scripts/startup/bl_ui/properties_paint_common.py @@ -476,7 +476,7 @@ def brush_basic_gpencil_weight_settings(layout, context, brush, *, compact=False layout.prop(brush, "use_falloff") - layout.prop(brush, "target_weight", slider=True) + layout.prop(brush, "weight", slider=True) classes = ( diff --git a/source/blender/blenloader/intern/versioning_280.c b/source/blender/blenloader/intern/versioning_280.c index f81705a2c61..85dfbdd1fec 100644 --- a/source/blender/blenloader/intern/versioning_280.c +++ b/source/blender/blenloader/intern/versioning_280.c @@ -2238,20 +2238,6 @@ 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; @@ -2742,5 +2728,19 @@ 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", "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->weight = 1.0f; + } + } + } + } } } diff --git a/source/blender/editors/gpencil/gpencil_brush.c b/source/blender/editors/gpencil/gpencil_brush.c index 95644bd690c..412330ccf5c 100644 --- a/source/blender/editors/gpencil/gpencil_brush.c +++ b/source/blender/editors/gpencil/gpencil_brush.c @@ -914,7 +914,7 @@ static bool gp_brush_weight_apply( } /* verify target weight */ - CLAMP_MAX(curweight, gso->gp_brush->target_weight); + CLAMP_MAX(curweight, gso->gp_brush->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 d100449c353..5721dbfade0 100644 --- a/source/blender/makesdna/DNA_scene_types.h +++ b/source/blender/makesdna/DNA_scene_types.h @@ -991,7 +991,7 @@ typedef struct GP_Sculpt_Data { float strength; /* strength of effect */ float curcolor_add[3]; /* cursor color for add */ float curcolor_sub[3]; /* cursor color for sub */ - float target_weight; /* target weight */ + float weight; /* target weight */ char pad_[4]; } GP_Sculpt_Data; diff --git a/source/blender/makesrna/intern/rna_sculpt_paint.c b/source/blender/makesrna/intern/rna_sculpt_paint.c index bfd4b71daf5..581b0e94aad 100644 --- a/source/blender/makesrna/intern/rna_sculpt_paint.c +++ b/source/blender/makesrna/intern/rna_sculpt_paint.c @@ -1304,7 +1304,7 @@ 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, "target_weight", PROP_FLOAT, PROP_FACTOR); + prop = RNA_def_property(srna, "weight", PROP_FLOAT, PROP_FACTOR); RNA_def_property_range(prop, 0.0, 1.0); RNA_def_property_ui_text(prop, "Weight", "Target weight"); RNA_def_parameter_clear_flags(prop, PROP_ANIMATABLE, 0); |