Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua Leung <aligorith@gmail.com>2016-03-12 17:49:26 +0300
committerJoshua Leung <aligorith@gmail.com>2016-03-13 08:28:30 +0300
commit570fbba3f33484111a472a835522d5ec30143a7c (patch)
tree061c03e275a602490afccefac1ed98a553ba2a9a /source/blender/editors/interface/interface_anim.c
parentb10e3cc9973e415189e9f0cdb6af504c41dd9e41 (diff)
Keyframing: Added ToolSetting for choosing default keyframe type
To make it easier for animators working in a multipass pose-to-pose workflow when inserting breakdown keyframes and so forth, it is now possible to specify the "type" of keyframe being created (i.e. the colour of the keyframe, when drawn in the Dope Sheet). Usage: 1) Choose the type of keyframe ("Keyframe", "Breakdown", "Extreme", etc.) from the new dropdown located between the AutoKeying and KeyingSet widgets on the timeline header. 2) Insert keyframes 3) Rejoyce that your newly created keyframes have now been coloured for you already in the DopeSheet. Todo: * Look into a way of using the actual keyframe colours (from the theme) for the icons of these types.
Diffstat (limited to 'source/blender/editors/interface/interface_anim.c')
-rw-r--r--source/blender/editors/interface/interface_anim.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/editors/interface/interface_anim.c b/source/blender/editors/interface/interface_anim.c
index 37895a711fd..178fda043b6 100644
--- a/source/blender/editors/interface/interface_anim.c
+++ b/source/blender/editors/interface/interface_anim.c
@@ -231,13 +231,14 @@ void ui_but_anim_autokey(bContext *C, uiBut *but, Scene *scene, float cfra)
/* NLA Strip property */
if (IS_AUTOKEY_ON(scene)) {
ReportList *reports = CTX_wm_reports(C);
+ ToolSettings *ts = scene->toolsettings;
PointerRNA ptr = {{NULL}};
PropertyRNA *prop = NULL;
int index;
UI_context_active_but_prop_get(C, &ptr, &prop, &index);
- insert_keyframe_direct(reports, ptr, prop, fcu, cfra, 0);
+ insert_keyframe_direct(reports, ptr, prop, fcu, cfra, ts->keyframe_type, 0);
WM_event_add_notifier(C, NC_ANIMATION | ND_KEYFRAME | NA_EDITED, NULL);
}
}
@@ -247,6 +248,7 @@ void ui_but_anim_autokey(bContext *C, uiBut *but, Scene *scene, float cfra)
/* TODO: this should probably respect the keyingset only option for anim */
if (autokeyframe_cfra_can_key(scene, id)) {
ReportList *reports = CTX_wm_reports(C);
+ ToolSettings *ts = scene->toolsettings;
short flag = ANIM_get_keyframing_flags(scene, 1);
fcu->flag &= ~FCURVE_SELECTED;
@@ -256,7 +258,7 @@ void ui_but_anim_autokey(bContext *C, uiBut *but, Scene *scene, float cfra)
* E.g., color wheels (see T42567). */
BLI_assert((fcu->array_index == but->rnaindex) || (but->rnaindex == -1));
insert_keyframe(reports, id, action, ((fcu->grp) ? (fcu->grp->name) : (NULL)),
- fcu->rna_path, but->rnaindex, cfra, flag);
+ fcu->rna_path, but->rnaindex, cfra, ts->keyframe_type, flag);
WM_event_add_notifier(C, NC_ANIMATION | ND_KEYFRAME | NA_EDITED, NULL);
}