Changeset View
Changeset View
Standalone View
Standalone View
source/blender/python/mathutils/mathutils_geometry.c
| Show First 20 Lines • Show All 1,531 Lines • ▼ Show 20 Lines | static PyObject *M_Geometry_convex_hull_2d(PyObject *UNUSED(self), PyObject *pointlist) | ||||
| return ret; | return ret; | ||||
| } | } | ||||
| /* Return a PyObject that is a list of lists, using the flattened list array | /* Return a PyObject that is a list of lists, using the flattened list array | ||||
| * to fill values, with start_table and len_table giving the start index | * to fill values, with start_table and len_table giving the start index | ||||
| * and length of the toplevel_len sub-lists. | * and length of the toplevel_len sub-lists. | ||||
| */ | */ | ||||
| static PyObject *list_of_lists_from_arrays(int *array, | static PyObject *list_of_lists_from_arrays(const int *array, | ||||
| int *start_table, | const int *start_table, | ||||
| int *len_table, | const int *len_table, | ||||
| int toplevel_len) | int toplevel_len) | ||||
| { | { | ||||
| PyObject *ret, *sublist; | PyObject *ret, *sublist; | ||||
| int i, j, sublist_len, sublist_start, val; | int i, j, sublist_len, sublist_start, val; | ||||
| ret = PyList_New(toplevel_len); | ret = PyList_New(toplevel_len); | ||||
| for (i = 0; i < toplevel_len; i++) { | for (i = 0; i < toplevel_len; i++) { | ||||
| sublist_len = len_table[i]; | sublist_len = len_table[i]; | ||||
| ▲ Show 20 Lines • Show All 284 Lines • Show Last 20 Lines | |||||