Revision: 41595
          
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=41595
Author:   campbellbarton
Date:     2011-11-06 16:34:44 +0000 (Sun, 06 Nov 2011)
Log Message:
-----------
replace macros for bli math functions in editors

Modified Paths:
--------------
    trunk/blender/source/blender/editors/armature/meshlaplacian.c
    trunk/blender/source/blender/editors/interface/interface_handlers.c
    trunk/blender/source/blender/editors/interface/interface_regions.c
    trunk/blender/source/blender/editors/interface/interface_widgets.c
    trunk/blender/source/blender/editors/object/object_edit.c
    trunk/blender/source/blender/editors/object/object_transform.c
    trunk/blender/source/blender/editors/sculpt_paint/paint_image.c
    trunk/blender/source/blender/editors/sculpt_paint/paint_utils.c
    trunk/blender/source/blender/editors/sculpt_paint/sculpt.c
    trunk/blender/source/blender/editors/transform/transform.c
    trunk/blender/source/blender/editors/transform/transform_conversions.c
    trunk/blender/source/blender/editors/transform/transform_orientations.c
    trunk/blender/source/blender/editors/uvedit/uvedit_ops.c

Modified: trunk/blender/source/blender/editors/armature/meshlaplacian.c
===================================================================
--- trunk/blender/source/blender/editors/armature/meshlaplacian.c       
2011-11-06 16:23:28 UTC (rev 41594)
+++ trunk/blender/source/blender/editors/armature/meshlaplacian.c       
2011-11-06 16:34:44 UTC (rev 41595)
@@ -1241,8 +1241,8 @@
        memset(&isec, 0, sizeof(isec));
        isec.labda= 1e10f;
 
