[Bf-blender-cvs] [018d7784511] greasepencil-refactor: GPencil: Refactor: Put fill uvs into bGPDspoint
Clément Foucault
noreply at git.blender.org
Wed Dec 11 03:07:56 CET 2019
Commit: 018d7784511bf39893e67b4e8c763b393cf18279
Author: Clément Foucault
Date: Wed Dec 11 01:26:56 2019 +0100
Branches: greasepencil-refactor
https://developer.blender.org/rB018d7784511bf39893e67b4e8c763b393cf18279
GPencil: Refactor: Put fill uvs into bGPDspoint
This is not the best place but that's a temporary solution.
===================================================================
M source/blender/blenkernel/intern/gpencil.c
M source/blender/makesdna/DNA_gpencil_types.h
===================================================================
diff --git a/source/blender/blenkernel/intern/gpencil.c b/source/blender/blenkernel/intern/gpencil.c
index 9de6f6a53fb..066d2ee51af 100644
--- a/source/blender/blenkernel/intern/gpencil.c
+++ b/source/blender/blenkernel/intern/gpencil.c
@@ -2741,6 +2741,11 @@ void BKE_gpencil_triangulate_stroke_fill(bGPdata *gpd, bGPDstroke *gps)
copy_v2_v2(stroke_triangle->uv[1], uv[tmp_triangles[i][1]]);
copy_v2_v2(stroke_triangle->uv[2], uv[tmp_triangles[i][2]]);
}
+
+ /* Copy UVs to bGPDspoint. (might not be the right place for that) */
+ for (int i = 0; i < gps->totpoints; i++) {
+ copy_v2_v2(gps->points[i].uv_fill, uv[i]);
+ }
}
else {
/* No triangles needed - Free anything allocated previously */
diff --git a/source/blender/makesdna/DNA_gpencil_types.h b/source/blender/makesdna/DNA_gpencil_types.h
index 0d3a158bfc6..80675d99d1b 100644
--- a/source/blender/makesdna/DNA_gpencil_types.h
+++ b/source/blender/makesdna/DNA_gpencil_types.h
@@ -78,6 +78,8 @@ typedef struct bGPDspoint {
float uv_fac;
/** Uv rotation for dot mode. */
float uv_rot;
+ /** Uv for fill mode */
+ float uv_fill[2];
/** Mix color RGBA (A=mix factor) */
float mix_color[4];
More information about the Bf-blender-cvs
mailing list