diff --git a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc index bff2f4b0399..43c1469e32b 100644 --- a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc +++ b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc @@ -3029,6 +3029,14 @@ void DepsgraphRelationBuilder::build_nodetree(bNodeTree *ntree) build_nodetree_socket(socket); } + if (ntree->type == NTREE_SHADER && bnode->is_type("ShaderNodeAttribute")) { + NodeShaderAttribute *attr = static_cast(bnode->storage); + if (attr->type == SHD_ATTRIBUTE_VIEW_LAYER && STREQ(attr->name, "frame_current")) { + TimeSourceKey time_src_key; + add_relation(time_src_key, ntree_output_key, "TimeSrc -> Node"); + } + } + ID *id = bnode->id; if (id == nullptr) { continue; diff --git a/source/blender/makesrna/intern/rna_nodetree.cc b/source/blender/makesrna/intern/rna_nodetree.cc index 6aed63cf1f5..9fb66b3892d 100644 --- a/source/blender/makesrna/intern/rna_nodetree.cc +++ b/source/blender/makesrna/intern/rna_nodetree.cc @@ -5050,12 +5050,12 @@ static void def_sh_attribute(BlenderRNA * /*brna*/, StructRNA *srna) RNA_def_property_enum_sdna(prop, nullptr, "type"); RNA_def_property_enum_items(prop, prop_attribute_type); RNA_def_property_ui_text(prop, "Attribute Type", "General type of the attribute"); - RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); + RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update_relations"); prop = RNA_def_property(srna, "attribute_name", PROP_STRING, PROP_NONE); RNA_def_property_string_sdna(prop, nullptr, "name"); RNA_def_property_ui_text(prop, "Attribute Name", ""); - RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); + RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update_relations"); } static void def_sh_tex(BlenderRNA * /*brna*/, StructRNA *srna)