[Bf-blender-cvs] [90212c3cb52] greasepencil-object: GPencil: Fix style error in Illustrator
Antonio Vazquez
noreply at git.blender.org
Mon Jul 27 13:22:41 CEST 2020
Commit: 90212c3cb527b1a0567ae381dabb1c09a43cdff5
Author: Antonio Vazquez
Date: Mon Jul 27 13:22:34 2020 +0200
Branches: greasepencil-object
https://developer.blender.org/rB90212c3cb527b1a0567ae381dabb1c09a43cdff5
GPencil: Fix style error in Illustrator
The style name cannot contain underscore character
===================================================================
M source/blender/io/gpencil/intern/gpencil_io_svg.cc
===================================================================
diff --git a/source/blender/io/gpencil/intern/gpencil_io_svg.cc b/source/blender/io/gpencil/intern/gpencil_io_svg.cc
index 0847d6572dd..431e4d1f913 100644
--- a/source/blender/io/gpencil/intern/gpencil_io_svg.cc
+++ b/source/blender/io/gpencil/intern/gpencil_io_svg.cc
@@ -156,7 +156,7 @@ void GpencilExporterSVG::export_style_list(void)
linearrgb_to_srgb_v3_v3(col, gp_style->stroke_rgba);
std::string stroke_hex = rgb_to_hex(col);
sprintf(out,
- "\n\t.style_stroke_%d{stroke: %s; fill: %s;}",
+ "\n\t.stylestroke%d{stroke: %s; fill: %s;}",
id,
stroke_hex.c_str(),
stroke_hex.c_str());
@@ -168,7 +168,7 @@ void GpencilExporterSVG::export_style_list(void)
linearrgb_to_srgb_v3_v3(col, gp_style->fill_rgba);
std::string stroke_hex = rgb_to_hex(col);
sprintf(out,
- "\n\t.style_fill_%d{stroke: %s; fill: %s;}",
+ "\n\t.stylefill%d{stroke: %s; fill: %s;}",
id,
stroke_hex.c_str(),
stroke_hex.c_str());
@@ -273,7 +273,7 @@ void GpencilExporterSVG::export_point(pugi::xml_node gpl_node,
pugi::xml_node gps_node = gpl_node.append_child("circle");
gps_node.append_attribute("class").set_value(
- ("style_stroke_" + std::to_string(gps->mat_nr + 1)).c_str());
+ ("stylestroke" + std::to_string(gps->mat_nr + 1)).c_str());
pt = &gps->points[0];
gpencil_3d_point_to_screen_space(params.region, diff_mat, &pt->x, screen_co);
@@ -313,7 +313,7 @@ void GpencilExporterSVG::export_stroke(pugi::xml_node gpl_node,
{
pugi::xml_node gps_node = gpl_node.append_child("path");
- std::string style_type = (is_fill) ? "_fill_" : "_stroke_";
+ std::string style_type = (is_fill) ? "fill" : "stroke";
gps_node.append_attribute("class").set_value(
("style" + style_type + std::to_string(gps->mat_nr + 1)).c_str());
More information about the Bf-blender-cvs
mailing list