-       VECADD(isec.start, co1, epsilon);
-       VECADD(end, co2, epsilon);
+       add_v3_v3v3(isec.start, co1, epsilon);
+       add_v3_v3v3(end, co2, epsilon);
        sub_v3_v3v3(isec.vec, end, isec.start);
 
        if(meshdeform_intersect(mdb, &isec)) {

Modified: trunk/blender/source/blender/editors/interface/interface_handlers.c
===================================================================
--- trunk/blender/source/blender/editors/interface/interface_handlers.c 
2011-11-06 16:23:28 UTC (rev 41594)
+++ trunk/blender/source/blender/editors/interface/interface_handlers.c 
2011-11-06 16:34:44 UTC (rev 41595)
@@ -944,7 +944,7 @@
                data->origstr= NULL;
                data->value= data->origvalue;
                data->origvalue= 0.0;
-               VECCOPY(data->vec, data->origvec);
+               copy_v3_v3(data->vec, data->origvec);
                data->origvec[0]= data->origvec[1]= data->origvec[2]= 0.0f;
        }
        else {
@@ -2121,7 +2121,7 @@
                        break;
                case COL:
                        ui_get_but_vectorf(but, data->origvec);
-                       VECCOPY(data->vec, data->origvec);
+                       copy_v3_v3(data->vec, data->origvec);
                        but->editvec= data->vec;
 
                        handlefunc= ui_block_func_COL;
@@ -5727,7 +5727,7 @@
        /* copy over return values from the closing menu */
        if(menu->menuretval == UI_RETURN_OK || menu->menuretval == 
UI_RETURN_UPDATE) {
                if(but->type == COL)
-                       VECCOPY(data->vec, menu->retvec)
+                       copy_v3_v3(data->vec, menu->retvec);
                else if(ELEM3(but->type, MENU, ICONROW, ICONTEXTROW))
                        data->value= menu->retvalue;
        }

Modified: trunk/blender/source/blender/editors/interface/interface_regions.c
===================================================================
--- trunk/blender/source/blender/editors/interface/interface_regions.c  
2011-11-06 16:23:28 UTC (rev 41594)
+++ trunk/blender/source/blender/editors/interface/interface_regions.c  
2011-11-06 16:34:44 UTC (rev 41595)
@@ -2126,7 +2126,7 @@
        
        uiBlockSetFlag(block, UI_BLOCK_MOVEMOUSE_QUIT);
        
-       VECCOPY(handle->retvec, but->editvec);
+       copy_v3_v3(handle->retvec, but->editvec);
        
        uiBlockPicker(block, handle->retvec, &but->rnapoin, but->rnaprop);
        

Modified: trunk/blender/source/blender/editors/interface/interface_widgets.c
===================================================================
--- trunk/blender/source/blender/editors/interface/interface_widgets.c  
2011-11-06 16:23:28 UTC (rev 41594)
+++ trunk/blender/source/blender/editors/interface/interface_widgets.c  
2011-11-06 16:34:44 UTC (rev 41595)
@@ -1874,38 +1874,38 @@
                        break;
                case UI_GRAD_H:
                        hsv_to_rgb(0.0, 1.0, 1.0,   &col1[0][0], &col1[0][1], 
&col1[0][2]);
-                       VECCOPY(col1[1], col1[0]);
-                       VECCOPY(col1[2], col1[0]);
-                       VECCOPY(col1[3], col1[0]);
+                       copy_v3_v3(col1[1], col1[0]);
+                       copy_v3_v3(col1[2], col1[0]);
+                       copy_v3_v3(col1[3], col1[0]);
                        break;
                case UI_GRAD_S:
                        hsv_to_rgb(1.0, 0.0, 1.0,   &col1[1][0], &col1[1][1], 
&col1[1][2]);
-                       VECCOPY(col1[0], col1[1]);
-                       VECCOPY(col1[2], col1[1]);
-                       VECCOPY(col1[3], col1[1]);
+                       copy_v3_v3(col1[0], col1[1]);
+                       copy_v3_v3(col1[2], col1[1]);
+                       copy_v3_v3(col1[3], col1[1]);
                        break;
                case UI_GRAD_V:
                        hsv_to_rgb(1.0, 1.0, 0.0,   &col1[2][0], &col1[2][1], 
&col1[2][2]);
-                       VECCOPY(col1[0], col1[2]);
-                       VECCOPY(col1[1], col1[2]);
-                       VECCOPY(col1[3], col1[2]);
+                       copy_v3_v3(col1[0], col1[2]);
+                       copy_v3_v3(col1[1], col1[2]);
+                       copy_v3_v3(col1[3], col1[2]);
                        break;
                default:
                        assert(!"invalid 'type' argument");
                        hsv_to_rgb(1.0, 1.0, 1.0,   &col1[2][0], &col1[2][1], 
&col1[2][2]);
-                       VECCOPY(col1[0], col1[2]);
-                       VECCOPY(col1[1], col1[2]);
-                       VECCOPY(col1[3], col1[2]);                      
+                       copy_v3_v3(col1[0], col1[2]);
+                       copy_v3_v3(col1[1], col1[2]);
+                       copy_v3_v3(col1[3], col1[2]);
        }
        
        /* old below */
        
        for(dx=0.0f; dx<1.0f; dx+= 0.05f) {
                // previous color
-               VECCOPY(col0[0], col1[0]);
-               VECCOPY(col0[1], col1[1]);
-               VECCOPY(col0[2], col1[2]);
-               VECCOPY(col0[3], col1[3]);
+               copy_v3_v3(col0[0], col1[0]);
+               copy_v3_v3(col0[1], col1[1]);
+               copy_v3_v3(col0[2], col1[2]);
+               copy_v3_v3(col0[3], col1[3]);
                
                // new color
                switch(type) {
@@ -1929,21 +1929,21 @@
                                break;
                        case UI_GRAD_H:
                                hsv_to_rgb(dx, 1.0, 1.0,   &col1[0][0], 
&col1[0][1], &col1[0][2]);
-                               VECCOPY(col1[1], col1[0]);
-                               VECCOPY(col1[2], col1[0]);
-                               VECCOPY(col1[3], col1[0]);
+                               copy_v3_v3(col1[1], col1[0]);
+                               copy_v3_v3(col1[2], col1[0]);
+                               copy_v3_v3(col1[3], col1[0]);
                                break;
                        case UI_GRAD_S:
                                hsv_to_rgb(h, dx, 1.0,   &col1[1][0], 
&col1[1][1], &col1[1][2]);
-                               VECCOPY(col1[0], col1[1]);
-                               VECCOPY(col1[2], col1[1]);
-                               VECCOPY(col1[3], col1[1]);
+                               copy_v3_v3(col1[0], col1[1]);
+                               copy_v3_v3(col1[2], col1[1]);
+                               copy_v3_v3(col1[3], col1[1]);
                                break;
                        case UI_GRAD_V:
                                hsv_to_rgb(h, 1.0, dx,   &col1[2][0], 
&col1[2][1], &col1[2][2]);
-                               VECCOPY(col1[0], col1[2]);
-                               VECCOPY(col1[1], col1[2]);
-                               VECCOPY(col1[3], col1[2]);
+                               copy_v3_v3(col1[0], col1[2]);
+                               copy_v3_v3(col1[1], col1[2]);
+                               copy_v3_v3(col1[3], col1[2]);
                                break;
                }
                

Modified: trunk/blender/source/blender/editors/object/object_edit.c
===================================================================
--- trunk/blender/source/blender/editors/object/object_edit.c   2011-11-06 
16:23:28 UTC (rev 41594)
+++ trunk/blender/source/blender/editors/object/object_edit.c   2011-11-06 
16:34:44 UTC (rev 41595)
@@ -1130,19 +1130,19 @@
                                base->object->recalc |= OB_RECALC_OB;
                                
                                if(event==1) {  /* loc */
-                                       VECCOPY(base->object->loc, ob->loc);
-                                       VECCOPY(base->object->dloc, ob->dloc);
+                                       copy_v3_v3(base->object->loc, ob->loc);
+                                       copy_v3_v3(base->object->dloc, 
ob->dloc);
                                }
                                else if(event==2) {  /* rot */
-                                       VECCOPY(base->object->rot, ob->rot);
-                                       VECCOPY(base->object->drot, ob->drot);
+                                       copy_v3_v3(base->object->rot, ob->rot);
+                                       copy_v3_v3(base->object->drot, 
ob->drot);
 
-                                       QUATCOPY(base->object->quat, ob->quat);
-                                       QUATCOPY(base->object->dquat, 
ob->dquat);
+                                       copy_qt_qt(base->object->quat, 
ob->quat);
+                                       copy_qt_qt(base->object->dquat, 
ob->dquat);
                                }
                                else if(event==3) {  /* size */
-                                       VECCOPY(base->object->size, ob->size);
-                                       VECCOPY(base->object->dsize, ob->dsize);
+                                       copy_v3_v3(base->object->size, 
ob->size);
+                                       copy_v3_v3(base->object->dsize, 
ob->dsize);
                                }
                                else if(event==4) {  /* drawtype */
                                        base->object->dt= ob->dt;
@@ -1331,7 +1331,7 @@
                                        base->object->index= ob->index;
                                }
                                else if(event==31) { /* object color */
-                                       QUATCOPY(base->object->col, ob->col);
+                                       copy_v4_v4(base->object->col, ob->col);
                                }
                        }
                }

