Fix T76185: GPencil from Curve ignores Cyclic when curve has only 2 points
Also changed default thickness to 10 because after draw engine refactor the final line was too thin.
This commit is contained in:
parent
05274ca829
commit
601a1a3fda
Notes:
blender-bot
2023-02-14 11:42:40 +01:00
Referenced by issue #76185, GPencil: "Convert to => Grease Pencil from Curve" ignores "Cyclic U" when curve has only 2 points
|
@ -1710,7 +1710,7 @@ static void gpencil_convert_spline(Main *bmain,
|
|||
|
||||
/* Create Stroke. */
|
||||
bGPDstroke *gps = MEM_callocN(sizeof(bGPDstroke), "bGPDstroke");
|
||||
gps->thickness = 1.0f;
|
||||
gps->thickness = 10.0f;
|
||||
gps->fill_opacity_fac = 1.0f;
|
||||
gps->hardeness = 1.0f;
|
||||
gps->uv_scale = 1.0f;
|
||||
|
@ -1731,7 +1731,7 @@ static void gpencil_convert_spline(Main *bmain,
|
|||
int segments = 0;
|
||||
int resolu = nu->resolu + 1;
|
||||
segments = nu->pntsu;
|
||||
if (((nu->flagu & CU_NURB_CYCLIC) == 0) || (nu->pntsu == 2)) {
|
||||
if ((nu->flagu & CU_NURB_CYCLIC) == 0) {
|
||||
segments--;
|
||||
cyclic = false;
|
||||
}
|
||||
|
@ -1847,7 +1847,7 @@ static void gpencil_convert_spline(Main *bmain,
|
|||
int init = 0;
|
||||
resolu = nu->resolu + 1;
|
||||
segments = nu->pntsu;
|
||||
if (((nu->flagu & CU_NURB_CYCLIC) == 0) || (nu->pntsu == 2)) {
|
||||
if ((nu->flagu & CU_NURB_CYCLIC) == 0) {
|
||||
segments--;
|
||||
}
|
||||
/* Get all interpolated curve points of Beziert */
|
||||
|
|
Loading…
Reference in New Issue