Fix T87131: SVG as GPencil elements with both Stroke and Fill fails
The importer was not checking if both were enabled. Now a new material is created if it's needed.
This commit is contained in:
@@ -118,15 +118,17 @@ bool GpencilImporterSVG::read()
|
||||
}
|
||||
|
||||
/* Create_shape materials. */
|
||||
const char *const mat_names[] = {"Stroke", "Fill"};
|
||||
const char *const mat_names[] = {"Stroke", "Fill", "Both"};
|
||||
int index = 0;
|
||||
if ((is_stroke) && (is_fill)) {
|
||||
if ((is_stroke) && (!is_fill)) {
|
||||
index = 0;
|
||||
is_fill = false;
|
||||
}
|
||||
else if ((!is_stroke) && (is_fill)) {
|
||||
index = 1;
|
||||
}
|
||||
else if ((is_stroke) && (is_fill)) {
|
||||
index = 2;
|
||||
}
|
||||
int32_t mat_index = create_material(mat_names[index], is_stroke, is_fill);
|
||||
|
||||
/* Loop all paths to create the stroke data. */
|
||||
|
||||
Reference in New Issue
Block a user