Page Menu
Home
Search
Configure Global Search
Log In
Files
F1135
patch-various
Public
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Authored By
Ken Hughes (khughes)
Nov 13 2013, 12:54 PM
Size
26 KB
Subscribers
None
patch-various
View Options
Index: source/blender/python/api2_2x/matrix.c
===================================================================
RCS file: /cvsroot/bf-blender/blender/source/blender/python/api2_2x/matrix.c,v
retrieving revision 1.26
diff -u -r1.26 matrix.c
--- source/blender/python/api2_2x/matrix.c 12 Sep 2005 06:18:45 -0000 1.26
+++ source/blender/python/api2_2x/matrix.c 14 Sep 2005 23:02:26 -0000
@@ -46,6 +46,17 @@
char Matrix_Resize4x4_doc[] = "() - resize the matrix to a 4x4 square matrix";
char Matrix_toEuler_doc[] = "() - convert matrix to a euler angle rotation";
char Matrix_toQuat_doc[] = "() - convert matrix to a quaternion rotation";
+
+static PyObject *Matrix_Zero( MatrixObject * self );
+static PyObject *Matrix_Identity( MatrixObject * self );
+static PyObject *Matrix_Transpose( MatrixObject * self );
+static PyObject *Matrix_Determinant( MatrixObject * self );
+static PyObject *Matrix_Invert( MatrixObject * self );
+static PyObject *Matrix_TranslationPart( MatrixObject * self );
+static PyObject *Matrix_RotationPart( MatrixObject * self );
+static PyObject *Matrix_Resize4x4( MatrixObject * self );
+static PyObject *Matrix_toEuler( MatrixObject * self );
+static PyObject *Matrix_toQuat( MatrixObject * self );
//-----------------------METHOD DEFINITIONS ----------------------
struct PyMethodDef Matrix_methods[] = {
{"zero", (PyCFunction) Matrix_Zero, METH_NOARGS, Matrix_Zero_doc},
@@ -142,7 +153,7 @@
}
self->rowSize = 4;
self->colSize = 4;
- return EXPP_incr_ret((PyObject*)self);
+ return EXPP_incr_ret( Py_None );
}
//---------------------------Matrix.translationPart() ------------
PyObject *Matrix_TranslationPart(MatrixObject * self)
@@ -183,24 +194,22 @@
return newMatrixObject(mat, 3, 3, Py_NEW);
}
-//---------------------------Matrix.invert() ---------------------
-PyObject *Matrix_Invert(MatrixObject * self)
+
+static int matrix_invert(MatrixObject * self)
{
-
int x, y, z = 0;
float det = 0.0f;
PyObject *f = NULL;
float mat[16] = {0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f,
0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f};
- if(self->rowSize != self->colSize){
- return EXPP_ReturnPyObjError(PyExc_AttributeError,
- "Matrix.invert: only square matrices are supported\n");
- }
+ if(self->rowSize != self->colSize)
+ return 0;
//calculate the determinant
f = Matrix_Determinant(self);
det = (float)PyFloat_AS_DOUBLE(f);
+ Py_DECREF( f );
if(det != 0) {
//calculate the classical adjoint
@@ -230,7 +239,16 @@
} else {
printf("Matrix.invert: matrix does not have an inverse\n");
}
- return EXPP_incr_ret((PyObject*)self);
+ return 1;
+}
+//
+//---------------------------Matrix.invert() ---------------------
+static PyObject *Matrix_Invert(MatrixObject * self)
+{
+ if( !matrix_invert( self ) )
+ return EXPP_ReturnPyObjError(PyExc_AttributeError,
+ "Matrix.invert: only square matrices are supported\n");
+ return EXPP_incr_ret( Py_None );
}
//---------------------------Matrix.determinant() ----------------
PyObject *Matrix_Determinant(MatrixObject * self)
@@ -277,7 +295,7 @@
Mat4Transp((float (*)[4])*self->matrix);
}
- return EXPP_incr_ret((PyObject*)self);
+ return EXPP_incr_ret( Py_None );
}
//---------------------------Matrix.zero() -----------------------
PyObject *Matrix_Zero(MatrixObject * self)
@@ -289,15 +307,13 @@
self->matrix[row][col] = 0.0f;
}
}
- return EXPP_incr_ret((PyObject*)self);
+ return EXPP_incr_ret( Py_None );
}
-//---------------------------Matrix.identity(() ------------------
-PyObject *Matrix_Identity(MatrixObject * self)
+
+int matrix_identity(MatrixObject * self)
{
- if(self->rowSize != self->colSize){
- return EXPP_ReturnPyObjError(PyExc_AttributeError,
- "Matrix.identity: only square matrices are supported\n");
- }
+ if(self->rowSize != self->colSize)
+ return 0;
if(self->rowSize == 2) {
self->matrix[0][0] = 1.0f;
@@ -310,7 +326,15 @@
Mat4One((float (*)[4]) *self->matrix);
}
- return EXPP_incr_ret((PyObject*)self);
+ return 1;
+}
+//---------------------------Matrix.identity(() ------------------
+static PyObject *Matrix_Identity(MatrixObject * self)
+{
+ if( !matrix_identity( self ) )
+ return EXPP_ReturnPyObjError(PyExc_AttributeError,
+ "Matrix.identity: only square matrices are supported\n");
+ return EXPP_incr_ret( Py_None );
}
//----------------------------dealloc()(internal) ----------------
//free the py_object
@@ -372,7 +396,7 @@
}
}
- return EXPP_incr_ret(PyString_FromString(str));
+ return PyString_FromString(str);
}
//---------------------SEQUENCE PROTOCOLS------------------------
@@ -456,7 +480,7 @@
newVectorObject(self->matrix[count], self->colSize, Py_WRAP));
}
- return EXPP_incr_ret(list);
+ return list;
}
//----------------------------object[z:y]------------------------
//sequence slice (set)
@@ -676,10 +700,23 @@
return EXPP_ReturnPyObjError(PyExc_TypeError,
"Matrix multiplication: arguments not acceptable for this operation\n");
}
-PyObject* Matrix_inv(MatrixObject *self)
+
+//------------------------~obj-----------------------
+static PyObject* Matrix_inv(MatrixObject *self)
{
- return Matrix_Invert(self);
+ MatrixObject *newmax;
+ int i, j;
+
+ newmax = (MatrixObject *)newMatrixObject( NULL, self->rowSize,
+ self->colSize, Py_NEW );
+
+ for(i = 0; i < newmax->rowSize; ++i )
+ for(j = 0; j < newmax->colSize; ++j )
+ newmax->matrix[i][j] = self->matrix[i][j];
+ matrix_invert( newmax );
+ return (PyObject *)newmax;
}
+
//------------------------coerce(obj, obj)-----------------------
//coercion of unknown types to type MatrixObject for numeric protocols
/*Coercion() is called whenever a math operation has 2 operands that
@@ -831,7 +868,7 @@
}
}
} else { //or if no arguments are passed return identity matrix
- Matrix_Identity(self);
+ matrix_identity(self);
}
self->wrapped = Py_NEW;
}else{ //bad type
Index: source/blender/python/api2_2x/euler.c
===================================================================
RCS file: /cvsroot/bf-blender/blender/source/blender/python/api2_2x/euler.c,v
retrieving revision 1.13
diff -u -r1.13 euler.c
--- source/blender/python/api2_2x/euler.c 12 Sep 2005 06:18:45 -0000 1.13
+++ source/blender/python/api2_2x/euler.c 14 Sep 2005 23:02:26 -0000
@@ -43,6 +43,12 @@
char Euler_ToMatrix_doc[] = "() - returns a rotation matrix representing the euler rotation";
char Euler_ToQuat_doc[] = "() - returns a quaternion representing the euler rotation";
char Euler_Rotate_doc[] = "() - rotate a euler by certain amount around an axis of rotation";
+
+static PyObject *Euler_Zero( EulerObject * self );
+static PyObject *Euler_Unique( EulerObject * self );
+static PyObject *Euler_ToMatrix( EulerObject * self );
+static PyObject *Euler_ToQuat( EulerObject * self );
+static PyObject *Euler_Rotate( EulerObject * self, PyObject *args );
//-----------------------METHOD DEFINITIONS ----------------------
struct PyMethodDef Euler_methods[] = {
{"zero", (PyCFunction) Euler_Zero, METH_NOARGS, Euler_Zero_doc},
@@ -55,7 +61,7 @@
//-----------------------------METHODS----------------------------
//----------------------------Euler.toQuat()----------------------
//return a quaternion representation of the euler
-PyObject *Euler_ToQuat(EulerObject * self)
+static PyObject *Euler_ToQuat(EulerObject * self)
{
float eul[3];
float quat[4];
@@ -69,7 +75,7 @@
}
//----------------------------Euler.toMatrix()---------------------
//return a matrix representation of the euler
-PyObject *Euler_ToMatrix(EulerObject * self)
+static PyObject *Euler_ToMatrix(EulerObject * self)
{
float eul[3];
float mat[9] = {0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f};
@@ -83,7 +89,7 @@
}
//----------------------------Euler.unique()-----------------------
//sets the x,y,z values to a unique euler rotation
-PyObject *Euler_Unique(EulerObject * self)
+static PyObject *Euler_Unique(EulerObject * self)
{
double heading, pitch, bank;
double pi2 = Py_PI * 2.0f;
@@ -129,22 +135,22 @@
self->eul[1] = (float)(pitch * 180 / (float)Py_PI);
self->eul[2] = (float)(bank * 180 / (float)Py_PI);
- return EXPP_incr_ret((PyObject*)self);
+ return EXPP_incr_ret( Py_None );
}
//----------------------------Euler.zero()-------------------------
//sets the euler to 0,0,0
-PyObject *Euler_Zero(EulerObject * self)
+static PyObject *Euler_Zero(EulerObject * self)
{
self->eul[0] = 0.0;
self->eul[1] = 0.0;
self->eul[2] = 0.0;
- return EXPP_incr_ret((PyObject*)self);
+ return EXPP_incr_ret( Py_None );
}
//----------------------------Euler.rotate()-----------------------
//rotates a euler a certain amount and returns the result
//should return a unique euler rotation (i.e. no 720 degree pitches :)
-PyObject *Euler_Rotate(EulerObject * self, PyObject *args)
+static PyObject *Euler_Rotate(EulerObject * self, PyObject *args)
{
float angle = 0.0f;
char *axis;
@@ -170,7 +176,7 @@
self->eul[x] *= (180 / (float)Py_PI);
}
- return EXPP_incr_ret((PyObject*)self);
+ return EXPP_incr_ret( Py_None );
}
//----------------------------dealloc()(internal) ------------------
//free the py_object
Index: source/blender/python/api2_2x/quat.c
===================================================================
RCS file: /cvsroot/bf-blender/blender/source/blender/python/api2_2x/quat.c,v
retrieving revision 1.16
diff -u -r1.16 quat.c
--- source/blender/python/api2_2x/quat.c 12 Sep 2005 06:18:45 -0000 1.16
+++ source/blender/python/api2_2x/quat.c 14 Sep 2005 23:02:26 -0000
@@ -45,6 +45,14 @@
char Quaternion_Normalize_doc[] = "() - normalize the vector portion of the quaternion";
char Quaternion_ToEuler_doc[] = "() - return a euler rotation representing the quaternion";
char Quaternion_ToMatrix_doc[] = "() - return a rotation matrix representing the quaternion";
+
+static PyObject *Quaternion_Identity( QuaternionObject * self );
+static PyObject *Quaternion_Negate( QuaternionObject * self );
+static PyObject *Quaternion_Conjugate( QuaternionObject * self );
+static PyObject *Quaternion_Inverse( QuaternionObject * self );
+static PyObject *Quaternion_Normalize( QuaternionObject * self );
+static PyObject *Quaternion_ToEuler( QuaternionObject * self );
+static PyObject *Quaternion_ToMatrix( QuaternionObject * self );
//-----------------------METHOD DEFINITIONS ----------------------
struct PyMethodDef Quaternion_methods[] = {
{"identity", (PyCFunction) Quaternion_Identity, METH_NOARGS, Quaternion_Identity_doc},
@@ -59,7 +67,7 @@
//-----------------------------METHODS------------------------------
//----------------------------Quaternion.toEuler()------------------
//return the quat as a euler
-PyObject *Quaternion_ToEuler(QuaternionObject * self)
+static PyObject *Quaternion_ToEuler(QuaternionObject * self)
{
float eul[3];
int x;
@@ -72,7 +80,7 @@
}
//----------------------------Quaternion.toMatrix()------------------
//return the quat as a matrix
-PyObject *Quaternion_ToMatrix(QuaternionObject * self)
+static PyObject *Quaternion_ToMatrix(QuaternionObject * self)
{
float mat[9] = {0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f};
QuatToMat3(self->quat, (float (*)[3]) mat);
@@ -81,14 +89,14 @@
}
//----------------------------Quaternion.normalize()----------------
//normalize the axis of rotation of [theta,vector]
-PyObject *Quaternion_Normalize(QuaternionObject * self)
+static PyObject *Quaternion_Normalize(QuaternionObject * self)
{
NormalQuat(self->quat);
- return EXPP_incr_ret((PyObject*)self);
+ return EXPP_incr_ret( Py_None );
}
//----------------------------Quaternion.inverse()------------------
//invert the quat
-PyObject *Quaternion_Inverse(QuaternionObject * self)
+static PyObject *Quaternion_Inverse(QuaternionObject * self)
{
double mag = 0.0f;
int x;
@@ -104,7 +112,7 @@
self->quat[x] /= (float)(mag * mag);
}
- return EXPP_incr_ret((PyObject*)self);
+ return EXPP_incr_ret( Py_None );
}
//----------------------------Quaternion.identity()-----------------
//generate the identity quaternion
@@ -115,27 +123,27 @@
self->quat[2] = 0.0;
self->quat[3] = 0.0;
- return EXPP_incr_ret((PyObject*)self);
+ return EXPP_incr_ret( Py_None );
}
//----------------------------Quaternion.negate()-------------------
//negate the quat
-PyObject *Quaternion_Negate(QuaternionObject * self)
+static PyObject *Quaternion_Negate(QuaternionObject * self)
{
int x;
for(x = 0; x < 4; x++) {
self->quat[x] = -self->quat[x];
}
- return EXPP_incr_ret((PyObject*)self);
+ return EXPP_incr_ret( Py_None );
}
//----------------------------Quaternion.conjugate()----------------
//negate the vector part
-PyObject *Quaternion_Conjugate(QuaternionObject * self)
+static PyObject *Quaternion_Conjugate(QuaternionObject * self)
{
int x;
for(x = 1; x < 4; x++) {
self->quat[x] = -self->quat[x];
}
- return EXPP_incr_ret((PyObject*)self);
+ return EXPP_incr_ret( Py_None );
}
//----------------------------dealloc()(internal) ------------------
//free the py_object
@@ -588,4 +596,12 @@
return NULL;
}
return (PyObject *) self;
+}
+
+void quaternion_identity(QuaternionObject * self)
+{
+ self->quat[0] = 1.0;
+ self->quat[1] = 0.0;
+ self->quat[2] = 0.0;
+ self->quat[3] = 0.0;
}
Index: source/blender/python/api2_2x/point.c
===================================================================
RCS file: /cvsroot/bf-blender/blender/source/blender/python/api2_2x/point.c,v
retrieving revision 1.3
diff -u -r1.3 point.c
--- source/blender/python/api2_2x/point.c 12 Sep 2005 06:18:45 -0000 1.3
+++ source/blender/python/api2_2x/point.c 14 Sep 2005 23:02:26 -0000
@@ -38,6 +38,9 @@
//-------------------------DOC STRINGS ---------------------------
char Point_Zero_doc[] = "() - set all values in the point to 0";
char Point_toVector_doc[] = "() - create a vector representation of this point";
+
+static PyObject *Point_Zero( PointObject * self );
+static PyObject *Point_toVector(PointObject * self);
//-----------------------METHOD DEFINITIONS ----------------------
struct PyMethodDef Point_methods[] = {
{"zero", (PyCFunction) Point_Zero, METH_NOARGS, Point_Zero_doc},
@@ -47,7 +50,7 @@
//-----------------------------METHODS----------------------------
//--------------------------Vector.toPoint()----------------------
//create a new point object to represent this vector
-PyObject *Point_toVector(PointObject * self)
+static PyObject *Point_toVector(PointObject * self)
{
float vec[3];
int x;
@@ -60,13 +63,13 @@
}
//----------------------------Point.zero() ----------------------
//set the point data to 0,0,0
-PyObject *Point_Zero(PointObject * self)
+static PyObject *Point_Zero(PointObject * self)
{
int x;
for(x = 0; x < self->size; x++) {
self->coord[x] = 0.0f;
}
- return EXPP_incr_ret((PyObject*)self);
+ return EXPP_incr_ret( Py_None );
}
//----------------------------dealloc()(internal) ----------------
//free the py_object
@@ -414,12 +417,13 @@
//returns the negative of this object
static PyObject *Point_neg(PointObject *self)
{
+ float coord[3];
int x;
- for(x = 0; x < self->size; x++){
- self->coord[x] = -self->coord[x];
- }
- return EXPP_incr_ret((PyObject *)self);
+ for(x = 0; x < self->size; x++)
+ coord[x] = -self->coord[x];
+
+ return newPointObject( coord, self->size, Py_NEW );
}
//------------------------coerce(obj, obj)-----------------------
//coercion of unknown types to type PointObject for numeric protocols
Index: source/blender/python/api2_2x/vector.c
===================================================================
RCS file: /cvsroot/bf-blender/blender/source/blender/python/api2_2x/vector.c,v
retrieving revision 1.30
diff -u -r1.30 vector.c
--- source/blender/python/api2_2x/vector.c 12 Sep 2005 06:18:45 -0000 1.30
+++ source/blender/python/api2_2x/vector.c 14 Sep 2005 23:02:27 -0000
@@ -43,6 +43,14 @@
char Vector_Resize3D_doc[] = "() - resize a vector to [x,y,z]";
char Vector_Resize4D_doc[] = "() - resize a vector to [x,y,z,w]";
char Vector_toPoint_doc[] = "() - create a new Point Object from this vector";
+
+static PyObject *Vector_Zero( VectorObject * self );
+static PyObject *Vector_Normalize( VectorObject * self );
+static PyObject *Vector_Negate( VectorObject * self );
+static PyObject *Vector_Resize2D( VectorObject * self );
+static PyObject *Vector_Resize3D( VectorObject * self );
+static PyObject *Vector_Resize4D( VectorObject * self );
+static PyObject *Vector_toPoint( VectorObject * self );
//-----------------------METHOD DEFINITIONS ----------------------
struct PyMethodDef Vector_methods[] = {
{"zero", (PyCFunction) Vector_Zero, METH_NOARGS, Vector_Zero_doc},
@@ -74,17 +82,17 @@
}
//----------------------------Vector.zero() ----------------------
//set the vector data to 0,0,0
-PyObject *Vector_Zero(VectorObject * self)
+static PyObject *Vector_Zero(VectorObject * self)
{
int x;
for(x = 0; x < self->size; x++) {
self->vec[x] = 0.0f;
}
- return EXPP_incr_ret((PyObject*)self);
+ return EXPP_incr_ret( Py_None );
}
//----------------------------Vector.normalize() -----------------
//normalize the vector data to a unit vector
-PyObject *Vector_Normalize(VectorObject * self)
+static PyObject *Vector_Normalize(VectorObject * self)
{
int x;
float norm = 0.0f;
@@ -96,11 +104,11 @@
for(x = 0; x < self->size; x++) {
self->vec[x] /= norm;
}
- return EXPP_incr_ret((PyObject*)self);
+ return EXPP_incr_ret( Py_None );
}
//----------------------------Vector.resize2D() ------------------
//resize the vector to x,y
-PyObject *Vector_Resize2D(VectorObject * self)
+static PyObject *Vector_Resize2D(VectorObject * self)
{
if(self->data.blend_data){
return EXPP_ReturnPyObjError(PyExc_TypeError,
@@ -115,11 +123,11 @@
}
self->vec = self->data.py_data; //force
self->size = 2;
- return EXPP_incr_ret((PyObject*)self);
+ return EXPP_incr_ret( Py_None );
}
//----------------------------Vector.resize3D() ------------------
//resize the vector to x,y,z
-PyObject *Vector_Resize3D(VectorObject * self)
+static PyObject *Vector_Resize3D(VectorObject * self)
{
if(self->data.blend_data){
return EXPP_ReturnPyObjError(PyExc_TypeError,
@@ -137,11 +145,11 @@
self->data.py_data[2] = 0.0f;
}
self->size = 3;
- return EXPP_incr_ret((PyObject*)self);
+ return EXPP_incr_ret( Py_None );
}
//----------------------------Vector.resize4D() ------------------
//resize the vector to x,y,z,w
-PyObject *Vector_Resize4D(VectorObject * self)
+static PyObject *Vector_Resize4D(VectorObject * self)
{
if(self->data.blend_data){
return EXPP_ReturnPyObjError(PyExc_TypeError,
@@ -162,7 +170,7 @@
self->data.py_data[3] = 0.0f;
}
self->size = 4;
- return EXPP_incr_ret((PyObject*)self);
+ return EXPP_incr_ret( Py_None );
}
//----------------------------dealloc()(internal) ----------------
//free the py_object
@@ -544,12 +552,13 @@
//returns the negative of this object
static PyObject *Vector_neg(VectorObject *self)
{
+ float vec[4];
int x;
- for(x = 0; x < self->size; x++){
- self->vec[x] = -self->vec[x];
- }
- return EXPP_incr_ret((PyObject *)self);
+ for(x = 0; x < self->size; x++)
+ vec[x] = -self->vec[x];
+
+ return newVectorObject( vec, self->size, Py_NEW );
}
//------------------------coerce(obj, obj)-----------------------
//coercion of unknown types to type VectorObject for numeric protocols
@@ -674,18 +683,25 @@
return (PyObject *) self;
}
+void vector_zero(VectorObject * self)
+{
+ int x;
+ for(x = 0; x < self->size; x++)
+ self->vec[x] = 0.0f;
+}
+
//#############################DEPRECATED################################
//#######################################################################
//----------------------------Vector.negate() --------------------
//set the vector to it's negative -x, -y, -z
-PyObject *Vector_Negate(VectorObject * self)
+static PyObject *Vector_Negate(VectorObject * self)
{
int x;
for(x = 0; x < self->size; x++) {
self->vec[x] = -(self->vec[x]);
}
printf("Vector.negate(): Deprecated: use -vector instead\n");
- return EXPP_incr_ret((PyObject*)self);
+ return EXPP_incr_ret( Py_None );
}
//#######################################################################
//#############################DEPRECATED################################
Index: source/blender/python/api2_2x/Mathutils.c
===================================================================
RCS file: /cvsroot/bf-blender/blender/source/blender/python/api2_2x/Mathutils.c,v
retrieving revision 1.17
diff -u -r1.17 Mathutils.c
--- source/blender/python/api2_2x/Mathutils.c 23 Jul 2005 13:46:39 -0000 1.17
+++ source/blender/python/api2_2x/Mathutils.c 14 Sep 2005 23:02:27 -0000
@@ -1347,7 +1347,7 @@
"Mathutils.RotateEuler(): expected euler type & float & string");
printf("Mathutils.RotateEuler(): Deprecated:use Euler.rotate() to rotate a euler\n");
- Euler_Rotate(Eul, Py_BuildValue("fs", angle, axis));
+ euler_rot(Eul->eul, angle, axis[0]);
return EXPP_incr_ret(Py_None);
}
//----------------------------------Mathutils.MatMultVec() --------------
Index: source/blender/python/api2_2x/Bone.c
===================================================================
RCS file: /cvsroot/bf-blender/blender/source/blender/python/api2_2x/Bone.c,v
retrieving revision 1.35
diff -u -r1.35 Bone.c
--- source/blender/python/api2_2x/Bone.c 11 Sep 2005 10:12:31 -0000 1.35
+++ source/blender/python/api2_2x/Bone.c 14 Sep 2005 23:02:27 -0000
@@ -621,18 +621,18 @@
py_bone->flag = 32;
py_bone->dist = 1.0f;
py_bone->weight = 1.0f;
- Vector_Zero( py_bone->head );
- Vector_Zero( py_bone->loc );
- Vector_Zero( py_bone->dloc );
- Vector_Zero( py_bone->size );
- Vector_Zero( py_bone->dsize );
- Quaternion_Identity( py_bone->quat );
- Quaternion_Identity( py_bone->dquat );
- Matrix_Identity( py_bone->obmat );
- Matrix_Identity( py_bone->parmat );
- Matrix_Identity( py_bone->defmat );
- Matrix_Identity( py_bone->irestmat );
- Matrix_Identity( py_bone->posemat );
+ vector_zero( py_bone->head );
+ vector_zero( py_bone->loc );
+ vector_zero( py_bone->dloc );
+ vector_zero( py_bone->size );
+ vector_zero( py_bone->dsize );
+ quaternion_identity( py_bone->quat );
+ quaternion_identity( py_bone->dquat );
+ matrix_identity( py_bone->obmat );
+ matrix_identity( py_bone->parmat );
+ matrix_identity( py_bone->defmat );
+ matrix_identity( py_bone->irestmat );
+ matrix_identity( py_bone->posemat );
//default tail of 2,0,0
py_bone->tail->vec[0] = 2.0f;
Index: source/blender/python/api2_2x/matrix.h
===================================================================
RCS file: /cvsroot/bf-blender/blender/source/blender/python/api2_2x/matrix.h,v
retrieving revision 1.10
diff -u -r1.10 matrix.h
--- source/blender/python/api2_2x/matrix.h 23 Jul 2005 13:46:40 -0000 1.10
+++ source/blender/python/api2_2x/matrix.h 14 Sep 2005 23:02:27 -0000
@@ -61,16 +61,7 @@
blender (stored in blend_data). This is an either/or struct not both*/
//prototypes
-PyObject *Matrix_Zero( MatrixObject * self );
-PyObject *Matrix_Identity( MatrixObject * self );
-PyObject *Matrix_Transpose( MatrixObject * self );
-PyObject *Matrix_Determinant( MatrixObject * self );
-PyObject *Matrix_Invert( MatrixObject * self );
-PyObject *Matrix_TranslationPart( MatrixObject * self );
-PyObject *Matrix_RotationPart( MatrixObject * self );
-PyObject *Matrix_Resize4x4( MatrixObject * self );
-PyObject *Matrix_toEuler( MatrixObject * self );
-PyObject *Matrix_toQuat( MatrixObject * self );
PyObject *newMatrixObject(float *mat, int rowSize, int colSize, int type);
+int matrix_identity( MatrixObject * self );
#endif /* EXPP_matrix_H */
Index: source/blender/python/api2_2x/euler.h
===================================================================
RCS file: /cvsroot/bf-blender/blender/source/blender/python/api2_2x/euler.h,v
retrieving revision 1.9
diff -u -r1.9 euler.h
--- source/blender/python/api2_2x/euler.h 23 Jul 2005 13:46:39 -0000 1.9
+++ source/blender/python/api2_2x/euler.h 14 Sep 2005 23:02:27 -0000
@@ -54,11 +54,6 @@
blender (stored in blend_data). This is an either/or struct not both*/
//prototypes
-PyObject *Euler_Zero( EulerObject * self );
-PyObject *Euler_Unique( EulerObject * self );
-PyObject *Euler_ToMatrix( EulerObject * self );
-PyObject *Euler_ToQuat( EulerObject * self );
-PyObject *Euler_Rotate( EulerObject * self, PyObject *args );
PyObject *newEulerObject( float *eul, int type );
#endif /* EXPP_euler_h */
Index: source/blender/python/api2_2x/quat.h
===================================================================
RCS file: /cvsroot/bf-blender/blender/source/blender/python/api2_2x/quat.h,v
retrieving revision 1.9
diff -u -r1.9 quat.h
--- source/blender/python/api2_2x/quat.h 23 Jul 2005 13:46:40 -0000 1.9
+++ source/blender/python/api2_2x/quat.h 14 Sep 2005 23:02:27 -0000
@@ -58,13 +58,7 @@
blender (stored in blend_data). This is an either/or struct not both*/
//prototypes
-PyObject *Quaternion_Identity( QuaternionObject * self );
-PyObject *Quaternion_Negate( QuaternionObject * self );
-PyObject *Quaternion_Conjugate( QuaternionObject * self );
-PyObject *Quaternion_Inverse( QuaternionObject * self );
-PyObject *Quaternion_Normalize( QuaternionObject * self );
-PyObject *Quaternion_ToEuler( QuaternionObject * self );
-PyObject *Quaternion_ToMatrix( QuaternionObject * self );
PyObject *newQuaternionObject( float *quat, int type );
+void quaternion_identity( QuaternionObject * self );
#endif /* EXPP_quat_h */
Index: source/blender/python/api2_2x/point.h
===================================================================
RCS file: /cvsroot/bf-blender/blender/source/blender/python/api2_2x/point.h,v
retrieving revision 1.2
diff -u -r1.2 point.h
--- source/blender/python/api2_2x/point.h 26 Jul 2005 13:30:08 -0000 1.2
+++ source/blender/python/api2_2x/point.h 14 Sep 2005 23:02:27 -0000
@@ -58,8 +58,6 @@
blender (stored in blend_data). This is an either/or struct not both*/
//prototypes
-PyObject *Point_Zero( PointObject * self );
-PyObject *Point_toVector(PointObject * self);
PyObject *newPointObject(float *coord, int size, int type);
#endif /* EXPP_point_h */
Index: source/blender/python/api2_2x/vector.h
===================================================================
RCS file: /cvsroot/bf-blender/blender/source/blender/python/api2_2x/vector.h,v
retrieving revision 1.15
diff -u -r1.15 vector.h
--- source/blender/python/api2_2x/vector.h 23 Jul 2005 13:46:40 -0000 1.15
+++ source/blender/python/api2_2x/vector.h 14 Sep 2005 23:02:27 -0000
@@ -58,13 +58,7 @@
blender (stored in blend_data). This is an either/or struct not both*/
//prototypes
-PyObject *Vector_Zero( VectorObject * self );
-PyObject *Vector_Normalize( VectorObject * self );
-PyObject *Vector_Negate( VectorObject * self );
-PyObject *Vector_Resize2D( VectorObject * self );
-PyObject *Vector_Resize3D( VectorObject * self );
-PyObject *Vector_Resize4D( VectorObject * self );
-PyObject *Vector_toPoint( VectorObject * self );
PyObject *newVectorObject(float *vec, int size, int type);
+void vector_zero( VectorObject * self );
#endif /* EXPP_vector_h */
File Metadata
Details
Mime Type
text/x-diff
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
ec/0d/69d7ed78c93e0ee81471f4916026
Event Timeline
Log In to Comment