diff options
author | Joshua Leung <aligorith@gmail.com> | 2014-04-28 16:07:15 +0400 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2014-04-28 17:59:41 +0400 |
commit | 68c3b6350ad702195a86adfcde65687269820afd (patch) | |
tree | 468a0b3537cde7a18f7526b0ceed7ff0ae99d36e /source/blender/editors/space_nla/nla_ops.c | |
parent | 27db75363e67f1da272fc9e4ca340e4eb8bf77d1 (diff) |
NLA Editor: Duplicate/Duplicate Linked
This commit changes the default strip duplication behaviour (Shift-D) so that it will
create a copy of whatever action it uses. Previously, it was very hard, if not impossible
in some cases to create a new copy of an action to start working on in the NLA.
If you want the old behaviour, you'll need to use ALt-D (Linked Duplicates).
(Note: Although the new Shift-D may not be so optimal in all cases, I've decided to go
with this version since it aligns better with the way this works for objects. Doing the
opposite for NLA would just have added to the confusion)
Diffstat (limited to 'source/blender/editors/space_nla/nla_ops.c')
-rw-r--r-- | source/blender/editors/space_nla/nla_ops.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/source/blender/editors/space_nla/nla_ops.c b/source/blender/editors/space_nla/nla_ops.c index 373879a278b..9dc598bc382 100644 --- a/source/blender/editors/space_nla/nla_ops.c +++ b/source/blender/editors/space_nla/nla_ops.c @@ -256,7 +256,11 @@ static void nla_keymap_main(wmKeyConfig *keyconf, wmKeyMap *keymap) WM_keymap_add_item(keymap, "NLA_OT_meta_remove", GKEY, KM_PRESS, KM_ALT, 0); /* duplicate */ - WM_keymap_add_item(keymap, "NLA_OT_duplicate", DKEY, KM_PRESS, KM_SHIFT, 0); + kmi = WM_keymap_add_item(keymap, "NLA_OT_duplicate", DKEY, KM_PRESS, KM_SHIFT, 0); + RNA_boolean_set(kmi->ptr, "linked", false); + + kmi = WM_keymap_add_item(keymap, "NLA_OT_duplicate", DKEY, KM_PRESS, KM_ALT, 0); + RNA_boolean_set(kmi->ptr, "linked", true); /* delete */ WM_keymap_add_item(keymap, "NLA_OT_delete", XKEY, KM_PRESS, 0, 0); |