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-06-23 17:25:31 +0400
committerJoshua Leung <aligorith@gmail.com>2009-06-23 17:25:31 +0400
commitb4acd77526f32faab0c3d86436eef56096985c3d (patch)
tree9b0212ceb39f1299b5e49508ed40bffb1bbf5318 /source/blender/blenkernel/nla_private.h
parentaa267976b86f90423204e11a30eec4e0def0f296 (diff)
NLA SoC: Big Commit - Restored NLA-Mapping Corrections
In TweakMode, the keyframes of the Active Action are now shown (and can be edited) in NLA-mapped time, with appropriate corrections applied when editing. This works in the DopeSheet and Graph Editors :) To do this, got rid of the old wrappers/API-methods, replacing them with new-style ones. A few methods previously (in this branch) used only for evaluation are now used for this purpose too. As the same code is used for editing + evaluation, this should now be much better to work with. I've only done a few brief tests now, but I think I might've muddled the invert-flags on one or two cases which I'll need to check out tomorrow. So, beware that there may be some weird and critical bugs for the next few days here... Also, added proper license headers to new NLA files. TODO: - testing + bugfixing due to this commit - show range of keyframes in NLA Editor active-action line
Diffstat (limited to 'source/blender/blenkernel/nla_private.h')
-rw-r--r--source/blender/blenkernel/nla_private.h78
1 files changed, 78 insertions, 0 deletions
diff --git a/source/blender/blenkernel/nla_private.h b/source/blender/blenkernel/nla_private.h
new file mode 100644
index 00000000000..af886fb7de8
--- /dev/null
+++ b/source/blender/blenkernel/nla_private.h
@@ -0,0 +1,78 @@
+/**
+ * $Id: BKE_nla.h 20999 2009-06-19 04:45:56Z aligorith $
+ *
+ * ***** BEGIN GPL LICENSE BLOCK *****
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * The Original Code is Copyright (C) 2009 Blender Foundation, Joshua Leung
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): Joshua Leung (full recode)
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+
+#ifndef NLA_PRIVATE
+#define NLA_PRIVATE
+
+/* --------------- NLA Evaluation DataTypes ----------------------- */
+
+/* used for list of strips to accumulate at current time */
+typedef struct NlaEvalStrip {
+ struct NlaEvalStrip *next, *prev;
+
+ NlaTrack *track; /* track that this strip belongs to */
+ NlaStrip *strip; /* strip that's being used */
+
+ short track_index; /* the index of the track within the list */
+ short strip_mode; /* which end of the strip are we looking at */
+
+ float strip_time; /* time at which which strip is being evaluated */
+} NlaEvalStrip;
+
+/* NlaEvalStrip->strip_mode */
+enum {
+ /* standard evaluation */
+ NES_TIME_BEFORE = -1,
+ NES_TIME_WITHIN,
+ NES_TIME_AFTER,
+
+ /* transition-strip evaluations */
+ NES_TIME_TRANSITION_START,
+ NES_TIME_TRANSITION_END,
+} eNlaEvalStrip_StripMode;
+
+
+/* temp channel for accumulating data from NLA (avoids needing to clear all values first) */
+// TODO: maybe this will be used as the 'cache' stuff needed for editable values too?
+typedef struct NlaEvalChannel {
+ struct NlaEvalChannel *next, *prev;
+
+ PointerRNA ptr; /* pointer to struct containing property to use */
+ PropertyRNA *prop; /* RNA-property type to use (should be in the struct given) */
+ int index; /* array index (where applicable) */
+
+ float value; /* value of this channel */
+} NlaEvalChannel;
+
+/* --------------- NLA Functions (not to be used as a proper API) ----------------------- */
+
+/* convert from strip time <-> global time */
+float nlastrip_get_frame(NlaStrip *strip, float cframe, short invert);
+
+#endif // NLA_PRIVATE