From bf7c8f1ef34aa72471695df882c342be9ea6fdbb Mon Sep 17 00:00:00 2001 From: Sean Kim Date: Tue, 12 Aug 2025 23:41:47 +0200 Subject: [PATCH] Fix #144281: Missing redraw for Unified Paint Setting toggles Pull Request: https://projects.blender.org/blender/blender/pulls/144398 --- source/blender/makesrna/intern/rna_sculpt_paint.cc | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/source/blender/makesrna/intern/rna_sculpt_paint.cc b/source/blender/makesrna/intern/rna_sculpt_paint.cc index 332a1eec6a6..364e63c9850 100644 --- a/source/blender/makesrna/intern/rna_sculpt_paint.cc +++ b/source/blender/makesrna/intern/rna_sculpt_paint.cc @@ -781,23 +781,27 @@ static void rna_def_unified_paint_settings(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Use Unified Radius", "Instead of per-brush radius, the radius is shared across brushes"); + RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, nullptr); prop = RNA_def_property(srna, "use_unified_strength", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, nullptr, "flag", UNIFIED_PAINT_ALPHA); RNA_def_property_ui_text(prop, "Use Unified Strength", "Instead of per-brush strength, the strength is shared across brushes"); + RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, nullptr); prop = RNA_def_property(srna, "use_unified_weight", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, nullptr, "flag", UNIFIED_PAINT_WEIGHT); RNA_def_property_ui_text(prop, "Use Unified Weight", "Instead of per-brush weight, the weight is shared across brushes"); + RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, nullptr); prop = RNA_def_property(srna, "use_unified_color", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, nullptr, "flag", UNIFIED_PAINT_COLOR); RNA_def_property_ui_text( prop, "Use Unified Color", "Instead of per-brush color, the color is shared across brushes"); + RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, nullptr); prop = RNA_def_property(srna, "use_unified_input_samples", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, nullptr, "flag", UNIFIED_PAINT_INPUT_SAMPLES); @@ -805,6 +809,7 @@ static void rna_def_unified_paint_settings(BlenderRNA *brna) prop, "Use Unified Input Samples", "Instead of per-brush input samples, the value is shared across brushes"); + RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, nullptr); /* unified paint settings that override the equivalent settings * from the active brush */ @@ -891,36 +896,42 @@ static void rna_def_unified_paint_settings(BlenderRNA *brna) prop, nullptr, "color_jitter_flag", BRUSH_COLOR_JITTER_USE_HUE_AT_STROKE); RNA_def_property_ui_icon(prop, ICON_GP_SELECT_STROKES, 0); RNA_def_property_ui_text(prop, "Stroke Random", "Use randomness at stroke level"); + RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, nullptr); prop = RNA_def_property(srna, "use_stroke_random_sat", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna( prop, nullptr, "color_jitter_flag", BRUSH_COLOR_JITTER_USE_SAT_AT_STROKE); RNA_def_property_ui_icon(prop, ICON_GP_SELECT_STROKES, 0); RNA_def_property_ui_text(prop, "Stroke Random", "Use randomness at stroke level"); + RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, nullptr); prop = RNA_def_property(srna, "use_stroke_random_val", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna( prop, nullptr, "color_jitter_flag", BRUSH_COLOR_JITTER_USE_VAL_AT_STROKE); RNA_def_property_ui_icon(prop, ICON_GP_SELECT_STROKES, 0); RNA_def_property_ui_text(prop, "Stroke Random", "Use randomness at stroke level"); + RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, nullptr); prop = RNA_def_property(srna, "use_random_press_hue", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna( prop, nullptr, "color_jitter_flag", BRUSH_COLOR_JITTER_USE_HUE_RAND_PRESS); RNA_def_property_ui_icon(prop, ICON_STYLUS_PRESSURE, 0); RNA_def_property_ui_text(prop, "Use Pressure", "Use pressure to modulate randomness"); + RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, nullptr); prop = RNA_def_property(srna, "use_random_press_sat", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna( prop, nullptr, "color_jitter_flag", BRUSH_COLOR_JITTER_USE_SAT_RAND_PRESS); RNA_def_property_ui_icon(prop, ICON_STYLUS_PRESSURE, 0); RNA_def_property_ui_text(prop, "Use Pressure", "Use pressure to modulate randomness"); + RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, nullptr); prop = RNA_def_property(srna, "use_random_press_val", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna( prop, nullptr, "color_jitter_flag", BRUSH_COLOR_JITTER_USE_VAL_RAND_PRESS); RNA_def_property_ui_icon(prop, ICON_STYLUS_PRESSURE, 0); RNA_def_property_ui_text(prop, "Use Pressure", "Use pressure to modulate randomness"); + RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, nullptr); prop = RNA_def_property(srna, "input_samples", PROP_INT, PROP_UNSIGNED); RNA_def_property_int_sdna(prop, nullptr, "input_samples"); @@ -938,6 +949,7 @@ static void rna_def_unified_paint_settings(BlenderRNA *brna) RNA_def_property_enum_items(prop, brush_size_unit_items); RNA_def_property_ui_text( prop, "Radius Unit", "Measure brush size relative to the view or the scene"); + RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, nullptr); } static void rna_def_sculpt(BlenderRNA *brna)