Changeset View
Changeset View
Standalone View
Standalone View
source/blender/depsgraph/intern/depsgraph_tag.cc
| Show First 20 Lines • Show All 111 Lines • ▼ Show 20 Lines | else if (id_type == ID_OB) { | ||||
| *operation_code = OperationCode::OBJECT_FROM_LAYER_ENTRY; | *operation_code = OperationCode::OBJECT_FROM_LAYER_ENTRY; | ||||
| } | } | ||||
| else if (id_type == ID_MC) { | else if (id_type == ID_MC) { | ||||
| *component_type = NodeType::BATCH_CACHE; | *component_type = NodeType::BATCH_CACHE; | ||||
| *operation_code = OperationCode::MOVIECLIP_SELECT_UPDATE; | *operation_code = OperationCode::MOVIECLIP_SELECT_UPDATE; | ||||
| } | } | ||||
| else if (is_selectable_data_id_type(id_type)) { | else if (is_selectable_data_id_type(id_type)) { | ||||
| *component_type = NodeType::BATCH_CACHE; | *component_type = NodeType::BATCH_CACHE; | ||||
| *operation_code = OperationCode::BATCH_UPDATE_SELECT; | *operation_code = OperationCode::GEOMETRY_SELECT_UPDATE; | ||||
| } | } | ||||
| else { | else { | ||||
| *component_type = NodeType::COPY_ON_WRITE; | *component_type = NodeType::COPY_ON_WRITE; | ||||
| *operation_code = OperationCode::COPY_ON_WRITE; | *operation_code = OperationCode::COPY_ON_WRITE; | ||||
| } | } | ||||
| } | } | ||||
| void depsgraph_base_flags_tag_to_component_opcode(const ID *id, | void depsgraph_base_flags_tag_to_component_opcode(const ID *id, | ||||
| Show All 34 Lines | if (tag == 0) { | ||||
| return; | return; | ||||
| } | } | ||||
| switch (tag) { | switch (tag) { | ||||
| case ID_RECALC_TRANSFORM: | case ID_RECALC_TRANSFORM: | ||||
| *component_type = NodeType::TRANSFORM; | *component_type = NodeType::TRANSFORM; | ||||
| break; | break; | ||||
| case ID_RECALC_GEOMETRY: | case ID_RECALC_GEOMETRY: | ||||
| depsgraph_geometry_tag_to_component(id, component_type); | depsgraph_geometry_tag_to_component(id, component_type); | ||||
| *operation_code = OperationCode::GEOMETRY_EVAL_INIT; | |||||
| break; | |||||
| case ID_RECALC_GEOMETRY_DEFORM: | |||||
| depsgraph_geometry_tag_to_component(id, component_type); | |||||
| *operation_code = OperationCode::GEOMETRY_EVAL_DEFORM; | |||||
| break; | break; | ||||
| case ID_RECALC_ANIMATION: | case ID_RECALC_ANIMATION: | ||||
| *component_type = NodeType::ANIMATION; | *component_type = NodeType::ANIMATION; | ||||
| break; | break; | ||||
| case ID_RECALC_PSYS_REDO: | case ID_RECALC_PSYS_REDO: | ||||
| case ID_RECALC_PSYS_RESET: | case ID_RECALC_PSYS_RESET: | ||||
| case ID_RECALC_PSYS_CHILD: | case ID_RECALC_PSYS_CHILD: | ||||
| case ID_RECALC_PSYS_PHYS: | case ID_RECALC_PSYS_PHYS: | ||||
| ▲ Show 20 Lines • Show All 49 Lines • ▼ Show 20 Lines | case ID_RECALC_PARAMETERS: | ||||
| *component_type = NodeType::PARAMETERS; | *component_type = NodeType::PARAMETERS; | ||||
| break; | break; | ||||
| case ID_RECALC_SOURCE: | case ID_RECALC_SOURCE: | ||||
| *component_type = NodeType::PARAMETERS; | *component_type = NodeType::PARAMETERS; | ||||
| break; | break; | ||||
| case ID_RECALC_GEOMETRY_ALL_MODES: | case ID_RECALC_GEOMETRY_ALL_MODES: | ||||
| case ID_RECALC_ALL: | case ID_RECALC_ALL: | ||||
| case ID_RECALC_PSYS_ALL: | case ID_RECALC_PSYS_ALL: | ||||
| BLI_assert(!"Should not happen"); | BLI_assert_msg(0, "Should not happen"); | ||||
| break; | break; | ||||
| case ID_RECALC_TAG_FOR_UNDO: | case ID_RECALC_TAG_FOR_UNDO: | ||||
| break; /* Must be ignored by depsgraph. */ | break; /* Must be ignored by depsgraph. */ | ||||
| } | } | ||||
| } | } | ||||
| void id_tag_update_ntree_special( | void id_tag_update_ntree_special( | ||||
| Main *bmain, Depsgraph *graph, ID *id, int flag, eUpdateSource update_source) | Main *bmain, Depsgraph *graph, ID *id, int flag, eUpdateSource update_source) | ||||
| ▲ Show 20 Lines • Show All 202 Lines • ▼ Show 20 Lines | case DEG_UPDATE_SOURCE_TIME: | ||||
| return "TIME"; | return "TIME"; | ||||
| case DEG_UPDATE_SOURCE_USER_EDIT: | case DEG_UPDATE_SOURCE_USER_EDIT: | ||||
| return "USER_EDIT"; | return "USER_EDIT"; | ||||
| case DEG_UPDATE_SOURCE_RELATIONS: | case DEG_UPDATE_SOURCE_RELATIONS: | ||||
| return "RELATIONS"; | return "RELATIONS"; | ||||
| case DEG_UPDATE_SOURCE_VISIBILITY: | case DEG_UPDATE_SOURCE_VISIBILITY: | ||||
| return "VISIBILITY"; | return "VISIBILITY"; | ||||
| } | } | ||||
| BLI_assert(!"Should never happen."); | BLI_assert_msg(0, "Should never happen."); | ||||
| return "UNKNOWN"; | return "UNKNOWN"; | ||||
| } | } | ||||
| int deg_recalc_flags_for_legacy_zero() | int deg_recalc_flags_for_legacy_zero() | ||||
| { | { | ||||
| return ID_RECALC_ALL & | return ID_RECALC_ALL & | ||||
| ~(ID_RECALC_PSYS_ALL | ID_RECALC_ANIMATION | ID_RECALC_SOURCE | ID_RECALC_EDITORS); | ~(ID_RECALC_PSYS_ALL | ID_RECALC_ANIMATION | ID_RECALC_SOURCE | ID_RECALC_EDITORS); | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 239 Lines • ▼ Show 20 Lines | |||||
| { | { | ||||
| switch (flag) { | switch (flag) { | ||||
| case ID_RECALC_TRANSFORM: | case ID_RECALC_TRANSFORM: | ||||
| return "TRANSFORM"; | return "TRANSFORM"; | ||||
| case ID_RECALC_GEOMETRY: | case ID_RECALC_GEOMETRY: | ||||
| return "GEOMETRY"; | return "GEOMETRY"; | ||||
| case ID_RECALC_GEOMETRY_ALL_MODES: | case ID_RECALC_GEOMETRY_ALL_MODES: | ||||
| return "GEOMETRY_ALL_MODES"; | return "GEOMETRY_ALL_MODES"; | ||||
| case ID_RECALC_GEOMETRY_DEFORM: | |||||
| return "GEOMETRY_DEFORM"; | |||||
| case ID_RECALC_ANIMATION: | case ID_RECALC_ANIMATION: | ||||
| return "ANIMATION"; | return "ANIMATION"; | ||||
| case ID_RECALC_PSYS_REDO: | case ID_RECALC_PSYS_REDO: | ||||
| return "PSYS_REDO"; | return "PSYS_REDO"; | ||||
| case ID_RECALC_PSYS_RESET: | case ID_RECALC_PSYS_RESET: | ||||
| return "PSYS_RESET"; | return "PSYS_RESET"; | ||||
| case ID_RECALC_PSYS_CHILD: | case ID_RECALC_PSYS_CHILD: | ||||
| return "PSYS_CHILD"; | return "PSYS_CHILD"; | ||||
| ▲ Show 20 Lines • Show All 193 Lines • Show Last 20 Lines | |||||