diff options
author | Joshua Leung <aligorith@gmail.com> | 2016-03-12 17:49:26 +0300 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2016-03-13 08:28:30 +0300 |
commit | 570fbba3f33484111a472a835522d5ec30143a7c (patch) | |
tree | 061c03e275a602490afccefac1ed98a553ba2a9a /source/blender/python/intern/bpy_rna_anim.c | |
parent | b10e3cc9973e415189e9f0cdb6af504c41dd9e41 (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/python/intern/bpy_rna_anim.c')
-rw-r--r-- | source/blender/python/intern/bpy_rna_anim.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/python/intern/bpy_rna_anim.c b/source/blender/python/intern/bpy_rna_anim.c index 63bfdc63e4d..e74a5185ab0 100644 --- a/source/blender/python/intern/bpy_rna_anim.c +++ b/source/blender/python/intern/bpy_rna_anim.c @@ -211,6 +211,7 @@ PyObject *pyrna_struct_keyframe_insert(BPy_StructRNA *self, PyObject *args, PyOb int index = -1; float cfra = FLT_MAX; const char *group_name = NULL; + char keytype = BEZT_KEYTYPE_KEYFRAME; /* XXX: Expose this as a one-off option... */ int options = 0; PYRNA_STRUCT_CHECK_OBJ(self); @@ -227,7 +228,7 @@ PyObject *pyrna_struct_keyframe_insert(BPy_StructRNA *self, PyObject *args, PyOb BKE_reports_init(&reports, RPT_STORE); - result = insert_keyframe(&reports, (ID *)self->ptr.id.data, NULL, group_name, path_full, index, cfra, options); + result = insert_keyframe(&reports, (ID *)self->ptr.id.data, NULL, group_name, path_full, index, cfra, keytype, options); MEM_freeN((void *)path_full); if (BPy_reports_to_error(&reports, PyExc_RuntimeError, true) == -1) |