Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2011-12-18 11:27:11 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-12-18 11:27:11 +0400
commit414370b8d42324878485e569fc332b814131887f (patch)
tree84b9b3077cccc3a5237bb8c033b6b39859cf9538 /source/blender/python/mathutils/mathutils_Vector.h
parentbfdaa3b187b947a0efcf3a02cb70bbe8aff5e301 (diff)
Support for arbitrary sized vectors - (was limited by 2-4 previously)
patch http://codereview.appspot.com/5482043 from Andrew Hale * Text from the submission * This patch adds the ability to use arbitrary sized vectors from mathutils. Currently vectors are only of size 2, 3 or 4 since they are generally restricted to geometric applications. However, we can use arbitrary sized vectors for efficient calculations and data manipulation.
Diffstat (limited to 'source/blender/python/mathutils/mathutils_Vector.h')
-rw-r--r--source/blender/python/mathutils/mathutils_Vector.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/python/mathutils/mathutils_Vector.h b/source/blender/python/mathutils/mathutils_Vector.h
index 0f7fa174d18..4e10e795602 100644
--- a/source/blender/python/mathutils/mathutils_Vector.h
+++ b/source/blender/python/mathutils/mathutils_Vector.h
@@ -41,11 +41,12 @@ extern PyTypeObject vector_Type;
typedef struct {
BASE_MATH_MEMBERS(vec);
- unsigned char size; /* vec size 2,3 or 4 */
+ int size; /* vec size 2,3 or 4 */
} VectorObject;
/*prototypes*/
PyObject *Vector_CreatePyObject(float *vec, const int size, const int type, PyTypeObject *base_type);
PyObject *Vector_CreatePyObject_cb(PyObject *user, int size, int callback_type, int subtype);
+PyObject *Vector_CreatePyObject_alloc(float *vec, const int size, PyTypeObject *base_type);
#endif /* MATHUTILS_VECTOR_H */