[Bf-blender-cvs] [a35d33d5204] master: Fix gross errors in previous commit

Germano Cavalcante noreply at git.blender.org
Fri Apr 30 16:01:03 CEST 2021


Commit: a35d33d5204515fac8e9b3f3f75094f5580dc64e
Author: Germano Cavalcante
Date:   Fri Apr 30 11:00:57 2021 -0300
Branches: master
https://developer.blender.org/rBa35d33d5204515fac8e9b3f3f75094f5580dc64e

Fix gross errors in previous commit

===================================================================

M	source/blender/python/gpu/gpu_py_framebuffer.c
M	source/blender/python/gpu/gpu_py_offscreen.c

===================================================================

diff --git a/source/blender/python/gpu/gpu_py_framebuffer.c b/source/blender/python/gpu/gpu_py_framebuffer.c
index 96a7491e861..b690dbd93dd 100644
--- a/source/blender/python/gpu/gpu_py_framebuffer.c
+++ b/source/blender/python/gpu/gpu_py_framebuffer.c
@@ -654,13 +654,6 @@ PyObject *BPyGPUFrameBuffer_CreatePyObject(GPUFrameBuffer *fb, bool shared_refer
   UNUSED_VARS(shared_reference);
 #endif
 
-  self = PyObject_New(BPyGPUFrameBuffer, &BPyGPUFrameBuffer_Type);
-  self->fb = fb;
-  self->weak_reference = weak_reference;
-
-  BLI_assert(GPU_framebuffer_reference_get(fb) == NULL);
-  GPU_framebuffer_reference_set(fb, &self->fb);
-
 #if GPU_USE_PY_REFERENCES
   self->shared_reference = shared_reference;
 
diff --git a/source/blender/python/gpu/gpu_py_offscreen.c b/source/blender/python/gpu/gpu_py_offscreen.c
index 8359e5282fe..28bd24a6877 100644
--- a/source/blender/python/gpu/gpu_py_offscreen.c
+++ b/source/blender/python/gpu/gpu_py_offscreen.c
@@ -274,8 +274,7 @@ static PyObject *pygpu_offscreen_texture_color_get(BPyGPUOffScreen *self, void *
 {
   BPY_GPU_OFFSCREEN_CHECK_OBJ(self);
   GPUTexture *texture = GPU_offscreen_color_texture(self->ofs);
-  GPU_texture_ref(texture);
-  return BPyGPUTexture_CreatePyObject(texture);
+  return BPyGPUTexture_CreatePyObject(texture, true);
 }
 
 PyDoc_STRVAR(



More information about the Bf-blender-cvs mailing list