diff options
author | Lukas Tönne <lukas.toenne@gmail.com> | 2016-04-15 18:59:54 +0300 |
---|---|---|
committer | Lukas Tönne <lukas.toenne@gmail.com> | 2016-04-15 18:59:54 +0300 |
commit | fbed29a246ed51023c3303115d060d7a455b4fc2 (patch) | |
tree | 44947031e32ba4549cecc2a4fb3d0a18f65151be /source/blender/makesrna/intern/rna_texture.c | |
parent | 987bb50a74132e1f2489083c59daab892f24806f (diff) | |
parent | 6bc2ba21117a25c8a7100b282cc2377e1adf7075 (diff) |
Merge branch 'master' into temp_remove_particles
Diffstat (limited to 'source/blender/makesrna/intern/rna_texture.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_texture.c | 28 |
1 files changed, 7 insertions, 21 deletions
diff --git a/source/blender/makesrna/intern/rna_texture.c b/source/blender/makesrna/intern/rna_texture.c index d6762495499..959f30170f5 100644 --- a/source/blender/makesrna/intern/rna_texture.c +++ b/source/blender/makesrna/intern/rna_texture.c @@ -224,7 +224,7 @@ static void rna_Texture_type_set(PointerRNA *ptr, int value) BKE_texture_type_set(tex, value); } -void rna_TextureSlot_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr) +void rna_TextureSlot_update(Main *UNUSED(bmain), Scene *scene, PointerRNA *ptr) { ID *id = ptr->id.data; @@ -243,32 +243,18 @@ void rna_TextureSlot_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRN WM_main_add_notifier(NC_LAMP | ND_LIGHTING_DRAW, id); break; case ID_BR: - WM_main_add_notifier(NC_BRUSH, id); - break; - case ID_LS: - WM_main_add_notifier(NC_LINESTYLE, id); - break; - } -} - -void rna_TextureSlot_brush_update(Main *bmain, Scene *scene, PointerRNA *ptr) -{ - ID *id = ptr->id.data; - - DAG_id_tag_update(id, 0); - - switch (GS(id->name)) { - case ID_BR: { MTex *mtex = ptr->data; BKE_paint_invalidate_overlay_tex(scene, mtex->tex); + WM_main_add_notifier(NC_BRUSH, id); break; } + case ID_LS: + WM_main_add_notifier(NC_LINESTYLE, id); + break; } - rna_TextureSlot_update(bmain, scene, ptr); } - char *rna_TextureSlot_path(PointerRNA *ptr) { MTex *mtex = ptr->data; @@ -637,14 +623,14 @@ static void rna_def_mtex(BlenderRNA *brna) RNA_def_property_float_sdna(prop, NULL, "ofs"); RNA_def_property_ui_range(prop, -10, 10, 10, RNA_TRANSLATION_PREC_DEFAULT); RNA_def_property_ui_text(prop, "Offset", "Fine tune of the texture mapping X, Y and Z locations"); - RNA_def_property_update(prop, 0, "rna_TextureSlot_brush_update"); + RNA_def_property_update(prop, 0, "rna_TextureSlot_update"); prop = RNA_def_property(srna, "scale", PROP_FLOAT, PROP_XYZ); RNA_def_property_float_sdna(prop, NULL, "size"); RNA_def_property_flag(prop, PROP_PROPORTIONAL); RNA_def_property_ui_range(prop, -100, 100, 10, 2); RNA_def_property_ui_text(prop, "Size", "Set scaling for the texture's X, Y and Z sizes"); - RNA_def_property_update(prop, 0, "rna_TextureSlot_brush_update"); + RNA_def_property_update(prop, 0, "rna_TextureSlot_update"); prop = RNA_def_property(srna, "color", PROP_FLOAT, PROP_COLOR); RNA_def_property_float_sdna(prop, NULL, "r"); |