Changeset View
Changeset View
Standalone View
Standalone View
source/blender/depsgraph/intern/eval/deg_eval_flush.cc
| Show First 20 Lines • Show All 123 Lines • ▼ Show 20 Lines | if (comp_node->custom_flags == COMPONENT_STATE_DONE) { | ||||
| return; | return; | ||||
| } | } | ||||
| comp_node->custom_flags = COMPONENT_STATE_DONE; | comp_node->custom_flags = COMPONENT_STATE_DONE; | ||||
| /* Tag all required operations in component for update, unless this is a | /* Tag all required operations in component for update, unless this is a | ||||
| * special component where we don't want all operations to be tagged. | * special component where we don't want all operations to be tagged. | ||||
| * | * | ||||
| * TODO(sergey): Make this a more generic solution. */ | * TODO(sergey): Make this a more generic solution. */ | ||||
| if (!ELEM(comp_node->type, NodeType::PARTICLE_SETTINGS, NodeType::PARTICLE_SYSTEM)) { | if (!ELEM(comp_node->type, NodeType::PARTICLE_SETTINGS, NodeType::PARTICLE_SYSTEM)) { | ||||
| const bool is_geometry_component = comp_node->type == NodeType::GEOMETRY; | |||||
| for (OperationNode *op : comp_node->operations) { | for (OperationNode *op : comp_node->operations) { | ||||
| /* Special case for the visibility operation in the geometry component. | |||||
| * | |||||
| * This operation is a part of the geometry component so that manual tag for geometry recalc | |||||
| * ensures that the visibility is re-evaluated. This operation is not to be re-evaluated when | |||||
| * an update is flushed to the geometry component via a time dependency or a driver targeting | |||||
| * a modifier. Skipping update in this case avoids CPU time unnecessarily spent looping over | |||||
| * modifiers and looking up operations by name in the visibility evaluation function. */ | |||||
| if (is_geometry_component && op->opcode == OperationCode::VISIBILITY) { | |||||
| continue; | |||||
| } | |||||
| op->flag |= DEPSOP_FLAG_NEEDS_UPDATE; | op->flag |= DEPSOP_FLAG_NEEDS_UPDATE; | ||||
| } | } | ||||
| } | } | ||||
| /* when some target changes bone, we might need to re-run the | /* when some target changes bone, we might need to re-run the | ||||
| * whole IK solver, otherwise result might be unpredictable. */ | * whole IK solver, otherwise result might be unpredictable. */ | ||||
| if (comp_node->type == NodeType::BONE) { | if (comp_node->type == NodeType::BONE) { | ||||
| ComponentNode *pose_comp = id_node->find_component(NodeType::EVAL_POSE); | ComponentNode *pose_comp = id_node->find_component(NodeType::EVAL_POSE); | ||||
| BLI_assert(pose_comp != nullptr); | BLI_assert(pose_comp != nullptr); | ||||
| ▲ Show 20 Lines • Show All 247 Lines • Show Last 20 Lines | |||||