diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2018-11-07 15:55:29 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2018-11-07 22:58:53 +0300 |
commit | 4779165ca18ae3ced005aad129575b70fc6c4f9d (patch) | |
tree | d1e70f122a31b87ac0137074aa1d561dc3bf1329 /source/blender/editors/space_nla/nla_edit.c | |
parent | a0d8e52b54ea9c27b47ddf96ff51cc934534d40e (diff) |
Fix dpesgraph wrongly refcounting NLA strip actions when duplicating IDs.
NLA strips are users of their action, so we need to pass along ID
management flags.
This commit also cleans up a bit things by passing along ID_CREATE/COPY
flags instead of dummy booleans...
Diffstat (limited to 'source/blender/editors/space_nla/nla_edit.c')
-rw-r--r-- | source/blender/editors/space_nla/nla_edit.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/editors/space_nla/nla_edit.c b/source/blender/editors/space_nla/nla_edit.c index 63de4ec9dea..724a1c072bd 100644 --- a/source/blender/editors/space_nla/nla_edit.c +++ b/source/blender/editors/space_nla/nla_edit.c @@ -1057,7 +1057,7 @@ static int nlaedit_duplicate_exec(bContext *C, wmOperator *op) /* if selected, split the strip at its midpoint */ if (strip->flag & NLASTRIP_FLAG_SELECT) { /* make a copy (assume that this is possible) */ - nstrip = BKE_nlastrip_copy(ac.bmain, strip, linked); + nstrip = BKE_nlastrip_copy(ac.bmain, strip, linked, 0); /* in case there's no space in the track above, or we haven't got a reference to it yet, try adding */ if (BKE_nlatrack_add_strip(nlt->next, nstrip) == 0) { @@ -1242,7 +1242,7 @@ static void nlaedit_split_strip_actclip(Main *bmain, AnimData *adt, NlaTrack *nl /* make a copy (assume that this is possible) and append * it immediately after the current strip */ - nstrip = BKE_nlastrip_copy(bmain, strip, true); + nstrip = BKE_nlastrip_copy(bmain, strip, true, 0); BLI_insertlinkafter(&nlt->strips, strip, nstrip); /* set the endpoint of the first strip and the start of the new strip |