[Bf-blender-cvs] [dc6ba4f2ec1] blender2.8: Py API: fix parameter order in offscreen.draw_view3d

Jacques Lucke noreply at git.blender.org
Tue Nov 13 16:26:49 CET 2018


Commit: dc6ba4f2ec1f66e4c182ef7e651da6badf6497aa
Author: Jacques Lucke
Date:   Tue Nov 13 16:23:31 2018 +0100
Branches: blender2.8
https://developer.blender.org/rBdc6ba4f2ec1f66e4c182ef7e651da6badf6497aa

Py API: fix parameter order in offscreen.draw_view3d

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

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

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

diff --git a/source/blender/python/gpu/gpu_py_offscreen.c b/source/blender/python/gpu/gpu_py_offscreen.c
index c04dbb48e7d..7a8a2ca0a9f 100644
--- a/source/blender/python/gpu/gpu_py_offscreen.c
+++ b/source/blender/python/gpu/gpu_py_offscreen.c
@@ -179,7 +179,7 @@ static PyObject *bpygpu_offscreen_unbind(BPyGPUOffScreen *self, PyObject *args,
 }
 
 PyDoc_STRVAR(bpygpu_offscreen_draw_view3d_doc,
-".. method:: draw_view3d(scene, view3d, region, modelview_matrix, projection_matrix)\n"
+".. method:: draw_view3d(scene, view3d, region, view_matrix, projection_matrix)\n"
 "\n"
 "   Draw the 3d viewport in the offscreen object.\n"
 "\n"
@@ -212,18 +212,18 @@ static PyObject *bpygpu_offscreen_draw_view3d(BPyGPUOffScreen *self, PyObject *a
 
 	static const char *_keywords[] = {
 	        "scene", "view_layer", "view3d", "region",
-	        "projection_matrix", "view_matrix", NULL};
+	        "view_matrix", "projection_matrix", NULL};
 
 	static _PyArg_Parser _parser = {"OOOOO&O&:draw_view3d", _keywords, 0};
 	if (!_PyArg_ParseTupleAndKeywordsFast(
 	        args, kwds, &_parser,
 	        &py_scene, &py_view_layer, &py_view3d, &py_region,
-	        Matrix_Parse4x4, &py_mat_projection,
-	        Matrix_Parse4x4, &py_mat_view) ||
-	    (!(scene       = PyC_RNA_AsPointer(py_scene, "Scene")) ||
+	        Matrix_Parse4x4, &py_mat_view,
+	        Matrix_Parse4x4, &py_mat_projection) ||
+	    (!(scene      = PyC_RNA_AsPointer(py_scene, "Scene")) ||
 	     !(view_layer = PyC_RNA_AsPointer(py_view_layer, "ViewLayer")) ||
-	     !(v3d         = PyC_RNA_AsPointer(py_view3d, "SpaceView3D")) ||
-	     !(ar          = PyC_RNA_AsPointer(py_region, "Region"))))
+	     !(v3d        = PyC_RNA_AsPointer(py_view3d, "SpaceView3D")) ||
+	     !(ar         = PyC_RNA_AsPointer(py_region, "Region"))))
 	{
 		return NULL;
 	}
@@ -234,7 +234,7 @@ static PyObject *bpygpu_offscreen_draw_view3d(BPyGPUOffScreen *self, PyObject *a
 
 	rv3d_mats = ED_view3d_mats_rv3d_backup(ar->regiondata);
 
-	GPU_offscreen_bind(self->ofs, true); /* bind */
+	GPU_offscreen_bind(self->ofs, true);
 
 	ED_view3d_draw_offscreen(depsgraph,
 	                         scene,
@@ -252,7 +252,7 @@ static PyObject *bpygpu_offscreen_draw_view3d(BPyGPUOffScreen *self, PyObject *a
 	                         self->ofs,
 	                         NULL);
 
-	GPU_offscreen_unbind(self->ofs, true); /* unbind */
+	GPU_offscreen_unbind(self->ofs, true);
 
 	ED_view3d_mats_rv3d_restore(ar->regiondata, rv3d_mats);
 	MEM_freeN(rv3d_mats);



More information about the Bf-blender-cvs mailing list