93#include "RNA_prototypes.hh"
128bool is_time_dependent_scene_driver_target(
const DriverTarget *target)
138 return is_time_dependent_scene_driver_target(target);
142 return is_time_dependent_scene_driver_target(target);
148bool driver_variable_depends_on_time(
const DriverVar *variable)
151 if (driver_target_depends_on_time(variable, &variable->
targets[
i])) {
158bool driver_variables_depends_on_time(
const ListBase *variables)
161 if (driver_variable_depends_on_time(variable)) {
173 if (driver_variables_depends_on_time(&driver->
variables)) {
194bool object_particles_depends_on_time(
Object *
object)
200 if (particle_system_depends_on_time(psys)) {
207bool check_id_has_anim_component(
ID *
id)
210 if (adt ==
nullptr) {
216bool check_id_has_driver_component(
ID *
id)
219 if (adt ==
nullptr) {
226 const char *subtarget,
228 const char *component_subdata,
233 if (target ==
id && root_map !=
nullptr) {
238 if (root_map->has_common_root(component_subdata, subtarget)) {
245bool object_have_geometry_component(
const Object *
object)
263 return graph_->time_source;
271 "find_node component: Could not find ID %s\n",
272 (key.
id !=
nullptr) ? key.
id->
name :
"<null>");
283 if (op_node ==
nullptr) {
285 "find_node_operation: Failed for (%s, '%s')\n",
294 return rna_node_query_.find_node(&key.
ptr, key.
prop, key.
source);
330 const char *description)
347 if (id_node ==
nullptr) {
359 if (id_node ==
nullptr) {
369 const char *description,
372 if (timesrc && node_to) {
373 return graph_->add_new_relation(timesrc, node_to, description, flags);
378 "add_time_relation(%p = %s, %p = %s, %s) Failed\n",
380 (timesrc) ? timesrc->
identifier().c_str() :
"<None>",
382 (node_to) ? node_to->
identifier().c_str() :
"<None>",
397 const char *description,
400 if (node_from && node_to) {
401 return graph_->add_new_relation(node_from, node_to, description, flags);
406 "add_operation_relation(%p = %s, %p = %s, %s) Failed\n",
408 (node_from) ? node_from->
identifier().c_str() :
"<None>",
410 (node_to) ? node_to->
identifier().c_str() :
"<None>",
424 if (relation->ob !=
object) {
452 if (relation->ob !=
object) {
465 if ((relation->pd !=
nullptr) && (relation->pd->forcefield ==
PFIELD_TEXTURE) &&
466 (relation->pd->tex !=
nullptr))
473 if (relation->pd->forcefield ==
PFIELD_FLUIDFLOW && relation->pd->f_source) {
486 if (relation->psys) {
487 if (relation->ob !=
object) {
495 else if (relation->psys != psys) {
499 relation->psys->name);
617 if (built_map_.check_is_built_and_tag(
id)) {
639 if (from_layer_collection !=
nullptr) {
647 if (!built_map_.check_is_built_and_tag(collection,
658 if (
Node *object_hierarchy_node = this->
find_node(object_hierarchy_key)) {
661 "Collection -> Object hierarchy");
669 if (built_map_.check_is_built_and_tag(collection)) {
695 Node *object_hierarchy_node = this->
find_node(object_hierarchy_key);
698 "Collection -> Object hierarchy");
702 add_relation(object_instance_geometry_key, collection_geometry_key,
"Collection Geometry");
706 Collection *collection_instance = cob->ob->instance_collection;
707 if (collection_instance !=
nullptr) {
710 add_relation(collection_instance_key, collection_geometry_key,
"Collection Geometry");
719 add_relation(child_collection_geometry_key, collection_geometry_key,
"Collection Geometry");
725 if (built_map_.check_is_built_and_tag(
object)) {
745 add_relation(init_transform_key, local_transform_key,
"Transform Init");
751 if (object->
parent !=
nullptr) {
757 add_relation(local_transform_key, parent_transform_key,
"ObLocal -> ObParent");
762 "Instance Geometry -> Geometry");
765 OperationKey{&object->id, NodeType::INSTANCING, OperationCode::INSTANCE_GEOMETRY},
766 "Transform -> Instance Geometry");
773 BuilderWalkUserData
data;
780 BuilderWalkUserData
data;
787 BuilderWalkUserData
data;
801 add_relation(base_op_key, constraint_key,
"ObBase-> Constraint Stack");
802 add_relation(constraint_key, final_transform_key,
"ObConstraints -> Done");
803 add_relation(constraint_key, ob_eval_key,
"Constraint -> Transform Eval");
805 ob_eval_key, object_transform_simulation_init_key,
"Transform Eval -> Simulation Init");
808 "Simulation -> Final Transform");
813 ob_eval_key, object_transform_simulation_init_key,
"Transform Eval -> Simulation Init");
816 "Simulation -> Final Transform");
835 (object->
pd->
tex !=
nullptr))
849 add_relation(final_transform_key, synchronize_key,
"Synchronize to Original");
859 add_relation(object_from_layer_entry_key, visibility_key,
"Object Visibility");
886 add_relation(view_layer_done_key, object_from_layer_entry_key,
"View Layer flags to Object");
903 add_relation(object_from_layer_entry_key, object_from_layer_exit_key,
"Object from Layer");
908 add_relation(object_from_layer_entry_key, object_flags_key,
"Base flags flush Entry");
909 add_relation(object_flags_key, object_from_layer_exit_key,
"Base flags flush Exit");
914 add_relation(object_from_layer_exit_key, synchronize_key,
"Synchronize to Original");
931 object_visibility_key,
932 "modifier -> object visibility",
935 add_relation(modifier_visibility_key, eval_key,
"modifier visibility -> geometry eval");
961 add_relation(time_src_key, modifier_key,
"Time Source -> Modifier");
964 previous_key = modifier_key;
966 add_relation(previous_key, eval_key,
"modifier stack order");
969 BuilderWalkUserData
data;
976 if (object->
data ==
nullptr) {
981 if (!built_map_.check_is_built(obdata_id)) {
985 switch (object->
type) {
1004 add_relation(transform_key, geometry_key,
"Text on Curve own Transform");
1027 if (key !=
nullptr) {
1035 if (materials_ptr !=
nullptr) {
1048 add_relation(camera_parameters_key, object_parameters_key,
"Camera -> Object");
1057 add_relation(lamp_parameters_key, object_parameters_key,
"Light -> Object");
1059 add_relation(lamp_parameters_key, object_shading_key,
"Light -> Object Shading");
1068 add_relation(probe_key, object_key,
"LightProbe Update");
1070 add_relation(probe_key, object_shading_key,
"LightProbe -> Object Shading");
1079 add_relation(speaker_key, object_key,
"Speaker Update");
1085 ID *parent_id = &
object->parent->id;
1092 add_relation(parent_transform_key, object_transform_key,
"Parent Armature Transform");
1098 parent_transform_key, object_geometry_key,
"Parent Armature Transform -> Geometry");
1099 add_relation(parent_pose_key, object_geometry_key,
"Parent Armature Pose -> Geometry");
1102 &object->
id, object_geometry_key,
"Virtual Armature Modifier");
1112 add_relation(parent_key, object_transform_key,
"Vertex Parent");
1124 add_relation(transform_key, object_transform_key,
"Vertex Parent TFM");
1134 add_relation(parent_bone_key, object_transform_key,
"Bone Parent");
1135 add_relation(parent_transform_key, object_transform_key,
"Armature Parent");
1145 add_relation(parent_key, object_transform_key,
"Lattice Deform Parent");
1146 add_relation(geom_key, object_transform_key,
"Lattice Deform Parent Geom");
1154 add_relation(parent_key, object_transform_key,
"Curve Follow Parent");
1156 add_relation(transform_key, object_transform_key,
"Curve Follow TFM");
1161 add_relation(parent_key, object_transform_key,
"Curve Parent");
1167 add_relation(parent_key, object_transform_key,
"Parent");
1180 add_relation(parent_geometry_key, object_transform_key,
"Parent");
1192 if (md1 ==
nullptr) {
1195 if (md2 ==
nullptr) {
1209 std::optional<ComponentKey> point_cache_key;
1210 bool has_rigid_body_relation =
false;
1211 bool has_geometry_eval_relation =
false;
1215 if (!point_cache_key) {
1220 if (!has_geometry_eval_relation) {
1221 has_geometry_eval_relation =
true;
1224 add_relation(*point_cache_key, geometry_key,
"Point Cache -> Geometry");
1230 has_rigid_body_relation =
true;
1234 add_relation(*point_cache_key, transform_key,
"Point Cache -> Rigid Body");
1240 if (!
graph_->is_render_pipeline_depsgraph) {
1245 "Rigid Body Rebuild -> Point Cache Reset",
1250 if (md && md->
prev) {
1258 if (point_cache_key) {
1263 "Transform Simulation -> Point Cache",
1268 if (last_input_modifier !=
nullptr) {
1273 "Previous Modifier -> Point Cache",
1281 "Geometry Init -> Point Cache",
1293 Collection *instance_collection =
object->instance_collection;
1303 add_relation(dupli_transform_key, object_transform_final_key,
"Dupligroup");
1308 "Instance -> Instancer");
1318 add_relation(shading_key, shading_done_key,
"Shading -> Done");
1326 "Light Linking -> Instance",
1338 add_relation(hierarchy_key, light_linking_key,
"Light Linking From Layer");
1339 add_relation(light_linking_key, shading_done_key,
"Light Linking -> Shading Done");
1352 if (collection ==
nullptr) {
1379 collection_light_linking_key,
1380 "Entry -> Collection Light Linking",
1383 collection_parameters_exit_key,
1384 "Collection Light Linking -> Exit",
1388 collection_light_linking_key,
1389 "Collection Hierarchy -> Light Linking",
1397 emitter_light_linking_key,
1398 "Collection -> Object Light Linking");
1403 const char *component_subdata,
1416 ListBase targets = {
nullptr,
nullptr};
1418 if (cti ==
nullptr) {
1433 bool depends_on_camera =
false;
1437 depends_on_camera =
true;
1439 if (
data->depth_ob) {
1447 depends_on_camera =
true;
1449 if (depends_on_camera && scene_->camera !=
nullptr) {
1456 add_relation(time_src_key, constraint_op_key,
"TimeSrc -> Animation");
1462 add_relation(time_src_key, constraint_op_key,
"TimeSrc -> Animation");
1464 if (
data->cache_file) {
1471 if (ct->tar ==
nullptr) {
1485 else if ((ct->tar->type ==
OB_ARMATURE) && (ct->subtarget[0])) {
1488 opcode = bone_target_opcode(
1489 &ct->tar->id, ct->subtarget,
id, component_subdata, root_map);
1546 if (&ct->tar->id ==
id) {
1599 if (check_id_has_anim_component(
id)) {
1602 add_relation(animation_key, parameters_key,
"Animation -> Parameters");
1610 if (adt ==
nullptr) {
1613 if (adt->
action !=
nullptr) {
1623 add_relation(animation_entry_key, animation_eval_key,
"Init -> Eval");
1624 add_relation(animation_eval_key, animation_exit_key,
"Eval -> Exit");
1628 if (adt->
action !=
nullptr) {
1630 add_relation(action_key, adt_key,
"Action -> Animation");
1635 if (node_from ==
nullptr) {
1641 if (adt->
action !=
nullptr) {
1662 if (node_to ==
nullptr) {
1674 graph_->add_new_relation(
1680 if (id_node_from != id_node_to) {
1684 "Animated Copy-on-Eval -> Animation",
1721 if (slot ==
nullptr) {
1730 switch (strip->type()) {
1731 case animrig::Strip::Type::Keyframe: {
1734 if (channels ==
nullptr) {
1738 for (
FCurve *fcu : channels->fcurves()) {
1754 if (strip->act !=
nullptr) {
1758 add_relation(action_key, adt_key,
"Action -> Animation");
1761 id, strip->action_slot_handle, adt_key, operation_from, strip->act);
1763 else if (strip->strips.first !=
nullptr) {
1782 fcu->rna_path ? fcu->rna_path :
"",
1790 add_relation(adt_key, driver_key,
"AnimData Before Drivers");
1794 add_relation(driver_unshare_key, driver_key,
"Un-share shared data before drivers");
1802 bool has_image_animation =
false;
1807 has_image_animation =
true;
1815 add_relation(time_src_key, image_animation_key,
"TimeSrc -> Image Animation");
1821 add_relation(material_update_key, image_animation_key,
"Material Update -> Image Animation");
1825 add_relation(world_update_key, image_animation_key,
"World Update -> Image Animation");
1829 add_relation(ntree_output_key, image_animation_key,
"NTree Output -> Image Animation");
1849 add_relation(animation_key, rigidbody_key,
"Animation -> Rigid Body");
1854 if (built_map_.check_is_built_and_tag(dna_action)) {
1868 add_relation(time_src_key, animation_key,
"TimeSrc -> Animation");
1888 if (driver_depends_on_time(driver)) {
1890 add_relation(time_src_key, driver_key,
"TimeSrc -> Driver");
1897 const char *rna_path = fcu->
rna_path;
1898 if (rna_path ==
nullptr || rna_path[0] ==
'\0') {
1918 bool is_bone = id_ptr && property_entry_key.
ptr.
type == &RNA_Bone;
1922 id_ptr = (
ID *)((
Object *)id_ptr)->data;
1928 if (bone ==
nullptr) {
1929 fprintf(stderr,
"Couldn't find armature bone name for driver path - '%s'\n", rna_path);
1934 const bool driver_targets_bbone =
STRPREFIX(prop_identifier,
"bbone_");
1944 if (object->
data != id_ptr || object->
pose ==
nullptr) {
1949 if (pchan ==
nullptr) {
1954 if (driver_targets_bbone) {
1959 add_relation(driver_key, bone_key,
"Arm Bone -> Driver -> Bone");
1971 if (node_to !=
nullptr) {
1972 add_relation(driver_key, property_entry_key,
"Driver -> Driven Property");
1991 property_entry_key.
ptr,
1992 property_entry_key.
prop,
1995 add_relation(property_exit_key, parameters_key,
"Driven Property -> Properties");
2004 add_relation(driver_key, ntree_output_key,
"Drivers -> NTree Output");
2008 add_relation(driver_key, ntree_geo_preprocess_key,
"Drivers -> NTree Geo Preprocess");
2046 Object *
object =
nullptr;
2048 object = (
Object *)target_id;
2052 (dtar->pchan_name[0]))
2055 if (target_pchan ==
nullptr) {
2063 add_relation(variable_key, driver_key,
"Bone Target -> Driver");
2067 if (target_id ==
id) {
2074 add_relation(target_key, driver_key,
"Target -> Driver");
2076 else if (dtar->rna_path !=
nullptr && dtar->rna_path[0] !=
'\0') {
2078 driver_key, self_key, target_id, target_prop, dtar->rna_path);
2082 scene_, target_prop, dtar->rna_path))
2097 if (rna_path ==
"data" || rna_path.
startswith(
"data.")) {
2115 const char *rna_path)
2119 bool animated =
false;
2122 if (!
ELEM(marker->camera,
nullptr, scene->
camera)) {
2133 add_relation(time_src_key, driver_key,
"TimeSrc -> Driver Camera Ref");
2141 const char *rna_path)
2152 add_relation(variable_exit_key, driver_key,
"RNA Target -> Driver");
2189 add_relation(target_id_key, driver_key,
"Target ID -> Driver");
2195 const char *rna_path_from_target_prop)
2197 if (rna_path_from_target_prop ==
nullptr || rna_path_from_target_prop[0] ==
'\0') {
2207 if (prop ==
nullptr) {
2245 add_relation(parameters_entry_key, parameters_eval_key,
"Entry -> Eval");
2246 add_relation(parameters_eval_key, parameters_exit_key,
"Entry -> Exit");
2254 add_relation(geometry_key, dimensions_key,
"Geometry -> Dimensions");
2255 add_relation(transform_key, dimensions_key,
"Transform -> Dimensions");
2260 if (built_map_.check_is_built_and_tag(world)) {
2275 add_relation(parameters_key, world_key,
"World's parameters");
2294 add_relation(time_src_key, rb_init_key,
"TimeSrc -> Rigidbody Init");
2306 add_relation(effector_transform_key, rb_init_key,
"RigidBody Field");
2307 if (effector_relation->pd !=
nullptr) {
2308 const short shape = effector_relation->pd->shape;
2311 add_relation(effector_geometry_key, rb_init_key,
"RigidBody Field");
2314 (effector_relation->pd->tex !=
nullptr))
2317 add_relation(tex_key, rb_init_key,
"Force field Texture");
2322 if (rbw->
group !=
nullptr) {
2349 "Object Transform -> Rigidbody Sim Eval");
2359 "Object Geom Eval -> Rigidbody Sim Eval",
2373 add_relation(rb_simulate_key, rb_transform_copy_key,
"Rigidbody Sim Eval -> RBO Sync");
2378 object_transform_final_key,
2379 "Rigidbody Sync -> Transform Final");
2414 add_relation(particle_settings_key, eval_init_key,
"Particle Settings Change");
2420 add_relation(psys_key, obdata_ubereval_key,
"PSys -> UberEval");
2436 if (part->
boids !=
nullptr) {
2439 Object *ruleob =
nullptr;
2446 if (ruleob !=
nullptr) {
2456 if (
ELEM(particle_target->ob,
nullptr,
object)) {
2494 if (built_map_.check_is_built_and_tag(part)) {
2510 particle_settings_init_key, particle_settings_eval_key,
"Particle Settings Init Order");
2511 add_relation(particle_settings_reset_key, particle_settings_eval_key,
"Particle Settings Reset");
2514 if (mtex ==
nullptr || mtex->
tex ==
nullptr) {
2520 particle_settings_reset_key,
2521 "Particle Texture -> Particle Reset",
2523 add_relation(texture_key, particle_settings_eval_key,
"Particle Texture -> Particle Eval");
2528 add_relation(object_key, particle_settings_eval_key,
"Particle Texture Space");
2531 if (check_id_has_anim_component(&part->
id)) {
2533 add_relation(animation_key, particle_settings_eval_key,
"Particle Settings Animation");
2545 add_relation(dup_ob_key, psys_key,
"Particle Object Visualization");
2548 add_relation(obdata_ubereval_key, dup_geometry_key,
"Particle MBall Visualization");
2555 if (built_map_.check_is_built_and_tag(key)) {
2572 add_relation(key_block_key, geometry_key,
"Key Block Properties");
2573 add_relation(key_block_key, parameters_eval_key,
"Key Block Properties");
2607 add_relation(obdata_geom_key, geom_key,
"Object Geometry Base Data");
2617 "Transform -> Instance Geometry");
2632 add_relation(time_src_key, obdata_ubereval_key,
"Time Source");
2647 add_relation(geom_init_key, obdata_ubereval_key,
"Object Geometry UberEval");
2653 if (mom ==
object) {
2655 add_relation(mom_transform_key, mom_geom_key,
"Metaball Motherball Transform -> Geometry");
2659 add_relation(geom_key, mom_geom_key,
"Metaball Motherball");
2660 add_relation(transform_key, mom_geom_key,
"Metaball Motherball");
2670 if (object_particles_depends_on_time(
object)) {
2674 add_relation(time_key, obdata_ubereval_key,
"Legacy particle time");
2679 if (key !=
nullptr) {
2680 if (key->
adt !=
nullptr) {
2693 add_relation(final_geometry_key, synchronize_key,
"Synchronize to Original");
2699 add_relation(object_data_select_key, object_select_key,
"Data Selection -> Object Selection");
2705 add_relation(geometry_shading_key, object_shading_key,
"Geometry Shading -> Object Shading");
2710 if (built_map_.check_is_built_and_tag(obdata)) {
2723 if (key !=
nullptr) {
2729 add_relation(obdata_geom_eval_key, obdata_geom_done_key,
"ObData Geom Eval Done");
2733 add_relation(parameters_key, obdata_geom_eval_key,
"ObData Geom Params");
2744 if (cu->
bevobj !=
nullptr) {
2746 add_relation(bevob_geom_key, obdata_geom_eval_key,
"Curve Bevel Geometry");
2748 add_relation(bevob_key, obdata_geom_eval_key,
"Curve Bevel Transform");
2753 add_relation(taperob_key, obdata_geom_eval_key,
"Curve Taper");
2758 add_relation(textoncurve_geom_key, obdata_geom_eval_key,
"Text on Curve Geometry");
2760 add_relation(textoncurve_key, obdata_geom_eval_key,
"Text on Curve Transform");
2772 add_relation(object_data_select_key, obdata_geom_eval_key,
"Active Spline Update");
2788 add_relation(time_key, geometry_key,
"GP Frame Change");
2795 if ((ma !=
nullptr) && (ma->
gp_style !=
nullptr)) {
2797 add_relation(material_key, geometry_key,
"Material -> GP Data");
2803 if (gpl->parent !=
nullptr) {
2806 if (gpl->partype ==
PARBONE) {
2812 add_relation(armature_key, gpd_geom_key,
"Armature Parent");
2816 add_relation(transform_key, gpd_geom_key,
"GPencil Parent Layer");
2823 Curves *curves_id =
reinterpret_cast<Curves *
>(obdata);
2824 if (curves_id->
surface !=
nullptr) {
2839 add_relation(time_key, geometry_key,
"Volume sequence time");
2849 add_relation(time_key, geometry_key,
"Grease Pencil Frame Change");
2854 if (parent ==
nullptr) {
2857 if (parent->
type ==
OB_ARMATURE && !layer->parent_bone_name().is_empty()) {
2862 add_relation(bone_key, geometry_key,
"Grease Pencil Layer Bone Parent");
2863 add_relation(armature_key, geometry_key,
"Grease Pencil Layer Armature Parent");
2867 add_relation(transform_key, geometry_key,
"Grease Pencil Layer Object Parent");
2880 if (built_map_.check_is_built_and_tag(armature)) {
2914 if (built_map_.check_is_built_and_tag(camera)) {
2928 add_relation(dof_ob_key, camera_parameters_key,
"Camera DOF");
2934 add_relation(target_key, camera_parameters_key,
"Camera DOF subtarget");
2942 if (built_map_.check_is_built_and_tag(lamp)) {
2957 add_relation(lamp_parameters_key, shading_key,
"Light Shading Parameters");
2964 add_relation(ntree_key, shading_key,
"NTree->Light Parameters");
2975 if (
object !=
nullptr) {
2981 if (image !=
nullptr) {
2987 if (collection !=
nullptr) {
2999 if (material !=
nullptr) {
3007 if (ntree ==
nullptr) {
3010 if (built_map_.check_is_built_and_tag(ntree)) {
3025 add_relation(ntree_cow_key, ntree_geo_preprocess_key,
"Copy-on-Eval -> Preprocess");
3028 "Preprocess -> Output",
3032 for (
bNode *bnode : ntree->all_nodes()) {
3041 if (ntree->
type ==
NTREE_SHADER && bnode->is_type(
"ShaderNodeAttribute")) {
3045 add_relation(time_src_key, ntree_output_key,
"TimeSrc -> Node");
3050 if (
id ==
nullptr) {
3054 if (id_type ==
ID_MA) {
3057 add_relation(material_key, ntree_output_key,
"Material -> Node");
3059 else if (id_type ==
ID_TE) {
3062 add_relation(texture_key, ntree_output_key,
"Texture -> Node");
3064 else if (id_type ==
ID_IM) {
3067 add_relation(image_key, ntree_output_key,
"Image -> Node");
3069 else if (id_type ==
ID_OB) {
3072 add_relation(object_transform_key, ntree_output_key,
"Object Transform -> Node");
3073 if (object_have_geometry_component(
reinterpret_cast<Object *
>(
id))) {
3075 add_relation(object_geometry_key, ntree_output_key,
"Object Geometry -> Node");
3078 else if (id_type ==
ID_SCE) {
3085 if (node_scene->
camera !=
nullptr) {
3089 else if (id_type ==
ID_TXT) {
3092 else if (id_type ==
ID_MSK) {
3095 add_relation(mask_key, ntree_output_key,
"Mask -> Node");
3097 else if (id_type ==
ID_MC) {
3100 add_relation(clip_key, ntree_output_key,
"Clip -> Node");
3102 else if (id_type ==
ID_VF) {
3105 add_relation(vfont_key, ntree_output_key,
"VFont -> Node");
3107 else if (id_type ==
ID_GR) {
3116 else if (bnode->is_group()) {
3123 add_relation(group_output_key, ntree_output_key,
"Group Node");
3128 add_relation(group_preprocess_key, ntree_geo_preprocess_key,
"Group Node Preprocess");
3138 ntree->ensure_interface_cache();
3146 if (check_id_has_anim_component(&ntree->
id)) {
3148 add_relation(animation_key, ntree_output_key,
"NTree Shading Parameters");
3150 add_relation(animation_key, ntree_geo_preprocess_key,
"NTree Animation -> Preprocess");
3161 add_relation(material_key, owner_shading_key,
"Material -> Owner Shading");
3164 if (built_map_.check_is_built_and_tag(material)) {
3179 add_relation(parameters_key, material_key,
"Material's parameters");
3182 if (material->
nodetree !=
nullptr) {
3186 add_relation(ntree_key, material_key,
"Material's NTree");
3193 for (
int i = 0;
i < num_materials;
i++) {
3194 if (materials[
i] ==
nullptr) {
3204 if (built_map_.check_is_built_and_tag(
texture)) {
3222 add_relation(ntree_key, texture_key,
"Texture's NTree");
3228 if (
texture->ima !=
nullptr) {
3236 if (check_id_has_anim_component(&
texture->id)) {
3238 add_relation(animation_key, texture_key,
"Datablock Animation");
3243 add_relation(image_animation_key, texture_key,
"Datablock Image Animation");
3249 if (built_map_.check_is_built_and_tag(image)) {
3262 if (built_map_.check_is_built_and_tag(cache_file)) {
3273 if (check_id_has_anim_component(&cache_file->
id)) {
3276 add_relation(animation_key, datablock_key,
"Datablock Animation");
3278 if (check_id_has_driver_component(&cache_file->
id)) {
3281 add_relation(animation_key, datablock_key,
"Drivers -> Cache Eval");
3289 add_relation(time_src_key, cache_update_key,
"TimeSrc -> Cache File Eval");
3295 if (built_map_.check_is_built_and_tag(
mask)) {
3310 add_relation(time_src_key, mask_animation_key,
"TimeSrc -> Mask Animation");
3313 add_relation(mask_animation_key, mask_eval_key,
"Mask Animation -> Mask Eval");
3317 for (
int i = 0;
i < spline->tot_point;
i++) {
3320 if (parent ==
nullptr || parent->
id ==
nullptr) {
3327 add_relation(movieclip_eval_key, mask_eval_key,
"Movie Clip -> Mask Eval");
3336 if (built_map_.check_is_built_and_tag(linestyle)) {
3342 ID *linestyle_id = &linestyle->
id;
3352 if (built_map_.check_is_built_and_tag(clip)) {
3367 if (built_map_.check_is_built_and_tag(probe)) {
3381 if (built_map_.check_is_built_and_tag(speaker)) {
3391 if (speaker->
sound !=
nullptr) {
3395 add_relation(sound_key, speaker_key,
"Sound -> Speaker");
3401 if (built_map_.check_is_built_and_tag(sound)) {
3415 add_relation(parameters_key, audio_key,
"Parameters -> Audio");
3430 if (strip->
sound !=
nullptr) {
3436 if (strip->
scene !=
nullptr) {
3446 sequence_scene_audio_key, cd->
sequencer_key,
"Sequence Scene Audio -> Sequencer");
3449 sequence_scene_key, cd->
sequencer_key,
"Sequence Scene -> Sequencer");
3475 if (scene->
ed ==
nullptr) {
3493 add_relation(sequencer_key, scene_audio_key,
"Sequencer -> Audio");
3502 add_relation(scene_audio_entry_key, scene_audio_volume_key,
"Audio Entry -> Volume");
3503 add_relation(scene_audio_volume_key, scene_sound_eval_key,
"Audio Volume -> Sound");
3507 add_relation(scene_anim_key, scene_audio_volume_key,
"Animation -> Audio Volume");
3515 Object *
object = base->object;
3525 if (built_map_.check_is_built_and_tag(vfont)) {
3551 int relation_flag = 0;
3552 if (!flush_cow_changes) {
3557 add_relation(id_copy_on_write_key, owner_copy_on_write_key,
"Eval Order", relation_flag);
3562 if (ntree ==
nullptr) {
3573 if (key ==
nullptr) {
3602 if (!comp_node->depends_on_cow()) {
3613 if (id_type ==
ID_SO) {
3642 if (op_entry !=
nullptr) {
3643 Relation *rel =
graph_->add_new_relation(op_cow, op_entry,
"Copy-on-Eval Dependency");
3644 rel->
flag |= rel_flag;
3647 for (
OperationNode *op_node : comp_node->operations_map->values()) {
3648 if (op_node == op_entry) {
3651 if (op_node->inlinks.is_empty()) {
3652 Relation *rel =
graph_->add_new_relation(op_cow, op_node,
"Copy-on-Eval Dependency");
3653 rel->
flag |= rel_flag;
3656 bool has_same_comp_dependency =
false;
3657 for (
Relation *rel_current : op_node->inlinks) {
3663 has_same_comp_dependency =
true;
3667 if (!has_same_comp_dependency) {
3668 Relation *rel =
graph_->add_new_relation(op_cow, op_node,
"Copy-on-Eval Dependency");
3669 rel->
flag |= rel_flag;
3685 ID *object_data_id = (
ID *)object->
data;
3686 if (object_data_id !=
nullptr) {
3707 if (animation_data !=
nullptr) {
3708 if (animation_data->
action !=
nullptr) {
3722void DepsgraphRelationBuilder::modifier_walk(
void *user_data,
3727 BuilderWalkUserData *
data = (BuilderWalkUserData *)user_data;
3729 if (
id ==
nullptr) {
3732 data->builder->build_id(
id);
3735void DepsgraphRelationBuilder::constraint_walk(
bConstraint * ,
3740 BuilderWalkUserData *
data = (BuilderWalkUserData *)user_data;
3742 if (
id ==
nullptr) {
3745 data->builder->build_id(
id);
Functions and classes to work with Actions.
Blender kernel action and pose functionality.
bPoseChannel * BKE_pose_channel_find_name(const bPose *pose, const char *name)
AnimData * BKE_animdata_from_id(const ID *id)
#define FOREACH_COLLECTION_OBJECT_RECURSIVE_END
#define FOREACH_COLLECTION_VISIBLE_OBJECT_RECURSIVE_BEGIN(_collection, _object, _mode)
#define FOREACH_COLLECTION_OBJECT_RECURSIVE_BEGIN(_collection, _object)
#define FOREACH_COLLECTION_VISIBLE_OBJECT_RECURSIVE_END
void BKE_constraint_targets_flush(struct bConstraint *con, struct ListBase *targets, bool no_copy)
int BKE_constraint_targets_get(struct bConstraint *con, struct ListBase *r_targets)
bool BKE_constraint_target_uses_bbone(struct bConstraint *con, struct bConstraintTarget *ct)
const bConstraintTypeInfo * BKE_constraint_typeinfo_get(struct bConstraint *con)
void BKE_constraints_id_loop(struct ListBase *list, ConstraintIDFunc func, const int flag, void *userdata)
bool BKE_driver_expression_depends_on_time(struct ChannelDriver *driver)
bool driver_get_target_property(const DriverTargetContext *driver_target_context, struct DriverVar *dvar, struct DriverTarget *dtar, struct PointerRNA *r_prop)
#define DRIVER_TARGETS_USED_LOOPER_BEGIN(dvar)
#define DRIVER_TARGETS_LOOPER_END
void BKE_gpencil_modifiers_foreach_ID_link(struct Object *ob, GreasePencilIDWalkFunc walk, void *user_data)
Low-level operations for grease pencil.
void IDP_foreach_property(IDProperty *id_property_root, int type_filter, blender::FunctionRef< void(IDProperty *id_property)> callback)
bool BKE_image_user_id_has_animation(ID *id)
Key * BKE_key_from_id(ID *id)
Key * BKE_key_from_object(Object *ob)
void BKE_view_layer_synced_ensure(const Scene *scene, ViewLayer *view_layer)
ViewLayer * BKE_view_layer_default_render(const Scene *scene)
ListBase * BKE_view_layer_object_bases_get(ViewLayer *view_layer)
LibraryForeachIDCallbackFlag
General operations, lookup, etc. for materials.
short * BKE_object_material_len_p(Object *ob)
Material *** BKE_object_material_array_p(Object *ob)
Object * BKE_mball_basis_find(Scene *scene, Object *ob)
bool BKE_modifier_depends_ontime(Scene *scene, ModifierData *md)
const ModifierTypeInfo * BKE_modifier_get_info(ModifierType type)
void void void BKE_modifiers_foreach_ID_link(Object *ob, IDWalkFunc walk, void *user_data)
bool BKE_nlatrack_is_enabled(const AnimData &adt, const NlaTrack &nlt)
General operations, lookup, etc. for blender objects.
bool BKE_ptcache_object_has(struct Scene *scene, struct Object *ob, int duplis)
void BKE_ptcache_foreach_object_cache(struct Object &ob, struct Scene &scene, bool duplis, PointCacheIdFn fn)
#define PTCACHE_TYPE_RIGIDBODY
API for Blender-side Rigid Body stuff.
void BKE_shaderfx_foreach_ID_link(struct Object *ob, ShaderFxIDWalkFunc walk, void *user_data)
bool BKE_shaderfx_depends_ontime(struct ShaderFxData *fx)
const ShaderFxTypeInfo * BKE_shaderfx_get_info(ShaderFxType type)
#define BLI_assert_msg(a, msg)
#define LISTBASE_FOREACH(type, var, list)
BLI_INLINE bool BLI_listbase_is_empty(const ListBase *lb)
@ DAG_EVAL_NEED_SHRINKWRAP_BOUNDARY
@ DAG_EVAL_NEED_CURVE_PATH
@ DTAR_CONTEXT_PROPERTY_ACTIVE_SCENE
struct DriverVar DriverVar
struct DriverTarget DriverTarget
struct ChannelDriver ChannelDriver
@ eBoidRuleType_FollowLeader
Object groups, one object can be in many groups at once.
@ CONSTRAINT_TYPE_FOLLOWTRACK
@ CONSTRAINT_TYPE_OBJECTSOLVER
@ CONSTRAINT_TYPE_ARMATURE
@ CONSTRAINT_TYPE_LOCLIKE
@ CONSTRAINT_TYPE_SHRINKWRAP
@ CONSTRAINT_TYPE_CAMERASOLVER
@ CONSTRAINT_TYPE_GEOMETRY_ATTRIBUTE
@ CONSTRAINT_TYPE_ROTLIKE
@ CONSTRAINT_TYPE_SPLINEIK
@ CONSTRAINT_TYPE_KINEMATIC
@ CONSTRAINT_TYPE_TRANSLIKE
@ CONSTRAINT_TYPE_CLAMPTO
@ CONSTRAINT_TYPE_FOLLOWPATH
@ CONSTRAINT_TYPE_SIZELIKE
@ CONSTRAINT_TYPE_TRANSFORM_CACHE
#define CD_MASK_ORIGINDEX
#define CD_MASK_MDEFORMVERT
@ MOD_SHRINKWRAP_TARGET_PROJECT
@ MOD_SHRINKWRAP_NEAREST_VERTEX
@ eModifierType_Collision
@ NTREE_RUNTIME_FLAG_HAS_IMAGE_ANIMATION
@ SHD_ATTRIBUTE_VIEW_LAYER
Object is a sort of wrapper for general info.
#define OB_TYPE_IS_GEOMETRY(_type)
struct ParticleSettings ParticleSettings
struct ParticleSystem ParticleSystem
Types and defines for representing Rigid Body entities.
@ eSeqModifierType_Compositor
BMesh const char void * data
btSequentialImpulseConstraintSolverMt int btPersistentManifold int btTypedConstraint ** constraints
constexpr bool startswith(StringRef prefix) const
blender::Span< const Layer * > layers() const
bool is_action_legacy() const
Slot * slot_for_handle(slot_handle_t handle)
const Channelbag * channelbag_for_slot(const Slot &slot) const
@ TAG_COLLECTION_CHILDREN_HIERARCHY
virtual bool check_pchan_has_bbone_segments(const Object *object, const bPoseChannel *pchan)
virtual bool need_pull_base_into_graph(const Base *base)
static const char * get_rna_path_relative_to_scene_camera(const Scene *scene, const PointerRNA &target_prop, const char *rna_path)
DepsgraphBuilder(Main *bmain, Depsgraph *graph, DepsgraphBuilderCache *cache)
virtual void build_driver_rna_path_variable(const OperationKey &driver_key, const RNAPathKey &self_key, ID *target_id, const PointerRNA &target_prop, const char *rna_path)
void add_particle_collision_relations(const OperationKey &key, Object *object, Collection *collection, const char *name)
virtual void build_sound(bSound *sound)
virtual void build_animdata_action_targets(ID *id, int32_t slot_handle, ComponentKey &adt_key, OperationNode *operation_from, bAction *action)
Relation * add_depends_on_transform_relation(ID *id, const KeyTo &key_to, const char *description, int flags=0)
virtual void build_freestyle_linestyle(FreestyleLineStyle *linestyle)
virtual void build_collection(LayerCollection *from_layer_collection, Collection *collection)
virtual void build_scene_audio(Scene *scene)
virtual void build_image(Image *image)
virtual void build_driver_id_property(const PointerRNA &target_prop, const char *rna_path_from_target_prop)
virtual void build_copy_on_write_relations()
virtual void build_object_layer_component_relations(Object *object)
virtual void build_object_from_view_layer_base(Object *object)
virtual void build_driver(ID *id, FCurve *fcurve)
virtual void build_dimensions(Object *object)
virtual void build_animation_images(ID *id)
virtual void build_driver_data(ID *id, FCurve *fcurve)
virtual void build_nested_nodetree(ID *owner, bNodeTree *ntree)
virtual void build_nodetree_socket(bNodeSocket *socket)
virtual void build_light(Light *lamp)
virtual void build_action(bAction *action)
virtual void build_material(Material *ma, ID *owner=nullptr)
virtual void build_speaker(Speaker *speaker)
virtual void build_animdata_force(ID *id)
TimeSourceNode * get_node(const TimeSourceKey &key) const
bool is_same_nodetree_node_dependency(const KeyFrom &key_from, const KeyTo &key_to)
virtual void build_scene_speakers(Scene *scene, ViewLayer *view_layer)
OperationNode * find_node(const OperationKey &key) const
virtual void build_armature(bArmature *armature)
virtual void build_armature_bone_collections(blender::Span< BoneCollection * > collections)
virtual void build_armature_bones(ListBase *bones)
virtual void build_object_pointcache(Object *object)
virtual void build_constraints(ID *id, NodeType component_type, const char *component_subdata, ListBase *constraints, RootPChanMap *root_map)
virtual void build_mask(Mask *mask)
virtual void build_object_modifiers(Object *object)
virtual void build_vfont(VFont *vfont)
virtual void build_animdata_curves_targets(ID *id, ComponentKey &adt_key, OperationNode *operation_from, ListBase *curves)
virtual void build_camera(Camera *camera)
virtual void build_object_data_light(Object *object)
virtual void build_world(World *world)
void add_customdata_mask(Object *object, const DEGCustomDataMeshMasks &customdata_masks)
bool is_same_bone_dependency(const KeyFrom &key_from, const KeyTo &key_to)
virtual void build_scene_sequencer(Scene *scene)
virtual void build_object_data_camera(Object *object)
virtual void build_animdata(ID *id)
virtual void build_object_data_geometry(Object *object)
DepsgraphRelationBuilder(Main *bmain, Depsgraph *graph, DepsgraphBuilderCache *cache)
virtual void build_object_data_lightprobe(Object *object)
virtual void build_particle_settings(ParticleSettings *part)
virtual void build_object_light_linking(Object *emitter)
virtual void build_texture(Tex *tex)
void add_special_eval_flag(ID *id, uint32_t flag)
virtual void build_generic_id(ID *id)
virtual void build_driver_scene_camera_variable(const OperationKey &driver_key, const RNAPathKey &self_key, Scene *scene, const char *rna_path)
virtual void build_object(Object *object)
virtual void build_movieclip(MovieClip *clip)
virtual void build_nodetree(bNodeTree *ntree)
Relation * add_relation(const KeyFrom &key_from, const KeyTo &key_to, const char *description, int flags=0)
virtual void build_object_data_geometry_datablock(ID *obdata)
virtual void build_animdata_fcurve_target(ID *id, PointerRNA id_ptr, ComponentKey &adt_key, OperationNode *operation_from, FCurve *fcu)
void add_particle_forcefield_relations(const OperationKey &key, Object *object, ParticleSystem *psys, EffectorWeights *eff, bool add_absorption, const char *name)
virtual void build_rigidbody(Scene *scene)
virtual void build_nested_datablock(ID *owner, ID *id, bool flush_cow_changes)
virtual void build_particle_system_visualization_object(Object *object, ParticleSystem *psys, Object *draw_object)
virtual void build_lightprobe(LightProbe *probe)
void add_visibility_relation(ID *id_from, ID *id_to)
virtual void build_driver_variables(ID *id, FCurve *fcurve)
virtual void build_object_instance_collection(Object *object)
virtual void build_nested_shapekey(ID *owner, Key *key)
virtual void build_object_parent(Object *object)
virtual void build_scene_parameters(Scene *scene)
virtual void build_parameters(ID *id)
bool has_node(const ComponentKey &key) const
virtual void build_shapekeys(Key *key)
virtual void build_object_data_speaker(Object *object)
virtual void build_light_linking_collection(Object *emitter, Collection *collection)
virtual void build_rig(Object *object)
Relation * add_operation_relation(OperationNode *node_from, OperationNode *node_to, const char *description, int flags=0)
virtual void build_object_data(Object *object)
virtual void build_animdata_drivers(ID *id)
virtual void build_id(ID *id)
virtual void build_idproperties(IDProperty *id_property)
virtual void build_materials(ID *owner, Material **materials, int num_materials)
virtual void build_animdata_curves(ID *id)
virtual void build_cachefile(CacheFile *cache_file)
virtual void build_object_shading(Object *object)
DepsNodeHandle create_node_handle(const KeyType &key, const char *default_name="")
virtual void build_animdata_nlastrip_targets(ID *id, ComponentKey &adt_key, OperationNode *operation_from, ListBase *strips)
Relation * add_time_relation(TimeSourceNode *timesrc, Node *node_to, const char *description, int flags=0)
virtual void build_particle_systems(Object *object)
#define DEG_DEBUG_PRINTF(depsgraph, type,...)
TEX_TEMPLATE DataVec texture(T, FltCoord, float=0.0f) RET
ccl_device_inline float2 mask(const MaskType mask, const float2 a)
bNodeTree ** node_tree_ptr_from_id(ID *id)
@ RELATION_FLAG_FLUSH_USER_EDIT_ONLY
@ RELATION_CHECK_BEFORE_ADD
@ RELATION_NO_VISIBILITY_CHANGE
@ NTREE_GEOMETRY_PREPROCESS
bool rna_prop_affects_parameters_node(const PointerRNA *ptr, const PropertyRNA *prop)
static const ModifierData * get_latter_modifier(const ModifierData *md1, const ModifierData *md2)
ListBase * build_collision_relations(Depsgraph *graph, Collection *collection, uint modifier_type)
static bool rigidbody_object_depends_on_evaluated_geometry(const RigidBodyOb *rbo)
static bool strip_build_prop_cb(Strip *strip, void *user_data)
@ TRANSFORM_SIMULATION_INIT
@ OBJECT_FROM_LAYER_ENTRY
@ RIGIDBODY_TRANSFORM_COPY
@ SYNCHRONIZE_TO_ORIGINAL
@ PARTICLE_SETTINGS_RESET
@ NTREE_GEOMETRY_PREPROCESS
ListBase * build_effector_relations(Depsgraph *graph, Collection *collection)
const char * operationCodeAsString(OperationCode opcode)
bool deg_eval_copy_is_needed(const ID *id_orig)
bool data_path_maybe_shared(const ID &id, const StringRef data_path)
void foreach_strip(ListBase *seqbase, ForEachFunc callback, void *user_data)
bool RNA_struct_is_a(const StructRNA *type, const StructRNA *srna)
bool RNA_pointer_is_null(const PointerRNA *ptr)
const char * RNA_property_identifier(const PropertyRNA *prop)
PointerRNA RNA_id_pointer_create(ID *id)
bool RNA_path_resolve_full(const PointerRNA *ptr, const char *path, PointerRNA *r_ptr, PropertyRNA **r_prop, int *r_index)
struct Object * focus_object
struct CameraDOFSettings dof
struct Collection * group
struct ClothCollSettings * coll_parms
struct Object * textoncurve
struct ViewLayer * view_layer
struct Collection * group
struct bNodeTree * nodetree
IDProperty * system_properties
struct bNodeTree * nodetree
struct bNodeTree * nodetree
struct MaterialGPencilStyle * gp_style
struct ModifierData * prev
void(* update_depsgraph)(ModifierData *md, const ModifierUpdateDepsgraphContext *ctx)
struct Collection * instance_collection
struct RigidBodyOb * rigidbody_object
ListBase greasepencil_modifiers
LightLinking * light_linking
struct Collection * collision_group
struct Collection * instance_collection
struct BoidSettings * boids
struct EffectorWeights * effector_weights
struct Object * instance_object
struct ClothModifierData * clmd
struct Collection * group
struct EffectorWeights * effector_weights
struct RigidBodyWorld * rigidbody_world
struct bNodeTree * node_group
void(* update_depsgraph)(struct ShaderFxData *fx, const struct ModifierUpdateDepsgraphContext *ctx)
struct IDProperty * system_properties
struct bNodeTree * nodetree
bNodeTreeRuntimeHandle * runtime
OperationNode * find_operation(OperationIDKey key) const
static DEGCustomDataMeshMasks MaskVert(const uint64_t vert_mask)
static DEGCustomDataMeshMasks MaskFace(const uint64_t face_mask)
static DEGCustomDataMeshMasks MaskEdge(const uint64_t edge_mask)
static DEGCustomDataMeshMasks MaskPoly(const uint64_t poly_mask)
DEGCustomDataMeshMasks customdata_masks
Map< ComponentIDKey, ComponentNode * > components
ComponentNode * find_component(NodeType type, StringRef name="") const
virtual OperationNode * get_entry_operation()
virtual std::string identifier() const
virtual OperationNode * get_exit_operation()
const char * component_name
OperationNode * get_exit_operation() override
OperationNode * get_entry_operation() override
std::string identifier() const override
DepsgraphRelationBuilder * builder
ComponentKey sequencer_key