From 04b6296e8165736d17fb5167e45a93178f9f71c2 Mon Sep 17 00:00:00 2001 From: Germano Cavalcante Date: Thu, 29 Apr 2021 14:48:59 -0300 Subject: 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 --- source/blender/gpu/GPU_common.h | 1 + 1 file changed, 1 insertion(+) (limited to 'source/blender/gpu/GPU_common.h') diff --git a/source/blender/gpu/GPU_common.h b/source/blender/gpu/GPU_common.h index 1be74701176..bc57a381f00 100644 --- a/source/blender/gpu/GPU_common.h +++ b/source/blender/gpu/GPU_common.h @@ -24,6 +24,7 @@ #pragma once #define PROGRAM_NO_OPTI 0 +#define USE_PY_REFERENCES 1 #if defined(NDEBUG) # define TRUST_NO_ONE 0 -- cgit v1.2.3