[Bf-blender-cvs] [be9b0e5] framebuffer: From review: rename: color_object > color_texture

Dalai Felinto noreply at git.blender.org
Mon Oct 19 21:00:56 CEST 2015


Commit: be9b0e51c9ff9a799c0ec623daa17bf6dc4db3b8
Author: Dalai Felinto
Date:   Mon Oct 19 16:53:50 2015 -0200
Branches: framebuffer
https://developer.blender.org/rBbe9b0e51c9ff9a799c0ec623daa17bf6dc4db3b8

>From review: rename: color_object > color_texture

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

M	doc/python_api/examples/gpu.offscreen.1.py
M	source/blender/gpu/GPU_extensions.h
M	source/blender/gpu/intern/gpu_extensions.c
M	source/blender/python/intern/gpu_offscreen.c

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

diff --git a/doc/python_api/examples/gpu.offscreen.1.py b/doc/python_api/examples/gpu.offscreen.1.py
index 8e7f223..071b88e 100644
--- a/doc/python_api/examples/gpu.offscreen.1.py
+++ b/doc/python_api/examples/gpu.offscreen.1.py
@@ -63,7 +63,7 @@ class VIEW3D_OT_OffScreenDraw(bpy.types.Operator):
 
         try:
             self._offscreen = gpu.offscreen.new(512, int(512 / aspect_ratio), 0)
-            self._texture = self._offscreen.color_object
+            self._texture = self._offscreen.color_texture
 
         except Exception as E:
             print(E)
diff --git a/source/blender/gpu/GPU_extensions.h b/source/blender/gpu/GPU_extensions.h
index 62d8b85..685ae59 100644
--- a/source/blender/gpu/GPU_extensions.h
+++ b/source/blender/gpu/GPU_extensions.h
@@ -188,7 +188,7 @@ void GPU_offscreen_unbind(GPUOffScreen *ofs, bool restore);
 void GPU_offscreen_read_pixels(GPUOffScreen *ofs, int type, void *pixels);
 int GPU_offscreen_width(const GPUOffScreen *ofs);
 int GPU_offscreen_height(const GPUOffScreen *ofs);
-int GPU_offscreen_color_object(const GPUOffScreen *ofs);
+int GPU_offscreen_color_texture(const GPUOffScreen *ofs);
 
 /* Builtin/Non-generated shaders */
 typedef enum GPUProgramType {
diff --git a/source/blender/gpu/intern/gpu_extensions.c b/source/blender/gpu/intern/gpu_extensions.c
index c42770e..02e57e4 100644
--- a/source/blender/gpu/intern/gpu_extensions.c
+++ b/source/blender/gpu/intern/gpu_extensions.c
@@ -1613,7 +1613,7 @@ int GPU_offscreen_height(const GPUOffScreen *ofs)
 	return ofs->color->h_orig;
 }
 
-int GPU_offscreen_color_object(const GPUOffScreen *ofs)
+int GPU_offscreen_color_texture(const GPUOffScreen *ofs)
 {
 	return ofs->color->bindcode;
 }
diff --git a/source/blender/python/intern/gpu_offscreen.c b/source/blender/python/intern/gpu_offscreen.c
index ced89f4..e5348b9 100644
--- a/source/blender/python/intern/gpu_offscreen.c
+++ b/source/blender/python/intern/gpu_offscreen.c
@@ -96,11 +96,11 @@ static PyObject *pygpu_offscreen_height_get(BPy_GPUOffScreen *self, void *UNUSED
 	return PyLong_FromLong(GPU_offscreen_height(self->ofs));
 }
 
-PyDoc_STRVAR(pygpu_offscreen_color_object_doc, "Color object.\n\n:type: int");
-static PyObject *pygpu_offscreen_color_object_get(BPy_GPUOffScreen *self, void *UNUSED(type))
+PyDoc_STRVAR(pygpu_offscreen_color_texture_doc, "Color texture.\n\n:type: int");
+static PyObject *pygpu_offscreen_color_texture_get(BPy_GPUOffScreen *self, void *UNUSED(type))
 {
 	BPY_GPU_OFFSCREEN_CHECK_OBJ(self);
-	return PyLong_FromLong(GPU_offscreen_color_object(self->ofs));
+	return PyLong_FromLong(GPU_offscreen_color_texture(self->ofs));
 }
 
 PyDoc_STRVAR(pygpu_offscreen_bind_doc,
@@ -272,7 +272,7 @@ static void BPy_GPUOffScreen__tp_dealloc(BPy_GPUOffScreen *self)
 }
 
 static PyGetSetDef bpy_gpu_offscreen_getseters[] = {
-	{(char *)"color_object", (getter)pygpu_offscreen_color_object_get, (setter)NULL, pygpu_offscreen_color_object_doc, NULL},
+	{(char *)"color_texture", (getter)pygpu_offscreen_color_texture_get, (setter)NULL, pygpu_offscreen_color_texture_doc, NULL},
 	{(char *)"width", (getter)pygpu_offscreen_width_get, (setter)NULL, pygpu_offscreen_width_doc, NULL},
 	{(char *)"height", (getter)pygpu_offscreen_height_get, (setter)NULL, pygpu_offscreen_height_doc, NULL},
 	{NULL, NULL, NULL, NULL, NULL}  /* Sentinel */




More information about the Bf-blender-cvs mailing list