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>2010-02-07 14:50:03 +0300
committerJoshua Leung <aligorith@gmail.com>2010-02-07 14:50:03 +0300
commit20fb4e3367a4a544e15fa7c556868a37966356de (patch)
tree210d314df871e2122592e8a0eeeb4416cfcf1d3f /source/blender/editors/include/ED_keyframes_edit.h
parent7d2c4384e275a1ff5ab289b859d6e75a29645115 (diff)
DopeSheet and Graph Editors: Select More/Less Operators
This commit introduces the Select More/Less Operators (Ctrl +/-) for keyframes. This works like the ones for curves, by only selecting/deselecting keyframes lying in the same F-Curve. Inter F-Curve selection is not done by this operator. That is the job for another one. This is especially useful for F-Curves set in the 0-1-0 pattern (i.e. 3 keyframes forming localised peaks), where the peaks can be selected by clicking on them individually, and immediately surrounding '0' values are selected too using "Select More".
Diffstat (limited to 'source/blender/editors/include/ED_keyframes_edit.h')
-rw-r--r--source/blender/editors/include/ED_keyframes_edit.h25
1 files changed, 24 insertions, 1 deletions
diff --git a/source/blender/editors/include/ED_keyframes_edit.h b/source/blender/editors/include/ED_keyframes_edit.h
index 9e29d747d4a..675dde0ae0d 100644
--- a/source/blender/editors/include/ED_keyframes_edit.h
+++ b/source/blender/editors/include/ED_keyframes_edit.h
@@ -58,7 +58,7 @@ typedef enum eEditKeyframes_Validate {
/* ------------ */
-/* select tools */
+/* select modes */
typedef enum eEditKeyframes_Select {
SELECT_REPLACE = (1<<0),
SELECT_ADD = (1<<1),
@@ -66,6 +66,12 @@ typedef enum eEditKeyframes_Select {
SELECT_INVERT = (1<<4),
} eEditKeyframes_Select;
+/* "selection map" building modes */
+typedef enum eEditKeyframes_SelMap {
+ SELMAP_MORE = 0,
+ SELMAP_LESS,
+} eEditKeyframes_SelMap;
+
/* snapping tools */
typedef enum eEditKeyframes_Snap {
SNAP_KEYS_CURFRAME = 1,
@@ -91,11 +97,16 @@ typedef enum eEditKeyframes_Mirror {
/* --- Generic Properties for Bezier Edit Tools ----- */
typedef struct BeztEditData {
+ /* generic properties/data access */
ListBase list; /* temp list for storing custom list of data to check */
struct Scene *scene; /* pointer to current scene - many tools need access to cfra/etc. */
void *data; /* pointer to custom data - usually 'Object' but also 'rectf', but could be other types too */
float f1, f2; /* storage of times/values as 'decimals' */
int i1, i2; /* storage of times/values/flags as 'whole' numbers */
+
+ /* current iteration data */
+ struct FCurve *fcu; /* F-Curve that is being iterated over */
+ int curIndex; /* index of current keyframe being iterated over */
} BeztEditData;
/* ------- Function Pointer Typedefs ---------------- */
@@ -143,6 +154,18 @@ BeztEditFunc ANIM_editkeyframes_handles(short mode);
BeztEditFunc ANIM_editkeyframes_ipo(short mode);
BeztEditFunc ANIM_editkeyframes_keytype(short mode);
+/* -------- BezTriple Callbacks (Selection Map) ---------- */
+
+/* Get a callback to populate the selection settings map
+ * requires: bed->custom = char[] of length fcurve->totvert
+ */
+BeztEditFunc ANIM_editkeyframes_buildselmap(short mode);
+
+/* Change the selection status of the keyframe based on the map entry for this vert
+ * requires: bed->custom = char[] of length fcurve->totvert
+ */
+short bezt_selmap_flush(BeztEditData *bed, struct BezTriple *bezt);
+
/* ----------- BezTriple Callback (Assorted Utilities) ---------- */
/* used to calculate the the average location of all relevant BezTriples by summing their locations */