Fix crash in freestyle vector parsing (hard to believe nobody noticed)

Vectors were being assigned as an array of classes in Vec2f_ptr_from_PyObject and similar functions,
rather then assigning a number to each axis.
This commit is contained in:
2013-12-17 18:01:15 +11:00
parent 61fb34a622
commit f1a989f9c3
6 changed files with 39 additions and 39 deletions

View File

@@ -252,13 +252,13 @@ int Director_BPy_UnaryFunction0D___call__(void *uf0D, PyObject *obj, Interface0D
}
else if (BPy_UnaryFunction0DVec2f_Check(obj)) {
Vec2f vec;
if (!Vec2f_ptr_from_Vector(result, &vec))
if (!Vec2f_ptr_from_Vector(result, vec))
return -1;
((UnaryFunction0D<Vec2f> *)uf0D)->result = vec;
}
else if (BPy_UnaryFunction0DVec3f_Check(obj)) {
Vec3f vec;
if (!Vec3f_ptr_from_Vector(result, &vec))
if (!Vec3f_ptr_from_Vector(result, vec))
return -1;
((UnaryFunction0D<Vec3f> *)uf0D)->result = vec;
}
@@ -304,13 +304,13 @@ int Director_BPy_UnaryFunction1D___call__(void *uf1D, PyObject *obj, Interface1D
}
else if (BPy_UnaryFunction1DVec2f_Check(obj)) {
Vec2f vec;
if (!Vec2f_ptr_from_Vector(result, &vec))
if (!Vec2f_ptr_from_Vector(result, vec))
return -1;
((UnaryFunction1D<Vec2f> *)uf1D)->result = vec;
}
else if (BPy_UnaryFunction1DVec3f_Check(obj)) {
Vec3f vec;
if (!Vec3f_ptr_from_Vector(result, &vec))
if (!Vec3f_ptr_from_Vector(result, vec))
return -1;
((UnaryFunction1D<Vec3f> *)uf1D)->result = vec;
}