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:
authorAntonio Vazquez <blendergit@gmail.com>2019-10-17 12:15:22 +0300
committerAntonio Vazquez <blendergit@gmail.com>2019-10-17 12:15:22 +0300
commit2afbd14c596746be22951e7a8cb9e1bc769a7128 (patch)
tree47ecd2e72075f857975fdb562fd80d99faa90338 /source/blender/draw
parent74db523a52e4e57a52887274d1e55617b2faa87c (diff)
Fix T70887: GPencil edit lines are not displayed in the right place
The lines were not using the matrix to calc the tarnsformation.
Diffstat (limited to 'source/blender/draw')
-rw-r--r--source/blender/draw/engines/gpencil/gpencil_draw_utils.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/source/blender/draw/engines/gpencil/gpencil_draw_utils.c b/source/blender/draw/engines/gpencil/gpencil_draw_utils.c
index 9599c91bfd7..68624540d08 100644
--- a/source/blender/draw/engines/gpencil/gpencil_draw_utils.c
+++ b/source/blender/draw/engines/gpencil/gpencil_draw_utils.c
@@ -1286,12 +1286,14 @@ static void gpencil_draw_strokes(GpencilBatchCache *cache,
if (!stl->g_data->shgrps_edit_line) {
stl->g_data->shgrps_edit_line = DRW_shgroup_create(e_data->gpencil_line_sh,
psl->edit_pass);
+ DRW_shgroup_uniform_mat4(stl->g_data->shgrps_edit_line, "gpModelMatrix", ob->obmat);
}
if (!stl->g_data->shgrps_edit_point) {
stl->g_data->shgrps_edit_point = DRW_shgroup_create(e_data->gpencil_edit_point_sh,
psl->edit_pass);
const float *viewport_size = DRW_viewport_size_get();
DRW_shgroup_uniform_vec2(stl->g_data->shgrps_edit_point, "Viewport", viewport_size, 1);
+ DRW_shgroup_uniform_mat4(stl->g_data->shgrps_edit_point, "gpModelMatrix", ob->obmat);
}
gpencil_add_editpoints_vertexdata(cache, ob, gpd, gpl, gpf, gps);