diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2016-04-15 14:13:00 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2016-04-15 14:19:41 +0300 |
commit | 10320891f0468716e3f4029c3136f3b86587cef2 (patch) | |
tree | 78e7236ccce2e93cbdee47292daad3c97c65faf6 /source/blender/makesrna/intern/rna_brush.c | |
parent | 8ac662c77aa59c9eea5fc85c4a40546bcb1b4557 (diff) |
Fix T48151: Brush texture overlay won't refresh automatically in UV editor when changed in buttons window.
Simple solution is to get rid of this stupid `rna_TextureSlot_brush_update` func, and do what it was doing directly
in BR case of `rna_TextureSlot_update`. That way, all updates to brush texture will invalidate correctly the overlay.
Note that this double definition of texture pointer for brushes looks rather fishy, am really not convinced this helps
keeping things simple and clear at all (what happened here is that texture selector in image paint editor was using
'texture' member of brush itself, which was performing correct RNA update, while context-based brush texture selector
from buttons space was using 'texture' member of the TextureSlot struct, which had default texture update callback
which was not invalidating overlay).
Diffstat (limited to 'source/blender/makesrna/intern/rna_brush.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_brush.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/makesrna/intern/rna_brush.c b/source/blender/makesrna/intern/rna_brush.c index e3733ff2850..e13919dd1a1 100644 --- a/source/blender/makesrna/intern/rna_brush.c +++ b/source/blender/makesrna/intern/rna_brush.c @@ -653,34 +653,34 @@ static void rna_def_brush_texture_slot(BlenderRNA *brna) RNA_def_property_enum_sdna(prop, NULL, "brush_map_mode"); RNA_def_property_enum_items(prop, prop_map_mode_items); RNA_def_property_ui_text(prop, "Mode", ""); - RNA_def_property_update(prop, 0, "rna_TextureSlot_brush_update"); + RNA_def_property_update(prop, 0, "rna_TextureSlot_update"); prop = RNA_def_property(srna, "tex_paint_map_mode", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "brush_map_mode"); RNA_def_property_enum_items(prop, prop_tex_paint_map_mode_items); RNA_def_property_ui_text(prop, "Mode", ""); - RNA_def_property_update(prop, 0, "rna_TextureSlot_brush_update"); + RNA_def_property_update(prop, 0, "rna_TextureSlot_update"); prop = RNA_def_property(srna, "mask_map_mode", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "brush_map_mode"); RNA_def_property_enum_items(prop, prop_mask_paint_map_mode_items); RNA_def_property_ui_text(prop, "Mode", ""); - RNA_def_property_update(prop, 0, "rna_TextureSlot_brush_update"); + RNA_def_property_update(prop, 0, "rna_TextureSlot_update"); prop = RNA_def_property(srna, "use_rake", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "brush_angle_mode", MTEX_ANGLE_RAKE); RNA_def_property_ui_text(prop, "Rake", ""); - RNA_def_property_update(prop, 0, "rna_TextureSlot_brush_update"); + RNA_def_property_update(prop, 0, "rna_TextureSlot_update"); prop = RNA_def_property(srna, "use_random", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "brush_angle_mode", MTEX_ANGLE_RANDOM); RNA_def_property_ui_text(prop, "Random", ""); - RNA_def_property_update(prop, 0, "rna_TextureSlot_brush_update"); + RNA_def_property_update(prop, 0, "rna_TextureSlot_update"); prop = RNA_def_property(srna, "random_angle", PROP_FLOAT, PROP_ANGLE); RNA_def_property_range(prop, 0, M_PI * 2); RNA_def_property_ui_text(prop, "Random Angle", "Brush texture random angle"); - RNA_def_property_update(prop, 0, "rna_TextureSlot_brush_update"); + RNA_def_property_update(prop, 0, "rna_TextureSlot_update"); TEXTURE_CAPABILITY(has_texture_angle_source, "Has Texture Angle Source"); TEXTURE_CAPABILITY(has_random_texture_angle, "Has Random Texture Angle"); |