[Bf-blender-cvs] [c3640e93595] temp-gpencil-io: Revert partially commit 6fc993ba44ea03f5316d0c7dd7749ba21e3a824d

Antonio Vazquez noreply at git.blender.org
Wed Mar 24 12:27:54 CET 2021


Commit: c3640e935951e92371d8a15d651e20b19987f62c
Author: Antonio Vazquez
Date:   Wed Mar 24 12:27:49 2021 +0100
Branches: temp-gpencil-io
https://developer.blender.org/rBc3640e935951e92371d8a15d651e20b19987f62c

Revert partially commit 6fc993ba44ea03f5316d0c7dd7749ba21e3a824d

===================================================================

M	source/blender/io/gpencil/intern/gpencil_io_import_svg.cc

===================================================================

diff --git a/source/blender/io/gpencil/intern/gpencil_io_import_svg.cc b/source/blender/io/gpencil/intern/gpencil_io_import_svg.cc
index bd0b765f180..7f450477ac2 100644
--- a/source/blender/io/gpencil/intern/gpencil_io_import_svg.cc
+++ b/source/blender/io/gpencil/intern/gpencil_io_import_svg.cc
@@ -191,28 +191,29 @@ void GpencilImporterSVG::create_stroke(bGPdata *gpd,
   for (int i = 0; i < path->npts - 1; i += 3) {
     float *p = &path->pts[i * 2];
     float a = 0.0f;
-    for (bGPDspoint &pt : MutableSpan(gps->points, gps->totpoints)) {
-      pt.strength = shape->opacity;
-      pt.pressure = 1.0f;
-      pt.z = 0.0f;
+    for (int v = 0; v < edges; v++) {
+      bGPDspoint *pt = &gps->points[start_index];
+      pt->strength = shape->opacity;
+      pt->pressure = 1.0f;
+      pt->z = 0.0f;
       /* TODO: (antoniov) Can be improved loading curve data instead of loading strokes. */
-      interp_v2_v2v2v2v2_cubic(&pt.x, &p[0], &p[2], &p[4], &p[6], a);
+      interp_v2_v2v2v2v2_cubic(&pt->x, &p[0], &p[2], &p[4], &p[6], a);
 
       /* Scale from milimeters. */
-      mul_v3_fl(&pt.x, 0.001f);
-      mul_m4_v3(matrix, &pt.x);
+      mul_v3_fl(&pt->x, 0.001f);
+      mul_m4_v3(matrix, &pt->x);
 
       /* Apply color to vertex color. */
       if (is_fill) {
         NSVGpaint fill = shape->fill;
-        convert_color(fill.color, pt.vert_color);
+        convert_color(fill.color, pt->vert_color);
       }
       if (is_stroke) {
         NSVGpaint stroke = shape->stroke;
-        convert_color(stroke.color, pt.vert_color);
-        gps->fill_opacity_fac = pt.vert_color[3];
+        convert_color(stroke.color, pt->vert_color);
+        gps->fill_opacity_fac = pt->vert_color[3];
       }
-      pt.vert_color[3] = 1.0f;
+      pt->vert_color[3] = 1.0f;
 
       a += step;
       start_index++;



More information about the Bf-blender-cvs mailing list