Changeset View
Changeset View
Standalone View
Standalone View
source/blender/depsgraph/intern/depsgraph_tag.cc
| Show First 20 Lines • Show All 223 Lines • ▼ Show 20 Lines | switch (tag) { | ||||
| case ID_RECALC_AUDIO_MUTE: | case ID_RECALC_AUDIO_MUTE: | ||||
| case ID_RECALC_AUDIO_LISTENER: | case ID_RECALC_AUDIO_LISTENER: | ||||
| case ID_RECALC_AUDIO: | case ID_RECALC_AUDIO: | ||||
| *component_type = NodeType::AUDIO; | *component_type = NodeType::AUDIO; | ||||
| break; | break; | ||||
| case ID_RECALC_PARAMETERS: | case ID_RECALC_PARAMETERS: | ||||
| *component_type = NodeType::PARAMETERS; | *component_type = NodeType::PARAMETERS; | ||||
| break; | break; | ||||
| case ID_RECALC_TIME: | |||||
| BLI_assert(!"Should be handled outside of this function"); | |||||
| break; | |||||
| 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(!"Should not happen"); | ||||
| break; | break; | ||||
| } | } | ||||
| } | } | ||||
| void id_tag_update_ntree_special( | void id_tag_update_ntree_special( | ||||
| ▲ Show 20 Lines • Show All 115 Lines • ▼ Show 20 Lines | static void graph_id_tag_update_single_flag(Main *bmain, | ||||
| eUpdateSource update_source) | eUpdateSource update_source) | ||||
| { | { | ||||
| if (tag == ID_RECALC_EDITORS) { | if (tag == ID_RECALC_EDITORS) { | ||||
| if (graph != NULL) { | if (graph != NULL) { | ||||
| depsgraph_update_editors_tag(bmain, graph, id); | depsgraph_update_editors_tag(bmain, graph, id); | ||||
| } | } | ||||
| return; | return; | ||||
| } | } | ||||
| else if (tag == ID_RECALC_TIME) { | |||||
| if (graph != NULL) { | |||||
| graph->need_update_time = true; | |||||
| } | |||||
| return; | |||||
| } | |||||
| /* Get description of what is to be tagged. */ | /* Get description of what is to be tagged. */ | ||||
| NodeType component_type; | NodeType component_type; | ||||
| OperationCode operation_code; | OperationCode operation_code; | ||||
| depsgraph_tag_to_component_opcode(id, tag, &component_type, &operation_code); | depsgraph_tag_to_component_opcode(id, tag, &component_type, &operation_code); | ||||
| /* Check whether we've got something to tag. */ | /* Check whether we've got something to tag. */ | ||||
| if (component_type == NodeType::UNDEFINED) { | if (component_type == NodeType::UNDEFINED) { | ||||
| /* Given ID does not support tag. */ | /* Given ID does not support tag. */ | ||||
| /* TODO(sergey): Shall we raise some panic here? */ | /* TODO(sergey): Shall we raise some panic here? */ | ||||
| ▲ Show 20 Lines • Show All 288 Lines • ▼ Show 20 Lines | switch (flag) { | ||||
| case ID_RECALC_AUDIO_MUTE: | case ID_RECALC_AUDIO_MUTE: | ||||
| return "AUDIO_MUTE"; | return "AUDIO_MUTE"; | ||||
| case ID_RECALC_AUDIO_LISTENER: | case ID_RECALC_AUDIO_LISTENER: | ||||
| return "AUDIO_LISTENER"; | return "AUDIO_LISTENER"; | ||||
| case ID_RECALC_AUDIO: | case ID_RECALC_AUDIO: | ||||
| return "AUDIO"; | return "AUDIO"; | ||||
| case ID_RECALC_PARAMETERS: | case ID_RECALC_PARAMETERS: | ||||
| return "PARAMETERS"; | return "PARAMETERS"; | ||||
| case ID_RECALC_TIME: | |||||
| return "TIME"; | |||||
| case ID_RECALC_ALL: | case ID_RECALC_ALL: | ||||
| return "ALL"; | return "ALL"; | ||||
| } | } | ||||
| BLI_assert(!"Unhandled update flag, should never happen!"); | BLI_assert(!"Unhandled update flag, should never happen!"); | ||||
| return "UNKNOWN"; | return "UNKNOWN"; | ||||
| } | } | ||||
| /* Data-Based Tagging */ | /* Data-Based Tagging */ | ||||
| ▲ Show 20 Lines • Show All 132 Lines • Show Last 20 Lines | |||||