Changeset View
Changeset View
Standalone View
Standalone View
source/blender/depsgraph/intern/builder/deg_builder.cc
| Show First 20 Lines • Show All 170 Lines • ▼ Show 20 Lines | void deg_graph_build_flush_visibility(Depsgraph *graph) | ||||
| } | } | ||||
| while (!BLI_stack_is_empty(stack)) { | while (!BLI_stack_is_empty(stack)) { | ||||
| OperationNode *op_node; | OperationNode *op_node; | ||||
| BLI_stack_pop(stack, &op_node); | BLI_stack_pop(stack, &op_node); | ||||
| /* Flush layers to parents. */ | /* Flush layers to parents. */ | ||||
| for (Relation *rel : op_node->inlinks) { | for (Relation *rel : op_node->inlinks) { | ||||
| if (rel->from->type == NodeType::OPERATION) { | if (rel->from->type == NodeType::OPERATION) { | ||||
| OperationNode *op_from = (OperationNode *)rel->from; | OperationNode *op_from = (OperationNode *)rel->from; | ||||
| op_from->owner->affects_directly_visible |= op_node->owner->affects_directly_visible; | ComponentNode *comp_from = op_from->owner; | ||||
| const bool target_directly_visible = op_node->owner->affects_directly_visible; | |||||
| /* Visibility component forces all components of the current ID to be considered as | |||||
| * affecting directly visible. */ | |||||
| if (comp_from->type == NodeType::VISIBILITY) { | |||||
| if (target_directly_visible) { | |||||
| IDNode *id_node_from = comp_from->owner; | |||||
| for (ComponentNode *comp_node : id_node_from->components.values()) { | |||||
| comp_node->affects_directly_visible |= target_directly_visible; | |||||
| } | |||||
| } | |||||
| } | |||||
| else { | |||||
| comp_from->affects_directly_visible |= target_directly_visible; | |||||
| } | |||||
| } | } | ||||
| } | } | ||||
| /* Schedule parent nodes. */ | /* Schedule parent nodes. */ | ||||
| for (Relation *rel : op_node->inlinks) { | for (Relation *rel : op_node->inlinks) { | ||||
| if (rel->from->type == NodeType::OPERATION) { | if (rel->from->type == NodeType::OPERATION) { | ||||
| OperationNode *op_from = (OperationNode *)rel->from; | OperationNode *op_from = (OperationNode *)rel->from; | ||||
| if ((rel->flag & RELATION_FLAG_CYCLIC) == 0) { | if ((rel->flag & RELATION_FLAG_CYCLIC) == 0) { | ||||
| BLI_assert(op_from->num_links_pending > 0); | BLI_assert(op_from->num_links_pending > 0); | ||||
| ▲ Show 20 Lines • Show All 52 Lines • Show Last 20 Lines | |||||