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-03-07 07:24:28 +0300
committerJoshua Leung <aligorith@gmail.com>2009-03-07 07:24:28 +0300
commit4cf9fa3e59ce216e5f2489936a369f8e7b27b3db (patch)
treede49ce88763510b2c242fdecdf8072337f428bd5 /source/blender/editors/space_graph/graph_edit.c
parentc07acfb4fd100cd3e4eb2ac12b0941ce6c9575e1 (diff)
Animation Editors: Copy/Paste Keyframe changes
As was discussed by the team the other day, copying keyframes (to copy/paste buffer) in DopeSheet/Graph Editor no longer relies on the selection status of the F-Curves, but rather on the selected keyframes only. This should be less confusing... However, pasting keyframes still relies on having F-Curves selected to aid in the channel-matching process. There is still a lot of room for improvement in this area though (as noted in the code!).
Diffstat (limited to 'source/blender/editors/space_graph/graph_edit.c')
-rw-r--r--source/blender/editors/space_graph/graph_edit.c46
1 files changed, 45 insertions, 1 deletions
diff --git a/source/blender/editors/space_graph/graph_edit.c b/source/blender/editors/space_graph/graph_edit.c
index 932b22c0a6e..d98ed38da9c 100644
--- a/source/blender/editors/space_graph/graph_edit.c
+++ b/source/blender/editors/space_graph/graph_edit.c
@@ -256,7 +256,7 @@ static short copy_graph_keys (bAnimContext *ac)
free_anim_copybuf();
/* filter data */
- filter= (ANIMFILTER_VISIBLE | ANIMFILTER_CURVEVISIBLE | ANIMFILTER_SEL | ANIMFILTER_CURVESONLY);
+ filter= (ANIMFILTER_VISIBLE | ANIMFILTER_CURVEVISIBLE | ANIMFILTER_CURVESONLY);
ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype);
/* copy keyframes */
@@ -1011,6 +1011,50 @@ void GRAPHEDIT_OT_keyframes_handletype (wmOperatorType *ot)
/* ************************************************************************** */
/* TRANSFORM STUFF */
+/* ***************** 'Euler Filter' Operator **************************** */
+/* Euler filter tools (as seen in Maya), are necessary for working with 'baked'
+ * rotation curves (with Euler rotations). The main purpose of such tools is to
+ * resolve any discontinuities that may arise in the curves due to the clamping
+ * of values to -180 degrees to 180 degrees.
+ */
+
+static int graphkeys_euler_filter_exec (bContext *C, wmOperator *op)
+{
+ bAnimContext ac;
+ //ListBase anim_data= {NULL, NULL};
+ //bAnimListElem *ale;
+ //int filter;
+
+ /* get editor data */
+ if (ANIM_animdata_get_context(C, &ac) == 0)
+ return OPERATOR_CANCELLED;
+
+ /* The process is done in two passes:
+ * 1) Sets of three related rotation curves are identified from the selected channels,
+ * and are stored as a single 'operation unit' for the next step
+ * 2) Each set of three F-Curves is processed for each keyframe, with the values being
+ * processed according to one of several ways.
+ */
+
+
+ // XXX for now
+ return OPERATOR_CANCELLED;
+}
+
+void GRAPHEDIT_OT_keyframes_euler_filter (wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name= "Euler Filter";
+ ot->idname= "GRAPHEDIT_OT_keyframes_euler_filter";
+
+ /* api callbacks */
+ ot->exec= graphkeys_euler_filter_exec;
+ ot->poll= ED_operator_areaactive;
+
+ /* flags */
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+}
+
/* ***************** Snap Current Frame Operator *********************** */
/* helper callback for graphkeys_cfrasnap_exec() -> used to help get the average time of all selected beztriples */