[Bf-blender-cvs] [6073037ad8e] greasepencil-object: GP: Primitives: tidy up control point code
Charlie Jolly
noreply at git.blender.org
Mon Dec 10 17:45:32 CET 2018
Commit: 6073037ad8ed523be27c9f9adc52118862f4f960
Author: Charlie Jolly
Date: Mon Dec 10 16:23:03 2018 +0000
Branches: greasepencil-object
https://developer.blender.org/rB6073037ad8ed523be27c9f9adc52118862f4f960
GP: Primitives: tidy up control point code
The display of control points is temporary as this is still wip.
===================================================================
M source/blender/editors/gpencil/gpencil_primitive.c
===================================================================
diff --git a/source/blender/editors/gpencil/gpencil_primitive.c b/source/blender/editors/gpencil/gpencil_primitive.c
index 17423cee2f7..188d2988629 100644
--- a/source/blender/editors/gpencil/gpencil_primitive.c
+++ b/source/blender/editors/gpencil/gpencil_primitive.c
@@ -291,10 +291,11 @@ static void gp_primitive_set_initdata(bContext *C, tGPDprimitive *tgpi)
static void gp_primitive_set_cp(tGPDprimitive *tgpi, float p[2], int color, int size)
{
if (tgpi->tot_cp_points < MAX_CP) {
+ CLAMP(size, 5, 20);
tGPcontrolpoint *cp = &tgpi->cp_points[tgpi->tot_cp_points];
copy_v2_v2(&cp->x, p);
cp->color = color;
- cp->size = CLAMP(size, 5, 20);
+ cp->size = size;
tgpi->tot_cp_points += 1;
}
}
More information about the Bf-blender-cvs
mailing list