[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [21512] branches/soc-2009-aligorith/source /blender/blenkernel/intern/nla.c: NLA SoC: Quick commit of skeleton of auto-blending setting code to be completed later ...
Joshua Leung
aligorith at gmail.com
Sat Jul 11 05:09:49 CEST 2009
Revision: 21512
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=21512
Author: aligorith
Date: 2009-07-11 05:09:44 +0200 (Sat, 11 Jul 2009)
Log Message:
-----------
NLA SoC: Quick commit of skeleton of auto-blending setting code to be completed later...
Modified Paths:
--------------
branches/soc-2009-aligorith/source/blender/blenkernel/intern/nla.c
Modified: branches/soc-2009-aligorith/source/blender/blenkernel/intern/nla.c
===================================================================
--- branches/soc-2009-aligorith/source/blender/blenkernel/intern/nla.c 2009-07-10 23:25:30 UTC (rev 21511)
+++ branches/soc-2009-aligorith/source/blender/blenkernel/intern/nla.c 2009-07-11 03:09:44 UTC (rev 21512)
@@ -1227,7 +1227,63 @@
BLI_ghash_free(gh, NULL, NULL);
}
+/* ---- */
+/* Determine auto-blending for the given strip */
+void BKE_nlastrip_validate_autoblends (NlaTrack *nlt, NlaStrip *nls)
+{
+ NlaTrack *track;
+ NlaStrip *strip;
+ //float *ps=NULL, *pe=NULL;
+ //float *ns=NULL, *ne=NULL;
+
+ /* sanity checks */
+ if ELEM(NULL, nls, nlt)
+ return;
+ if ((nlt->prev == NULL) && (nlt->next == NULL))
+ return;
+ if ((nls->flag & NLASTRIP_FLAG_AUTO_BLENDS)==0)
+ return;
+
+ /* get test ranges */
+ if (nlt->prev) {
+ /* find strips that overlap over the start/end of the given strip,
+ * but which don't cover the entire length
+ */
+ track= nlt->prev;
+ for (strip= track->strips.first; strip; strip= strip->next) {
+
+ }
+ }
+ if (nlt->next) {
+ /* find strips that overlap over the start/end of the given strip,
+ * but which don't cover the entire length
+ */
+ track= nlt->next;
+ for (strip= track->strips.first; strip; strip= strip->next) {
+
+ }
+ }
+}
+
+/* Ensure that auto-blending and other settings are set correctly */
+void BKE_nla_validate_state (AnimData *adt)
+{
+ NlaStrip *strip;
+ NlaTrack *nlt;
+
+ /* sanity checks */
+ if ELEM(NULL, adt, adt->nla_tracks.first)
+ return;
+
+ /* adjust blending values for auto-blending */
+ for (nlt= adt->nla_tracks.first; nlt; nlt= nlt->next) {
+ for (strip= nlt->strips.first; strip; strip= strip->next) {
+ BKE_nlastrip_validate_autoblends(nlt, strip);
+ }
+ }
+}
+
/* Core Tools ------------------------------------------- */
/* For the given AnimData block, add the active action to the NLA
More information about the Bf-blender-cvs
mailing list