Modified: trunk/blender/source/blender/editors/object/object_transform.c
===================================================================
--- trunk/blender/source/blender/editors/object/object_transform.c      
2011-11-06 16:23:28 UTC (rev 41594)
+++ trunk/blender/source/blender/editors/object/object_transform.c      
2011-11-06 16:34:44 UTC (rev 41595)
@@ -133,7 +133,7 @@
                        float eul[3], oldeul[3], quat1[4] = {0};
                        
                        if (ob->rotmode == ROT_MODE_QUAT) {
-                               QUATCOPY(quat1, ob->quat);
+                               copy_qt_qt(quat1, ob->quat);
                                quat_to_eul(oldeul, ob->quat);
                        }
                        else if (ob->rotmode == ROT_MODE_AXISANGLE) {

Modified: trunk/blender/source/blender/editors/sculpt_paint/paint_image.c
===================================================================
--- trunk/blender/source/blender/editors/sculpt_paint/paint_image.c     
2011-11-06 16:23:28 UTC (rev 41594)
+++ trunk/blender/source/blender/editors/sculpt_paint/paint_image.c     
2011-11-06 16:34:44 UTC (rev 41595)
@@ -607,7 +607,7 @@
                                best_face_index = face_index;
                                best_side = 0;
                                z_depth_best = z_depth;
-                               VECCOPY(w, w_tmp);
+                               copy_v3_v3(w, w_tmp);
                        }
                }
                else if (mf->v4) {
@@ -621,7 +621,7 @@
                                        best_face_index = face_index;
                                        best_side= 1;
                                        z_depth_best = z_depth;
-                                       VECCOPY(w, w_tmp);
+                                       copy_v3_v3(w, w_tmp);
                                }
                        }
                }
