Python GPU: Add reference of PyObject GPU object to the GPU object itself
Instead of creating different python wrappers for the same GPU object, return the same `PyObject` created earlier. This also allows for more secure access to existing GPU objects. Reviewed By: brecht Differential Revision: https://developer.blender.org/D11044
This commit is contained in:
@@ -33,4 +33,5 @@ typedef struct BPyGPUTexture {
|
||||
int bpygpu_ParseTexture(PyObject *o, void *p);
|
||||
PyObject *bpygpu_texture_init(void);
|
||||
|
||||
PyObject *BPyGPUTexture_CreatePyObject(struct GPUTexture *tex) ATTR_NONNULL(1);
|
||||
PyObject *BPyGPUTexture_CreatePyObject(struct GPUTexture *tex, bool weak_reference)
|
||||
ATTR_NONNULL(1);
|
||||
|
||||
Reference in New Issue
Block a user