[Bf-blender-cvs] [adf1834] master: AutoSnap Bugfixes: NLA Frame/Second Step didn't work

Joshua Leung noreply at git.blender.org
Thu Apr 24 17:14:57 CEST 2014


Commit: adf1834ede0f234c60ee990daaa32f40e32f3b41
Author: Joshua Leung
Date:   Fri Apr 25 03:01:55 2014 +1200
https://developer.blender.org/rBadf1834ede0f234c60ee990daaa32f40e32f3b41

AutoSnap Bugfixes: NLA Frame/Second Step didn't work

Since the NLA was also using the standard transform mode by default, this meant that
no frame/second step-snapping was happening here (i.e. like for the Graph Editor).
The actual differences between doing true stepping vs nearest here are quite small
(and don't really make much sense with NLA Strips), so for now, it should be fine that
these are the same.

===================================================================

M	source/blender/editors/transform/transform_generics.c

===================================================================

diff --git a/source/blender/editors/transform/transform_generics.c b/source/blender/editors/transform/transform_generics.c
index 0ff9f92..90dc087 100644
--- a/source/blender/editors/transform/transform_generics.c
+++ b/source/blender/editors/transform/transform_generics.c
@@ -532,6 +532,7 @@ static void recalcData_nla(TransInfo *t)
 		/* handle auto-snapping */
 		switch (snla->autosnap) {
 			case SACTSNAP_FRAME: /* snap to nearest frame */
+			case SACTSNAP_STEP: /* frame step - this is basically the same, since we don't have any remapping going on */
 			{
 				tdn->h1[0] = floorf(tdn->h1[0] + 0.5f);
 				tdn->h2[0] = floorf(tdn->h2[0] + 0.5f);
@@ -539,6 +540,7 @@ static void recalcData_nla(TransInfo *t)
 			}
 			
 			case SACTSNAP_SECOND: /* snap to nearest second */
+			case SACTSNAP_TSTEP: /* second step - this is basically the same, since we don't have any remapping going on */
 			{
 				/* This case behaves differently from the rest, since lengths of strips
 				 * may not be multiples of a second. If we just naively resize adjust




More information about the Bf-blender-cvs mailing list