Fix T96180: driver in node tree not updating in real time

Differential Revision: https://developer.blender.org/D14260
This commit is contained in:
Jacques Lucke 2022-03-07 12:37:13 +01:00
parent 0e51defcf4
commit 00f6e4c990
Notes: blender-bot 2023-02-14 06:00:49 +01:00
Referenced by issue #96180, Sky texture with Driver setting for Sun direction is not updated in real time in 3.1
1 changed files with 8 additions and 0 deletions

View File

@ -1646,6 +1646,14 @@ void DepsgraphRelationBuilder::build_driver_data(ID *id, FCurve *fcu)
add_relation(property_exit_key, parameters_key, "Driven Property -> Properties");
}
}
/* Assume drivers on a node tree affect the evaluated output of the node tree. In theory we could
* check if the driven value actually affects the output, i.e. if it drives a node that is linked
* to the output. */
if (GS(id_ptr->name) == ID_NT) {
ComponentKey ntree_output_key(id_ptr, NodeType::NTREE_OUTPUT);
add_relation(driver_key, ntree_output_key, "Drivers -> NTree Output");
}
}
void DepsgraphRelationBuilder::build_driver_variables(ID *id, FCurve *fcu)