Changeset View
Changeset View
Standalone View
Standalone View
source/blender/depsgraph/intern/depsgraph_build.cc
| Show First 20 Lines • Show All 44 Lines • ▼ Show 20 Lines | |||||
| #include "DEG_depsgraph_debug.h" | #include "DEG_depsgraph_debug.h" | ||||
| #include "DEG_depsgraph_build.h" | #include "DEG_depsgraph_build.h" | ||||
| #include "builder/deg_builder.h" | #include "builder/deg_builder.h" | ||||
| #include "builder/deg_builder_cache.h" | #include "builder/deg_builder_cache.h" | ||||
| #include "builder/deg_builder_cycle.h" | #include "builder/deg_builder_cycle.h" | ||||
| #include "builder/deg_builder_nodes.h" | #include "builder/deg_builder_nodes.h" | ||||
| #include "builder/deg_builder_relations.h" | #include "builder/deg_builder_relations.h" | ||||
| #include "builder/deg_builder_remove_noop.h" | |||||
| #include "builder/deg_builder_transitive.h" | #include "builder/deg_builder_transitive.h" | ||||
| #include "intern/debug/deg_debug.h" | #include "intern/debug/deg_debug.h" | ||||
| #include "intern/node/deg_node.h" | #include "intern/node/deg_node.h" | ||||
| #include "intern/node/deg_node_component.h" | #include "intern/node/deg_node_component.h" | ||||
| #include "intern/node/deg_node_id.h" | #include "intern/node/deg_node_id.h" | ||||
| #include "intern/node/deg_node_operation.h" | #include "intern/node/deg_node_operation.h" | ||||
| ▲ Show 20 Lines • Show All 144 Lines • ▼ Show 20 Lines | static void graph_build_finalize_common(DEG::Depsgraph *deg_graph, Main *bmain) | ||||
| DEG::deg_graph_detect_cycles(deg_graph); | DEG::deg_graph_detect_cycles(deg_graph); | ||||
| /* Simplify the graph by removing redundant relations (to optimize | /* Simplify the graph by removing redundant relations (to optimize | ||||
| * traversal later). */ | * traversal later). */ | ||||
| /* TODO: it would be useful to have an option to disable this in cases where | /* TODO: it would be useful to have an option to disable this in cases where | ||||
| * it is causing trouble. */ | * it is causing trouble. */ | ||||
| if (G.debug_value == 799) { | if (G.debug_value == 799) { | ||||
| DEG::deg_graph_transitive_reduction(deg_graph); | DEG::deg_graph_transitive_reduction(deg_graph); | ||||
| } | } | ||||
| DEG::deg_graph_remove_unused_noops(deg_graph); | |||||
| /* Store pointers to commonly used valuated datablocks. */ | /* Store pointers to commonly used valuated datablocks. */ | ||||
| deg_graph->scene_cow = (Scene *)deg_graph->get_cow_id(°_graph->scene->id); | deg_graph->scene_cow = (Scene *)deg_graph->get_cow_id(°_graph->scene->id); | ||||
| /* Flush visibility layer and re-schedule nodes for update. */ | /* Flush visibility layer and re-schedule nodes for update. */ | ||||
| DEG::deg_graph_build_finalize(bmain, deg_graph); | DEG::deg_graph_build_finalize(bmain, deg_graph); | ||||
| DEG_graph_on_visible_update(bmain, reinterpret_cast<::Depsgraph *>(deg_graph), false); | DEG_graph_on_visible_update(bmain, reinterpret_cast<::Depsgraph *>(deg_graph), false); | ||||
| #if 0 | #if 0 | ||||
| if (!DEG_debug_consistency_check(deg_graph)) { | if (!DEG_debug_consistency_check(deg_graph)) { | ||||
| printf("Consistency validation failed, ABORTING!\n"); | printf("Consistency validation failed, ABORTING!\n"); | ||||
| ▲ Show 20 Lines • Show All 289 Lines • Show Last 20 Lines | |||||