[Bf-committers] Re: [Bf-blender-cvs] CVS commit: blender/source/blender/makesdna DNA_view3d_types.h blender/source/blender/src drawobject.c drawview.c

Ton Roosendaal ton at blender.org
Fri Apr 29 22:28:34 CEST 2005


Sigh... code reviews are difficult and take a lot of time. Just already  
looking at the first few lines;

+#define R_REFLOCAL              1
+#define R_REFGLOBAL             2
+#define R_REFCURSOR             3
+static short r_ref  = 1;        /* reference to (which radio button is  
selected) */
+static short r_refp = 1;        /* previous reference (for monitoring  
of r_ref ) */

Define names starting with R_ are for render data, and adding globals  
for buttons? Should be the view3d flag.

The further on;

+			if (r_ref == R_REFGLOBAL || r_ref == R_REFCURSOR) {
+				/* really, we only need a 3x3 matrix here, but it's faster to just
+				   invert the 4x4 and substract the translation vector afterward.
+				 */
+				Mat4Invert(ob->imat, ob->obmat);
+				Mat4MulVecfl(ob->imat, median);
+				VecSubf(median, median, ob->imat[3]);
+			}

This I dont get. A proper mapping from local to global is just applying  
the entire 4x4 matrix.

No that I *wanted* to review it...! Was am just doing a massive todo  
list, and choosed the shortest path. :)

>> The 'relative to cursor' I
>> could add too... first
>> need to understand the use for it?
> Could be used to see position relative to a different
> object/referential.

I need to think that over... my choice was to make 'tech draw' and the  
'transform properties' panel in sync with a single setting. Lets  
postpone that.


> Martin
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
> _______________________________________________
> Bf-committers mailing list
> Bf-committers at projects.blender.org
> http://projects.blender.org/mailman/listinfo/bf-committers
Ton Roosendaal  Blender Foundation ton at blender.org  

More information about the Bf-committers mailing list