Commit: ba4e7d95db43e63895bff04917cf9aaafb06352a
Author: Antony Riakiotakis
Date: Thu Jan 8 13:01:48 2015 +0100
Branches: gooseberry
https://developer.blender.org/rBba4e7d95db43e63895bff04917cf9aaafb06352a
Paste flipped bones:
* Simplify logic for bone detection on copy (no need to do mirrored
naming then)
* Add shortcuts ctrl(cmd)-shift-V for copying flipped
===================================================================
M source/blender/editors/animation/keyframes_general.c
M source/blender/editors/space_action/action_ops.c
M source/blender/editors/space_graph/graph_ops.c
===================================================================
diff --git a/source/blender/editors/animation/keyframes_general.c
b/source/blender/editors/animation/keyframes_general.c
index adfaae0..ee212d6 100644
--- a/source/blender/editors/animation/keyframes_general.c
+++ b/source/blender/editors/animation/keyframes_general.c
@@ -551,9 +551,7 @@ short copy_animedit_keys(bAnimContext *ac, ListBase
*anim_data)
char *str_start;
if ((str_start = strstr(aci->rna_path, "pose.bones[")))
{
- /* ninja coding, try to change the name */
bPoseChannel *pchan;
- char bname[MAX_VGROUP_NAME];
int length = 0;
char *str_end;
@@ -561,9 +559,8 @@ short copy_animedit_keys(bAnimContext *ac, ListBase
*anim_data)
str_end = strchr(str_start, '\"');
length = str_end - str_start;
str_start[length] = 0;
- BKE_deform_flip_side_name(bname, str_start,
false);
+ pchan = BKE_pose_channel_find_name(ob->pose,
str_start);
str_start[length] = '\"';
- pchan = BKE_pose_channel_find_name(ob->pose,
bname);
if (pchan) {
aci->is_bone = true;
diff --git a/source/blender/editors/space_action/action_ops.c
b/source/blender/editors/space_action/action_ops.c
index 364434e..0fbacef 100644
--- a/source/blender/editors/space_action/action_ops.c
+++ b/source/blender/editors/space_action/action_ops.c
@@ -205,9 +205,13 @@ static void action_keymap_keyframes(wmKeyConfig *keyconf,
wmKeyMap *keymap)
/* copy/paste */
WM_keymap_add_item(keymap, "ACTION_OT_copy", CKEY, KM_PRESS, KM_CTRL,
0);
WM_keymap_add_item(keymap, "ACTION_OT_paste", VKEY, KM_PRESS, KM_CTRL,
0);
+ kmi = WM_keymap_add_item(keymap, "ACTION_OT_paste", VKEY, KM_PRESS,
KM_CTRL | KM_SHIFT, 0);
+ RNA_boolean_set(kmi->ptr, "flipped", true);
#ifdef __APPLE__
WM_keymap_add_item(keymap, "ACTION_OT_copy", CKEY, KM_PRESS, KM_OSKEY,
0);
WM_keymap_add_item(keymap, "ACTION_OT_paste", VKEY, KM_PRESS, KM_OSKEY,
0);
+ kmi = WM_keymap_add_item(keymap, "ACTION_OT_paste", VKEY, KM_PRESS,
KM_OSKEY | KM_SHIFT, 0);
+ RNA_boolean_set(kmi->ptr, "flipped", true);
#endif
/* auto-set range */
diff --git a/source/blender/editors/space_graph/graph_ops.c
b/source/blender/editors/space_graph/graph_ops.c
index f06d738..da308d0 100644
--- a/source/blender/editors/space_graph/graph_ops.c
+++ b/source/blender/editors/space_graph/graph_ops.c
@@ -580,9 +580,13 @@ static void graphedit_keymap_keyframes(wmKeyConfig
*keyconf, wmKeyMap *keymap)
/* copy/paste */
WM_keymap_add_item(keymap, "GRAPH_OT_copy", CKEY, KM_PRESS, KM_CTRL, 0);
WM_keymap_add_item(keymap, "GRAPH_OT_paste", VKEY, KM_PRESS, KM_CTRL,
0);
+ kmi = WM_keymap_add_item(keymap, "GRAPH_OT_paste", VKEY, KM_PRESS,
KM_CTRL | KM_SHIFT, 0);
+ RNA_boolean_set(kmi->ptr, "flipped", true);
#ifdef __APPLE__
WM_keymap_add_item(keymap, "GRAPH_OT_copy", CKEY, KM_PRESS, KM_OSKEY,
0);
WM_keymap_add_item(keymap, "GRAPH_OT_paste", VKEY, KM_PRESS, KM_OSKEY,
0);
+ kmi = WM_keymap_add_item(keymap, "GRAPH_OT_paste", VKEY, KM_PRESS,
KM_OSKEY | KM_SHIFT, 0);
+ RNA_boolean_set(kmi->ptr, "flipped", true);
#endif
/* auto-set range */
_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs