Revert "Depsgraph: Remove redundant copy-on-write operations"
This reverts commit76fd41e9db
. This should have been reverted along with0f95f51361
, since this change by itself is causing crashes when the depsgraph accesses a non-existent copy-on-write component. Ref T84717
This commit is contained in:
parent
a51ff5208b
commit
133966423a
|
@ -155,7 +155,6 @@ IDNode *DepsgraphNodeBuilder::add_id_node(ID *id)
|
|||
{
|
||||
BLI_assert(id->session_uuid != MAIN_ID_SESSION_UUID_UNSET);
|
||||
|
||||
const ID_Type id_type = GS(id->name);
|
||||
IDNode *id_node = nullptr;
|
||||
ID *id_cow = nullptr;
|
||||
IDComponentsMask previously_visible_components_mask = 0;
|
||||
|
@ -174,8 +173,10 @@ IDNode *DepsgraphNodeBuilder::add_id_node(ID *id)
|
|||
id_node->previously_visible_components_mask = previously_visible_components_mask;
|
||||
id_node->previous_eval_flags = previous_eval_flags;
|
||||
id_node->previous_customdata_masks = previous_customdata_masks;
|
||||
/* NOTE: Zero number of components indicates that ID node was just created. */
|
||||
if (id_node->components.is_empty() && deg_copy_on_write_is_needed(id_type)) {
|
||||
/* Currently all ID nodes are supposed to have copy-on-write logic.
|
||||
*
|
||||
* NOTE: Zero number of components indicates that ID node was just created. */
|
||||
if (id_node->components.is_empty()) {
|
||||
ComponentNode *comp_cow = id_node->add_component(NodeType::COPY_ON_WRITE);
|
||||
OperationNode *op_cow = comp_cow->add_operation(
|
||||
function_bind(deg_evaluate_copy_on_write, _1, id_node),
|
||||
|
|
|
@ -2788,13 +2788,7 @@ void DepsgraphRelationBuilder::build_nested_shapekey(ID *owner, Key *key)
|
|||
void DepsgraphRelationBuilder::build_copy_on_write_relations(IDNode *id_node)
|
||||
{
|
||||
ID *id_orig = id_node->id_orig;
|
||||
|
||||
const ID_Type id_type = GS(id_orig->name);
|
||||
|
||||
if (!deg_copy_on_write_is_needed(id_type)) {
|
||||
return;
|
||||
}
|
||||
|
||||
TimeSourceKey time_source_key;
|
||||
OperationKey copy_on_write_key(id_orig, NodeType::COPY_ON_WRITE, OperationCode::COPY_ON_WRITE);
|
||||
/* XXX: This is a quick hack to make Alt-A to work. */
|
||||
|
|
Loading…
Reference in New Issue