[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [43808] trunk/blender/source/blender/ blenkernel/intern/lattice.c: remove old code and use macro for latt_bp() function

Campbell Barton ideasman42 at gmail.com
Tue Jan 31 22:56:29 CET 2012


Revision: 43808
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=43808
Author:   campbellbarton
Date:     2012-01-31 21:56:22 +0000 (Tue, 31 Jan 2012)
Log Message:
-----------
remove old code and use macro for latt_bp() function

Modified Paths:
--------------
    trunk/blender/source/blender/blenkernel/intern/lattice.c

Modified: trunk/blender/source/blender/blenkernel/intern/lattice.c
===================================================================
--- trunk/blender/source/blender/blenkernel/intern/lattice.c	2012-01-31 21:39:14 UTC (rev 43807)
+++ trunk/blender/source/blender/blenkernel/intern/lattice.c	2012-01-31 21:56:22 UTC (rev 43808)
@@ -560,39 +560,9 @@
 			fac= + (co[index]-cd->dmin[index])/(cu->path->totdist);
 	}
 	
-#if 0 // XXX old animation system
-	/* we want the ipo to work on the default 100 frame range, because there's no  
-	   actual time involved in path position */
-	// huh? by WHY!!!!???? - Aligorith
-	if(cu->ipo) {
-		fac*= 100.0f;
-		if(calc_ipo_spec(cu->ipo, CU_SPEED, &fac)==0)
-			fac/= 100.0;
-	}
-#endif // XXX old animation system
-	
 	if( where_on_path_deform(par, fac, loc, dir, new_quat, &radius)) {	/* returns OK */
 		float quat[4], cent[3];
 
-#if 0	// XXX - 2.4x Z-Up, Now use bevel tilt.
-		if(cd->no_rot_axis)	/* set by caller */
-			dir[cd->no_rot_axis-1]= 0.0f;
-		
-		/* -1 for compatibility with old track defines */
-		vec_to_quat( quat,dir, axis, upflag);
-		
-		/* the tilt */
-		if(loc[3]!=0.0) {
-			normalize_v3(dir);
-			q[0]= (float)cos(0.5*loc[3]);
-			fac= (float)sin(0.5*loc[3]);
-			q[1]= -fac*dir[0];
-			q[2]= -fac*dir[1];
-			q[3]= -fac*dir[2];
-			mul_qt_qtqt(quat, q, quat);
-		}
-#endif
-
 		if(cd->no_rot_axis) {	/* set by caller */
 
 			/* this is not exactly the same as 2.4x, since the axis is having rotation removed rather than
@@ -878,7 +848,7 @@
 
 static BPoint *latt_bp(Lattice *lt, int u, int v, int w)
 {
-	return lt->def+ u + v*lt->pntsu + w*lt->pntsu*lt->pntsv;
+	return &lt->def[LT_INDEX(lt, u, v, w)];
 }
 
 void outside_lattice(Lattice *lt)



More information about the Bf-blender-cvs mailing list