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>2009-02-11 15:19:42 +0300
committerJoshua Leung <aligorith@gmail.com>2009-02-11 15:19:42 +0300
commit7d3c88772b4cdf9cec8966390e84bdd21802395f (patch)
tree9b3545b7c16ff34b7dcc25b1b59348221f1d9b29 /source/blender/makesdna
parentba32199b23fb1b745109d7b25b8d7c6cdf903cd1 (diff)
Keying Sets: Initial commit of skeleton code
When fully implemented, these will be the clearest demonstration of 'Everything is Animateable', as they will allow users to define an arbitary group of settings through selecting items in the Datablocks (RNA-Viewer) View of the Outliner to define custom 'sets'. Such Keying Sets are known as the 'absolute' ones, which are created for a custom purpose. Of course, 'builtin' Keying Sets will still be provided. Such built-in ones will not work on any particular paths, but will use context info to maintain the legacy method of inserting keyframes (via IKEY menu). Currently, KeyingSets cannot be created/edited through the UI, though the backend code is in place to do this.
Diffstat (limited to 'source/blender/makesdna')
-rw-r--r--source/blender/makesdna/DNA_anim_types.h71
-rw-r--r--source/blender/makesdna/DNA_scene_types.h7
2 files changed, 76 insertions, 2 deletions
diff --git a/source/blender/makesdna/DNA_anim_types.h b/source/blender/makesdna/DNA_anim_types.h
index 17a552ad7e0..68564b1ee73 100644
--- a/source/blender/makesdna/DNA_anim_types.h
+++ b/source/blender/makesdna/DNA_anim_types.h
@@ -421,6 +421,77 @@ enum {
NLATRACK_TWEAK = (1<<5),
} eNlaTrack_Flag;
+
+/* ************************************ */
+/* KeyingSet Datatypes */
+
+/* Path for use in KeyingSet definitions (ksp)
+ *
+ * Paths may be either specific (specifying the exact sub-ID
+ * dynamic data-block - such as PoseChannels - to act upon, ala
+ * Maya's 'Character Sets' and XSI's 'Marking Sets'), or they may
+ * be generic (using various placeholder template tags that will be
+ * replaced with appropriate information from the context).
+ */
+// TODO: how should templates work exactly? For now, we only implement the specific KeyingSets...
+typedef struct KS_Path {
+ struct KS_Path *next, *prev;
+
+ /* absolute paths only */
+ ID *id; /* ID block that keyframes are for */
+ char group[64]; /* name of the group to add to */
+
+ /* all paths */
+ char *rna_path; /* dynamically (or statically in the case of predefined sets) path */
+ int array_index; /* index that path affects */
+
+ int flag; /* various settings, etc. */
+} KS_Path;
+
+/* KS_Path->flag */
+enum {
+ /* entire array (not just the specified index) gets keyframed */
+ KSP_FLAG_WHOLE_ARRAY = (1<<0),
+
+ /* path should not be grouped at all */
+ KSP_FLAG_GROUP_NONE = (1<<10),
+ /* path should be grouped under an ActionGroup KeyingSet's name */
+ KSP_FLAG_GROUP_KSNAME = (1<<11),
+} eKSP_Settings;
+
+/* ---------------- */
+
+/* KeyingSet definition (ks)
+ *
+ * A KeyingSet defines a group of properties that should
+ * be keyframed together, providing a convenient way for animators
+ * to insert keyframes without resorting to Auto-Keyframing.
+ *
+ * A few 'generic' (non-absolute and dependant on templates) KeyingSets
+ * are defined 'built-in' to facilitate easy animating for the casual
+ * animator without the need to add extra steps to the rigging process.
+ */
+typedef struct KeyingSet {
+ struct KeyingSet *next, *prev;
+
+ ListBase paths; /* (KS_Path) paths to keyframe to */
+
+ char name[64]; /* user-viewable name for KeyingSet (for menus, etc.) */
+
+ int flag; /* settings for KeyingSet */
+ int keyingflag; /* settings to supply insertkey() with */
+} KeyingSet;
+
+/* KeyingSet settings */
+enum {
+ /* keyingset cannot be removed (and doesn't need to be freed) */
+ KEYINGSET_BUILTIN = (1<<0),
+ /* keyingset is the one currently in use */
+ KEYINGSET_ACTIVE = (1<<1),
+ /* keyingset does not depend on context info (i.e. paths are absolute) */
+ KEYINGSET_ABSOLUTE = (1<<2),
+} eKS_Settings;
+
/* ************************************************ */
/* Animation Data */
diff --git a/source/blender/makesdna/DNA_scene_types.h b/source/blender/makesdna/DNA_scene_types.h
index ac3f7e69399..7b618502089 100644
--- a/source/blender/makesdna/DNA_scene_types.h
+++ b/source/blender/makesdna/DNA_scene_types.h
@@ -537,7 +537,7 @@ typedef struct Scene {
short proportional, prop_mode;
short automerge, pad5, pad6;
- short autokey_mode; /* mode for autokeying (defines in DNA_userdef_types.h */
+ short autokey_mode; /* mode for autokeying (defines in DNA_userdef_types.h) */
short use_nodes;
@@ -571,7 +571,10 @@ typedef struct Scene {
/* frame step. */
int frame_step;
- int pad;
+
+ /* User-Defined KeyingSets */
+ int active_keyingset; /* index of the active KeyingSet. first KeyingSet has index 1 */
+ ListBase keyingsets; /* KeyingSets for the given frame */
} Scene;