[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [20697] branches/soc-2009-aligorith/source /blender: NLA SoC: 2 little tweaks
Joshua Leung
aligorith at gmail.com
Sun Jun 7 09:04:31 CEST 2009
Revision: 20697
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=20697
Author: aligorith
Date: 2009-06-07 09:04:31 +0200 (Sun, 07 Jun 2009)
Log Message:
-----------
NLA SoC: 2 little tweaks
- Evaluation times for strips are now strictly clamped to the endpoints of the strips - i.e. if a strip has 'extend' on, the strip's evaluation time won't continue to change as time changes
- New NLA Editor instances now have auto-snapping turned on by default (as they should)
Modified Paths:
--------------
branches/soc-2009-aligorith/source/blender/blenkernel/intern/anim_sys.c
branches/soc-2009-aligorith/source/blender/editors/space_nla/space_nla.c
Modified: branches/soc-2009-aligorith/source/blender/blenkernel/intern/anim_sys.c
===================================================================
--- branches/soc-2009-aligorith/source/blender/blenkernel/intern/anim_sys.c 2009-06-07 06:49:04 UTC (rev 20696)
+++ branches/soc-2009-aligorith/source/blender/blenkernel/intern/anim_sys.c 2009-06-07 07:04:31 UTC (rev 20697)
@@ -730,6 +730,16 @@
*/
if ((estrip == NULL) || (estrip->flag & NLASTRIP_FLAG_MUTED))
return;
+
+ /* if ctime was not within the boundaries of the strip, clamp! */
+ switch (side) {
+ case NES_TIME_BEFORE: /* extend first frame only */
+ ctime= estrip->start;
+ break;
+ case NES_TIME_AFTER: /* extend last frame only */
+ ctime= estrip->end;
+ break;
+ }
/* evaluate strip's evaluation controls
* - skip if no influence (i.e. same effect as muting the strip)
Modified: branches/soc-2009-aligorith/source/blender/editors/space_nla/space_nla.c
===================================================================
--- branches/soc-2009-aligorith/source/blender/editors/space_nla/space_nla.c 2009-06-07 06:49:04 UTC (rev 20696)
+++ branches/soc-2009-aligorith/source/blender/editors/space_nla/space_nla.c 2009-06-07 07:04:31 UTC (rev 20697)
@@ -79,6 +79,9 @@
/* allocate DopeSheet data for NLA Editor */
snla->ads= MEM_callocN(sizeof(bDopeSheet), "NlaEdit DopeSheet");
+ /* set auto-snapping settings */
+ snla->autosnap = SACTSNAP_FRAME;
+
/* header */
ar= MEM_callocN(sizeof(ARegion), "header for nla");
More information about the Bf-blender-cvs
mailing list