Fix T61231: File open and undo looses unkeyed changes
Only flush copy-on-write to animation when user makes changes.
This commit is contained in:
@@ -2534,11 +2534,23 @@ void DepsgraphRelationBuilder::build_copy_on_write_relations(IDNode *id_node)
|
|||||||
* CoW update when it's changed) but yet guarantee evaluation order
|
* CoW update when it's changed) but yet guarantee evaluation order
|
||||||
* with objects which are using that action. */
|
* with objects which are using that action. */
|
||||||
if (comp_node->type == NodeType::PARAMETERS ||
|
if (comp_node->type == NodeType::PARAMETERS ||
|
||||||
comp_node->type == NodeType::LAYER_COLLECTIONS ||
|
comp_node->type == NodeType::LAYER_COLLECTIONS)
|
||||||
(comp_node->type == NodeType::ANIMATION && id_type == ID_AC))
|
|
||||||
{
|
{
|
||||||
rel_flag &= ~RELATION_FLAG_NO_FLUSH;
|
rel_flag &= ~RELATION_FLAG_NO_FLUSH;
|
||||||
}
|
}
|
||||||
|
if (comp_node->type == NodeType::ANIMATION && id_type == ID_AC) {
|
||||||
|
rel_flag &= ~RELATION_FLAG_NO_FLUSH;
|
||||||
|
/* NOTE: We only allow flush on user edits. If the action block is
|
||||||
|
* just brought into the dependency graph it is either due to
|
||||||
|
* initial graph construction or due to some property got animated.
|
||||||
|
* In first case all the related datablocks will be tagged for an
|
||||||
|
* update as well. In the second case it is up to the editing
|
||||||
|
* function to tag changed datablock.
|
||||||
|
*
|
||||||
|
* This logic allows to preserve unkeyed changes on file load and on
|
||||||
|
* undo. */
|
||||||
|
rel_flag |= RELATION_FLAG_FLUSH_USER_EDIT_ONLY;
|
||||||
|
}
|
||||||
/* All entry operations of each component should wait for a proper
|
/* All entry operations of each component should wait for a proper
|
||||||
* copy of ID. */
|
* copy of ID. */
|
||||||
OperationNode *op_entry = comp_node->get_entry_operation();
|
OperationNode *op_entry = comp_node->get_entry_operation();
|
||||||
|
|||||||
@@ -73,9 +73,9 @@ enum RelationFlag {
|
|||||||
* affected by user input. */
|
* affected by user input. */
|
||||||
RELATION_FLAG_FLUSH_USER_EDIT_ONLY = (1 << 2),
|
RELATION_FLAG_FLUSH_USER_EDIT_ONLY = (1 << 2),
|
||||||
/* The relation can not be killed by the cyclic dependencies solver. */
|
/* The relation can not be killed by the cyclic dependencies solver. */
|
||||||
RELATION_FLAG_GODMODE = (1 << 3),
|
RELATION_FLAG_GODMODE = (1 << 4),
|
||||||
/* Relation will check existance before being added. */
|
/* Relation will check existance before being added. */
|
||||||
RELATION_CHECK_BEFORE_ADD = (1 << 4),
|
RELATION_CHECK_BEFORE_ADD = (1 << 5),
|
||||||
};
|
};
|
||||||
|
|
||||||
/* B depends on A (A -> B) */
|
/* B depends on A (A -> B) */
|
||||||
|
|||||||
Reference in New Issue
Block a user