oversight in recent mathutils update. obj.matrix = obj.matrix would call its own updage callbacks until it crashed.
This commit is contained in:
@@ -37,44 +37,44 @@ static PyObject *column_vector_multiplication(MatrixObject * mat, VectorObject*
|
||||
/* matrix vector callbacks */
|
||||
int mathutils_matrix_vector_cb_index= -1;
|
||||
|
||||
static int mathutils_matrix_vector_check(BaseMathObject *self_p)
|
||||
static int mathutils_matrix_vector_check(BaseMathObject *bmo)
|
||||
{
|
||||
MatrixObject *self= (MatrixObject *)self_p;
|
||||
MatrixObject *self= (MatrixObject *)bmo->cb_user;
|
||||
return BaseMath_ReadCallback(self);
|
||||
}
|
||||
|
||||
static int mathutils_matrix_vector_get(BaseMathObject *self_p, int subtype, float *vec_from)
|
||||
static int mathutils_matrix_vector_get(BaseMathObject *bmo, int subtype, float *vec_from)
|
||||
{
|
||||
MatrixObject *self= (MatrixObject *)self_p;
|
||||
MatrixObject *self= (MatrixObject *)bmo->cb_user;
|
||||
int i;
|
||||
|
||||
if(!BaseMath_ReadCallback(self))
|
||||
return 0;
|
||||
|
||||
for(i=0; i<self->colSize; i++)
|
||||
for(i=0; i < self->colSize; i++)
|
||||
vec_from[i]= self->matrix[subtype][i];
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int mathutils_matrix_vector_set(BaseMathObject *self_p, int subtype, float *vec_to)
|
||||
static int mathutils_matrix_vector_set(BaseMathObject *bmo, int subtype, float *vec_to)
|
||||
{
|
||||
MatrixObject *self= (MatrixObject *)self_p;
|
||||
MatrixObject *self= (MatrixObject *)bmo->cb_user;
|
||||
int i;
|
||||
|
||||
if(!BaseMath_ReadCallback(self))
|
||||
return 0;
|
||||
|
||||
for(i=0; i<self->colSize; i++)
|
||||
for(i=0; i < self->colSize; i++)
|
||||
self->matrix[subtype][i]= vec_to[i];
|
||||
|
||||
BaseMath_WriteCallback(self);
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int mathutils_matrix_vector_get_index(BaseMathObject *self_p, int subtype, float *vec_from, int index)
|
||||
static int mathutils_matrix_vector_get_index(BaseMathObject *bmo, int subtype, float *vec_from, int index)
|
||||
{
|
||||
MatrixObject *self= (MatrixObject *)self_p;
|
||||
MatrixObject *self= (MatrixObject *)bmo->cb_user;
|
||||
|
||||
if(!BaseMath_ReadCallback(self))
|
||||
return 0;
|
||||
@@ -83,9 +83,9 @@ static int mathutils_matrix_vector_get_index(BaseMathObject *self_p, int subtype
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int mathutils_matrix_vector_set_index(BaseMathObject *self_p, int subtype, float *vec_to, int index)
|
||||
static int mathutils_matrix_vector_set_index(BaseMathObject *bmo, int subtype, float *vec_to, int index)
|
||||
{
|
||||
MatrixObject *self= (MatrixObject*)self_p;
|
||||
MatrixObject *self= (MatrixObject *)bmo->cb_user;
|
||||
|
||||
if(!BaseMath_ReadCallback(self))
|
||||
return 0;
|
||||
|
Reference in New Issue
Block a user