Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDalai Felinto <dfelinto@gmail.com>2018-11-09 18:46:09 +0300
committerDalai Felinto <dfelinto@gmail.com>2018-11-09 18:54:38 +0300
commit49a7bcafd9e043ae250f0e50c54d2dec716a7191 (patch)
tree763e5699c83990e07344cb619620c69e6f4ad27f /source/blender/python/gpu
parent6cb5340e013faac27bbb3dc944c9c6087fe63554 (diff)
gpu.offscreen, fix pydoc, example and rename modelviewmatrix > viewmatrix
Technically this is only the view matrix, not model view matrix. And view layer was missing from the pydoc.
Diffstat (limited to 'source/blender/python/gpu')
-rw-r--r--source/blender/python/gpu/gpu_py_offscreen.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/source/blender/python/gpu/gpu_py_offscreen.c b/source/blender/python/gpu/gpu_py_offscreen.c
index f31b0e5eb3d..3deeb562b3b 100644
--- a/source/blender/python/gpu/gpu_py_offscreen.c
+++ b/source/blender/python/gpu/gpu_py_offscreen.c
@@ -185,18 +185,20 @@ PyDoc_STRVAR(bpygpu_offscreen_draw_view3d_doc,
"\n"
" :param scene: Scene to draw.\n"
" :type scene: :class:`bpy.types.Scene`\n"
+" :param view_layer: View layer to draw.\n"
+" :type view_layer: :class:`bpy.types.ViewLayer`\n"
" :param view3d: 3D View to get the drawing settings from.\n"
" :type view3d: :class:`bpy.types.SpaceView3D`\n"
" :param region: Region of the 3D View.\n"
" :type region: :class:`bpy.types.Region`\n"
-" :param modelview_matrix: ModelView Matrix.\n"
-" :type modelview_matrix: :class:`mathutils.Matrix`\n"
+" :param view_matrix: View Matrix.\n"
+" :type view_matrix: :class:`mathutils.Matrix`\n"
" :param projection_matrix: Projection Matrix.\n"
" :type projection_matrix: :class:`mathutils.Matrix`\n"
);
static PyObject *bpygpu_offscreen_draw_view3d(BPyGPUOffScreen *self, PyObject *args, PyObject *kwds)
{
- MatrixObject *py_mat_modelview, *py_mat_projection;
+ MatrixObject *py_mat_view, *py_mat_projection;
PyObject *py_scene, *py_view_layer, *py_region, *py_view3d;
struct Depsgraph *depsgraph;
@@ -210,14 +212,14 @@ static PyObject *bpygpu_offscreen_draw_view3d(BPyGPUOffScreen *self, PyObject *a
static const char *_keywords[] = {
"scene", "view_layer", "view3d", "region",
- "projection_matrix", "modelview_matrix", NULL};
+ "projection_matrix", "view_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_modelview) ||
+ Matrix_Parse4x4, &py_mat_view) ||
(!(scene = PyC_RNA_AsPointer(py_scene, "Scene")) ||
!(view_layer = PyC_RNA_AsPointer(py_view_layer, "ViewLayer")) ||
!(v3d = PyC_RNA_AsPointer(py_view3d, "SpaceView3D")) ||
@@ -241,7 +243,7 @@ static PyObject *bpygpu_offscreen_draw_view3d(BPyGPUOffScreen *self, PyObject *a
ar,
GPU_offscreen_width(self->ofs),
GPU_offscreen_height(self->ofs),
- (float(*)[4])py_mat_modelview->matrix,
+ (float(*)[4])py_mat_view->matrix,
(float(*)[4])py_mat_projection->matrix,
false,
true,