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:
authorPhilipp Oeser <info@graphics-engineer.com>2020-10-30 14:12:25 +0300
committerPhilipp Oeser <info@graphics-engineer.com>2020-12-09 23:45:36 +0300
commit3b57927651fe31ea5576cdc69f3ce134bc56a285 (patch)
tree930eedabd1ff7aa7d61a88ac3b82c4eb051ed6ae /source/blender/makesrna/intern/rna_texture.c
parentac7694aee05047750f955ee2fb0d62942392f6c0 (diff)
Fix T82242: creating particle influence textures does not set up DEG
relation immediately Texture and ParticleSettings have a DEG relation, but `DEG_relations_tag_update` was not called when the texture changed. This lead to no updates when e.g. texture size changes, relation only went into full effect after save/reload or adding/removing keyframes. Two places were additional relation tagging is needed: - ParticleSettings `active_texture` changes - ParticleSettingsTextureSlot (basically any TextureSlots') texture changes Maniphest Tasks: T82242 Differential Revision: https://developer.blender.org/D9393
Diffstat (limited to 'source/blender/makesrna/intern/rna_texture.c')
-rw-r--r--source/blender/makesrna/intern/rna_texture.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/source/blender/makesrna/intern/rna_texture.c b/source/blender/makesrna/intern/rna_texture.c
index fb6d40b3a55..4eb11879517 100644
--- a/source/blender/makesrna/intern/rna_texture.c
+++ b/source/blender/makesrna/intern/rna_texture.c
@@ -148,6 +148,7 @@ static const EnumPropertyItem blend_type_items[] = {
# include "BKE_texture.h"
# include "DEG_depsgraph.h"
+# include "DEG_depsgraph_build.h"
# include "ED_node.h"
# include "ED_render.h"
@@ -233,6 +234,12 @@ static void rna_Texture_type_set(PointerRNA *ptr, int value)
BKE_texture_type_set(tex, value);
}
+void rna_TextureSlotTexture_update(bContext *C, PointerRNA *ptr)
+{
+ DEG_relations_tag_update(CTX_data_main(C));
+ rna_TextureSlot_update(C, ptr);
+}
+
void rna_TextureSlot_update(bContext *C, PointerRNA *ptr)
{
ID *id = ptr->owner_id;
@@ -623,7 +630,7 @@ static void rna_def_mtex(BlenderRNA *brna)
RNA_def_property_flag(prop, PROP_EDITABLE | PROP_CONTEXT_UPDATE);
RNA_def_property_override_flag(prop, PROPOVERRIDE_OVERRIDABLE_LIBRARY);
RNA_def_property_ui_text(prop, "Texture", "Texture data-block used by this texture slot");
- RNA_def_property_update(prop, NC_MATERIAL | ND_SHADING_LINKS, "rna_TextureSlot_update");
+ RNA_def_property_update(prop, NC_MATERIAL | ND_SHADING_LINKS, "rna_TextureSlotTexture_update");
prop = RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
RNA_def_property_string_funcs(