Changeset View
Changeset View
Standalone View
Standalone View
source/blender/depsgraph/intern/node/deg_node_component.cc
| Show First 20 Lines • Show All 136 Lines • ▼ Show 20 Lines | |||||
| OperationNode *ComponentNode::get_operation(OperationIDKey key) const | OperationNode *ComponentNode::get_operation(OperationIDKey key) const | ||||
| { | { | ||||
| OperationNode *node = find_operation(key); | OperationNode *node = find_operation(key); | ||||
| if (node == nullptr) { | if (node == nullptr) { | ||||
| fprintf(stderr, | fprintf(stderr, | ||||
| "%s: find_operation(%s) failed\n", | "%s: find_operation(%s) failed\n", | ||||
| this->identifier().c_str(), | this->identifier().c_str(), | ||||
| key.identifier().c_str()); | key.identifier().c_str()); | ||||
| BLI_assert(!"Request for non-existing operation, should not happen"); | BLI_assert_msg(0, "Request for non-existing operation, should not happen"); | ||||
| return nullptr; | return nullptr; | ||||
| } | } | ||||
| return node; | return node; | ||||
| } | } | ||||
| OperationNode *ComponentNode::get_operation(OperationCode opcode, | OperationNode *ComponentNode::get_operation(OperationCode opcode, | ||||
| const char *name, | const char *name, | ||||
| int name_tag) const | int name_tag) const | ||||
| Show All 31 Lines | if (!op_node) { | ||||
| op_node->owner = this; | op_node->owner = this; | ||||
| } | } | ||||
| else { | else { | ||||
| fprintf(stderr, | fprintf(stderr, | ||||
| "add_operation: Operation already exists - %s has %s at %p\n", | "add_operation: Operation already exists - %s has %s at %p\n", | ||||
| this->identifier().c_str(), | this->identifier().c_str(), | ||||
| op_node->identifier().c_str(), | op_node->identifier().c_str(), | ||||
| op_node); | op_node); | ||||
| BLI_assert(!"Should not happen!"); | BLI_assert_msg(0, "Should not happen!"); | ||||
| } | } | ||||
| /* attach extra data */ | /* attach extra data */ | ||||
| op_node->evaluate = op; | op_node->evaluate = op; | ||||
| op_node->opcode = opcode; | op_node->opcode = opcode; | ||||
| op_node->name = name; | op_node->name = name; | ||||
| op_node->name_tag = name_tag; | op_node->name_tag = name_tag; | ||||
| ▲ Show 20 Lines • Show All 177 Lines • Show Last 20 Lines | |||||