Changeset View
Changeset View
Standalone View
Standalone View
source/blender/python/gpu/gpu_py_vertex_buffer.c
| Show First 20 Lines • Show All 214 Lines • ▼ Show 20 Lines | |||||
| /** \} */ | /** \} */ | ||||
| /* -------------------------------------------------------------------- */ | /* -------------------------------------------------------------------- */ | ||||
| /** \name VertBuf Type | /** \name VertBuf Type | ||||
| * \{ */ | * \{ */ | ||||
| static PyObject *bpygpu_VertBuf_new(PyTypeObject *UNUSED(type), PyObject *args, PyObject *kwds) | PyObject *bpygpu_VertBuf_new(PyTypeObject *UNUSED(type), PyObject *args, PyObject *kwds) | ||||
| { | { | ||||
| const char *error_prefix = "GPUVertBuf.__new__"; | const char *error_prefix = "GPUVertBuf.__new__"; | ||||
| struct { | struct { | ||||
| PyObject *py_fmt; | PyObject *py_fmt; | ||||
| uint len; | uint len; | ||||
| } params; | } params; | ||||
| Show All 38 Lines | |||||
| "\n" | "\n" | ||||
| " Insert data into the buffer for a single attribute.\n" | " Insert data into the buffer for a single attribute.\n" | ||||
| "\n" | "\n" | ||||
| " :param identifier: Either the name or the id of the attribute.\n" | " :param identifier: Either the name or the id of the attribute.\n" | ||||
| " :type identifier: int or str\n" | " :type identifier: int or str\n" | ||||
| " :param data: Sequence of data that should be stored in the buffer\n" | " :param data: Sequence of data that should be stored in the buffer\n" | ||||
| " :type data: sequence of individual values or tuples\n" | " :type data: sequence of individual values or tuples\n" | ||||
| ); | ); | ||||
| static PyObject *bpygpu_VertBuf_attr_fill(BPyGPUVertBuf *self, PyObject *args, PyObject *kwds) | PyObject *bpygpu_VertBuf_attr_fill(BPyGPUVertBuf *self, PyObject *args, PyObject *kwds) | ||||
| { | { | ||||
| PyObject *data; | PyObject *data; | ||||
| PyObject *identifier; | PyObject *identifier; | ||||
| static const char *_keywords[] = {"identifier", "data", NULL}; | static const char *_keywords[] = {"identifier", "data", NULL}; | ||||
| static _PyArg_Parser _parser = {"OO:attr_fill", _keywords, 0}; | static _PyArg_Parser _parser = {"OO:attr_fill", _keywords, 0}; | ||||
| if (!_PyArg_ParseTupleAndKeywordsFast( | if (!_PyArg_ParseTupleAndKeywordsFast( | ||||
| args, kwds, &_parser, | args, kwds, &_parser, | ||||
| ▲ Show 20 Lines • Show All 86 Lines • Show Last 20 Lines | |||||