Changeset View
Changeset View
Standalone View
Standalone View
source/blender/depsgraph/intern/node/deg_node.cc
| Show First 20 Lines • Show All 42 Lines • ▼ Show 20 Lines | const char *nodeClassAsString(NodeClass node_class) | ||||
| switch (node_class) { | switch (node_class) { | ||||
| case NodeClass::GENERIC: | case NodeClass::GENERIC: | ||||
| return "GENERIC"; | return "GENERIC"; | ||||
| case NodeClass::COMPONENT: | case NodeClass::COMPONENT: | ||||
| return "COMPONENT"; | return "COMPONENT"; | ||||
| case NodeClass::OPERATION: | case NodeClass::OPERATION: | ||||
| return "OPERATION"; | return "OPERATION"; | ||||
| } | } | ||||
| BLI_assert(!"Unhandled node class, should never happen."); | BLI_assert_msg(0, "Unhandled node class, should never happen."); | ||||
| return "UNKNOWN"; | return "UNKNOWN"; | ||||
| } | } | ||||
| const char *nodeTypeAsString(NodeType type) | const char *nodeTypeAsString(NodeType type) | ||||
| { | { | ||||
| switch (type) { | switch (type) { | ||||
| case NodeType::UNDEFINED: | case NodeType::UNDEFINED: | ||||
| return "UNDEFINED"; | return "UNDEFINED"; | ||||
| ▲ Show 20 Lines • Show All 56 Lines • ▼ Show 20 Lines | case NodeType::GENERIC_DATABLOCK: | ||||
| return "GENERIC_DATABLOCK"; | return "GENERIC_DATABLOCK"; | ||||
| case NodeType::SIMULATION: | case NodeType::SIMULATION: | ||||
| return "SIMULATION"; | return "SIMULATION"; | ||||
| /* Total number of meaningful node types. */ | /* Total number of meaningful node types. */ | ||||
| case NodeType::NUM_TYPES: | case NodeType::NUM_TYPES: | ||||
| return "SpecialCase"; | return "SpecialCase"; | ||||
| } | } | ||||
| BLI_assert(!"Unhandled node type, should never happen."); | BLI_assert_msg(0, "Unhandled node type, should never happen."); | ||||
| return "UNKNOWN"; | return "UNKNOWN"; | ||||
| } | } | ||||
| NodeType nodeTypeFromSceneComponent(eDepsSceneComponentType component) | NodeType nodeTypeFromSceneComponent(eDepsSceneComponentType component) | ||||
| { | { | ||||
| switch (component) { | switch (component) { | ||||
| case DEG_SCENE_COMP_PARAMETERS: | case DEG_SCENE_COMP_PARAMETERS: | ||||
| return NodeType::PARAMETERS; | return NodeType::PARAMETERS; | ||||
| Show All 39 Lines | switch (type) { | ||||
| case NodeType::EVAL_POSE: | case NodeType::EVAL_POSE: | ||||
| case NodeType::BONE: | case NodeType::BONE: | ||||
| case NodeType::SHADING: | case NodeType::SHADING: | ||||
| case NodeType::CACHE: | case NodeType::CACHE: | ||||
| case NodeType::PROXY: | case NodeType::PROXY: | ||||
| case NodeType::SIMULATION: | case NodeType::SIMULATION: | ||||
| return DEG_SCENE_COMP_PARAMETERS; | return DEG_SCENE_COMP_PARAMETERS; | ||||
| } | } | ||||
| BLI_assert(!"Unhandled node type, not suppsed to happen."); | BLI_assert_msg(0, "Unhandled node type, not suppsed to happen."); | ||||
| return DEG_SCENE_COMP_PARAMETERS; | return DEG_SCENE_COMP_PARAMETERS; | ||||
| } | } | ||||
| NodeType nodeTypeFromObjectComponent(eDepsObjectComponentType component_type) | NodeType nodeTypeFromObjectComponent(eDepsObjectComponentType component_type) | ||||
| { | { | ||||
| switch (component_type) { | switch (component_type) { | ||||
| case DEG_OB_COMP_ANY: | case DEG_OB_COMP_ANY: | ||||
| return NodeType::UNDEFINED; | return NodeType::UNDEFINED; | ||||
| ▲ Show 20 Lines • Show All 59 Lines • ▼ Show 20 Lines | switch (type) { | ||||
| case NodeType::BATCH_CACHE: | case NodeType::BATCH_CACHE: | ||||
| case NodeType::DUPLI: | case NodeType::DUPLI: | ||||
| case NodeType::SYNCHRONIZATION: | case NodeType::SYNCHRONIZATION: | ||||
| case NodeType::SIMULATION: | case NodeType::SIMULATION: | ||||
| case NodeType::UNDEFINED: | case NodeType::UNDEFINED: | ||||
| case NodeType::NUM_TYPES: | case NodeType::NUM_TYPES: | ||||
| return DEG_OB_COMP_PARAMETERS; | return DEG_OB_COMP_PARAMETERS; | ||||
| } | } | ||||
| BLI_assert(!"Unhandled node type, not suppsed to happen."); | BLI_assert_msg(0, "Unhandled node type, not suppsed to happen."); | ||||
| return DEG_OB_COMP_PARAMETERS; | return DEG_OB_COMP_PARAMETERS; | ||||
| } | } | ||||
| /******************************************************************************* | /******************************************************************************* | ||||
| * Type information. | * Type information. | ||||
| */ | */ | ||||
| Node::TypeInfo::TypeInfo(NodeType type, const char *type_name, int id_recalc_tag) | Node::TypeInfo::TypeInfo(NodeType type, const char *type_name, int id_recalc_tag) | ||||
| ▲ Show 20 Lines • Show All 78 Lines • Show Last 20 Lines | |||||