@@ -722,7 +722,7 @@
                
                if (rgba_fp) {
                        if (ibuf->rect_float) {
-                               QUATCOPY(rgba_fp, ((float *)ibuf->rect_float + 
((xi + yi * ibuf->x) * 4)));
+                               copy_v4_v4(rgba_fp, ((float *)ibuf->rect_float 
+ ((xi + yi * ibuf->x) * 4)));
                        }
                        else {
                                char *tmp_ch= ((char *)ibuf->rect) + ((xi + yi 
* ibuf->x) * 4);
@@ -1431,7 +1431,7 @@
        }
        
        /* screenspace unclamped, we could keep its z and w values but dont 
need them at the moment */
-       VECCOPY2D(projPixel->projCoSS, pixelScreenCo);
+       copy_v2_v2(projPixel->projCoSS, pixelScreenCo);
        
        projPixel->x_px = x_px;
        projPixel->y_px = y_px;
@@ -1530,8 +1530,8 @@
                
                if (fabsf(l1[0]-l2[0]) < PROJ_GEOM_TOLERANCE) { /* this is a 
single point  (or close to)*/
                        if (BLI_in_rctf(rect, l1[0], l1[1])) {
-                               VECCOPY2D(l1_clip, l1);
-                               VECCOPY2D(l2_clip, l2);
+                               copy_v2_v2(l1_clip, l1);
+                               copy_v2_v2(l2_clip, l2);
                                return 1;
                        }
                        else {
@@ -1539,8 +1539,8 @@
                        }
                }
                
-               VECCOPY2D(l1_clip, l1);
-               VECCOPY2D(l2_clip, l2);
+               copy_v2_v2(l1_clip, l1);
+               copy_v2_v2(l2_clip, l2);
                CLAMP(l1_clip[0], rect->xmin, rect->xmax);
                CLAMP(l2_clip[0], rect->xmin, rect->xmax);
                return 1;
@@ -1558,8 +1558,8 @@
                
                if (fabsf(l1[1]-l2[1]) < PROJ_GEOM_TOLERANCE) { /* this is a 
single point  (or close to)*/
                        if (BLI_in_rctf(rect, l1[0], l1[1])) {
-                               VECCOPY2D(l1_clip, l1);
-                               VECCOPY2D(l2_clip, l2);
+                               copy_v2_v2(l1_clip, l1);
+                               copy_v2_v2(l2_clip, l2);
                                return 1;
                        }
                        else {
@@ -1567,8 +1567,8 @@
                        }
                }
                
-               VECCOPY2D(l1_clip, l1);
-               VECCOPY2D(l2_clip, l2);
+               copy_v2_v2(l1_clip, l1);
+               copy_v2_v2(l2_clip, l2);
                CLAMP(l1_clip[1], rect->ymin, rect->ymax);
                CLAMP(l2_clip[1], rect->ymin, rect->ymax);
                return 1;
@@ -1582,12 +1582,12 @@
                
                /* are either of the points inside the rectangle ? */
                if (BLI_in_rctf(rect, l1[0], l1[1])) {
-                       VECCOPY2D(l1_clip, l1);
+                       copy_v2_v2(l1_clip, l1);
                        ok1 = 1;
                }
                
                if (BLI_in_rctf(rect, l2[0], l2[1])) {
-                       VECCOPY2D(l2_clip, l2);
+                       copy_v2_v2(l2_clip, l2);
                        ok2 = 1;
                }
                
@@ -1912,14 +1912,14 @@
        if (inside_bucket_flag == ISECT_ALL3) {

@@ Diff output truncated at 10240 characters. @@
_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to