Changeset View
Changeset View
Standalone View
Standalone View
source/blender/depsgraph/intern/depsgraph_tag.cc
| Show First 20 Lines • Show All 103 Lines • ▼ Show 20 Lines | if (id_type == ID_SCE) { | ||||
| * TODO(sergey): We can introduce explicit exit operation which | * TODO(sergey): We can introduce explicit exit operation which | ||||
| * does nothing and which is only used to cascade flush down the | * does nothing and which is only used to cascade flush down the | ||||
| * road. */ | * road. */ | ||||
| *component_type = NodeType::LAYER_COLLECTIONS; | *component_type = NodeType::LAYER_COLLECTIONS; | ||||
| *operation_code = OperationCode::VIEW_LAYER_EVAL; | *operation_code = OperationCode::VIEW_LAYER_EVAL; | ||||
| } | } | ||||
| else if (id_type == ID_OB) { | else if (id_type == ID_OB) { | ||||
| *component_type = NodeType::OBJECT_FROM_LAYER; | *component_type = NodeType::OBJECT_FROM_LAYER; | ||||
| *operation_code = OperationCode::OBJECT_BASE_FLAGS; | *operation_code = OperationCode::OBJECT_FROM_LAYER_ENTRY; | ||||
sergey: Think we should tag `OBJECT_BASE_FLAGS` here, as this is what is being modified.
The fact that… | |||||
sybrenAuthorUnsubmitted Done Inline ActionsI was in doubt what to do here, so thanks for the clarification. And yes, it would be fun to think of an algorithm to reduce the no-op nodes further. sybren: I was in doubt what to do here, so thanks for the clarification.
And yes, it would be fun to… | |||||
| } | } | ||||
| 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::GEOMETRY_SELECT_UPDATE; | *operation_code = OperationCode::GEOMETRY_SELECT_UPDATE; | ||||
| Show All 10 Lines | |||||
| { | { | ||||
| const ID_Type id_type = GS(id->name); | const ID_Type id_type = GS(id->name); | ||||
| if (id_type == ID_SCE) { | if (id_type == ID_SCE) { | ||||
| *component_type = NodeType::LAYER_COLLECTIONS; | *component_type = NodeType::LAYER_COLLECTIONS; | ||||
| *operation_code = OperationCode::VIEW_LAYER_EVAL; | *operation_code = OperationCode::VIEW_LAYER_EVAL; | ||||
| } | } | ||||
| else if (id_type == ID_OB) { | else if (id_type == ID_OB) { | ||||
| *component_type = NodeType::OBJECT_FROM_LAYER; | *component_type = NodeType::OBJECT_FROM_LAYER; | ||||
| *operation_code = OperationCode::OBJECT_BASE_FLAGS; | *operation_code = OperationCode::OBJECT_FROM_LAYER_ENTRY; | ||||
sergeyUnsubmitted Done Inline ActionsSame as above. sergey: Same as above. | |||||
| } | } | ||||
| } | } | ||||
| OperationCode psysTagToOperationCode(IDRecalcFlag tag) | OperationCode psysTagToOperationCode(IDRecalcFlag tag) | ||||
| { | { | ||||
| if (tag == ID_RECALC_PSYS_RESET) { | if (tag == ID_RECALC_PSYS_RESET) { | ||||
| return OperationCode::PARTICLE_SETTINGS_RESET; | return OperationCode::PARTICLE_SETTINGS_RESET; | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 711 Lines • Show Last 20 Lines | |||||
Think we should tag OBJECT_BASE_FLAGS here, as this is what is being modified.
The fact that there is ENTRY/EXIT is kind of details. The way how update flush works is that the entire component is tagged anyway. Sticking to OBJECT_BASE_FLAGS allows us:
To elaborate a bit on the latter point. Having all those explicit ENTRY/EXIT and some other "utility" operations allows to simplify graph building process since you don't need to worry too much about "hey, if there is no FOO used in BAR, i should use node BAZ, otherwise i need to use node DOOMOP". However, these nodes are a burden for evaluation. So one might imagine that it's totally possible to write graph minimizer which will rewire some relations and will eliminate the no-op nodes. Exact algorithm is yet to be formalized, but I feel it's totally doable and is something we should implement eventually.