[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [24413] branches/bmesh/blender/source/ blender: fixed normals problem with normal constrained transform
Joseph Eagar
joeedh at gmail.com
Sun Nov 8 23:29:08 CET 2009
Revision: 24413
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=24413
Author: joeedh
Date: 2009-11-08 23:29:08 +0100 (Sun, 08 Nov 2009)
Log Message:
-----------
fixed normals problem with normal constrained transform
Modified Paths:
--------------
branches/bmesh/blender/source/blender/blenkernel/BKE_utildefines.h
branches/bmesh/blender/source/blender/editors/transform/transform_orientations.c
Modified: branches/bmesh/blender/source/blender/blenkernel/BKE_utildefines.h
===================================================================
--- branches/bmesh/blender/source/blender/blenkernel/BKE_utildefines.h 2009-11-08 21:33:43 UTC (rev 24412)
+++ branches/bmesh/blender/source/blender/blenkernel/BKE_utildefines.h 2009-11-08 22:29:08 UTC (rev 24413)
@@ -31,6 +31,10 @@
#ifndef BKE_UTILDEFINES_H
#define BKE_UTILDEFINES_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#ifndef FALSE
#define FALSE 0
#endif
@@ -212,5 +216,9 @@
#define BMEMSET(mem, val, size) {unsigned int _i; char *_c = (char*) mem; for (_i=0; _i<size; _i++) *_c++ = val;}
+#ifdef __cplusplus
+}
#endif
+#endif
+
Modified: branches/bmesh/blender/source/blender/editors/transform/transform_orientations.c
===================================================================
--- branches/bmesh/blender/source/blender/editors/transform/transform_orientations.c 2009-11-08 21:33:43 UTC (rev 24412)
+++ branches/bmesh/blender/source/blender/editors/transform/transform_orientations.c 2009-11-08 22:29:08 UTC (rev 24413)
@@ -580,8 +580,8 @@
Object *ob = OBACT;
int result = ORIENTATION_NONE;
- normal[0] = normal[1] = normal[2] = 0;
- plane[0] = plane[1] = plane[2] = 0;
+ normal[0] = normal[1] = normal[2] = 0.0f;
+ plane[0] = plane[1] = plane[2] = 0.0f;
if(obedit)
{
@@ -611,13 +611,13 @@
switch (ese.type)
{
- case EDITVERT:
+ case BM_VERT:
result = ORIENTATION_VERT;
break;
- case EDITEDGE:
+ case BM_EDGE:
result = ORIENTATION_EDGE;
break;
- case EDITFACE:
+ case BM_FACE:
result = ORIENTATION_FACE;
break;
}
@@ -734,7 +734,7 @@
else if (em->bm->totvertsel > 3)
{
BMIter iter;
- normal[0] = normal[1] = normal[2] = 0;
+ normal[0] = normal[1] = normal[2] = 0.0f;
BM_ITER(eve, &iter, em->bm, BM_VERTS_OF_MESH, NULL) {
if (BM_TestHFlag(eve, BM_SELECT)) {
@@ -942,7 +942,7 @@
return result;
}
-void getTransformOrientationMatrix(const bContext *C, float twmat[][4], int activeOnly)
+void getTransformOrientationMatrix(const bContext *C, float twmat[][3], int activeOnly)
{
float normal[3]={0.0, 0.0, 0.0};
float plane[3]={0.0, 0.0, 0.0};
@@ -982,10 +982,10 @@
if (type == ORIENTATION_NONE)
{
- Mat4One(twmat);
+ Mat3One(twmat);
}
else
{
- Mat4CpyMat3(twmat, mat);
+ Mat3CpyMat3(twmat, mat);
}
}
More information about the Bf-blender-cvs
mailing list