diff options
author | Antonio Vazquez <blendergit@gmail.com> | 2021-04-15 20:14:23 +0300 |
---|---|---|
committer | Antonio Vazquez <blendergit@gmail.com> | 2021-04-15 20:14:23 +0300 |
commit | ec241eb0d020e20924651490a5b74473e347091d (patch) | |
tree | 5051bc23144a6f686d3afa1c855511cf27fd4aad | |
parent | 09eb04c0a865c8b847e50afe287eee3a389f42b8 (diff) | |
parent | fa8d566c3b12553b73862b6cb34cfa0b1020513f (diff) |
Merge branch 'blender-v2.93-release'
m--------- | release/scripts/addons | 0 | ||||
m--------- | release/scripts/addons_contrib | 0 | ||||
-rw-r--r-- | source/blender/io/gpencil/intern/gpencil_io_base.cc | 2 | ||||
-rw-r--r-- | source/blender/io/gpencil/intern/gpencil_io_export_pdf.cc | 5 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_userdef.c | 2 |
5 files changed, 5 insertions, 4 deletions
diff --git a/release/scripts/addons b/release/scripts/addons -Subproject 1dbdb95ed93a8b96d12e42e17249f6e2cdd2461 +Subproject 81815ea92c2071a08566dc66d4a871b6e2f5c86 diff --git a/release/scripts/addons_contrib b/release/scripts/addons_contrib -Subproject 2ffe34eb02a81fb7023bd7dbfb8651865cb3392 +Subproject 8970953d4a8a4ea3bf77c66370c817ed0cf1308 diff --git a/source/blender/io/gpencil/intern/gpencil_io_base.cc b/source/blender/io/gpencil/intern/gpencil_io_base.cc index c60055eccaf..bfa3abb1dcd 100644 --- a/source/blender/io/gpencil/intern/gpencil_io_base.cc +++ b/source/blender/io/gpencil/intern/gpencil_io_base.cc @@ -303,7 +303,7 @@ void GpencilIO::prepare_stroke_export_colors(Object *ob, bGPDstroke *gps) /* Stroke color. */ copy_v4_v4(stroke_color_, gp_style->stroke_rgba); - avg_opacity_ = 0; + avg_opacity_ = 0.0f; /* Get average vertex color and apply. */ float avg_color[4] = {0.0f, 0.0f, 0.0f, 0.0f}; for (const bGPDspoint &pt : Span(gps->points, gps->totpoints)) { diff --git a/source/blender/io/gpencil/intern/gpencil_io_export_pdf.cc b/source/blender/io/gpencil/intern/gpencil_io_export_pdf.cc index 11278a3ccd7..0f90855dcb8 100644 --- a/source/blender/io/gpencil/intern/gpencil_io_export_pdf.cc +++ b/source/blender/io/gpencil/intern/gpencil_io_export_pdf.cc @@ -169,6 +169,7 @@ void GpencilExporterPDF::export_gpencil_layers() continue; } /* Skip invisible lines. */ + prepare_stroke_export_colors(ob, gps); const float fill_opacity = fill_color_[3] * gpl->opacity; const float stroke_opacity = stroke_color_[3] * stroke_average_opacity_get() * gpl->opacity; @@ -179,7 +180,8 @@ void GpencilExporterPDF::export_gpencil_layers() MaterialGPencilStyle *gp_style = BKE_gpencil_material_settings(ob, gps->mat_nr + 1); const bool is_stroke = ((gp_style->flag & GP_MATERIAL_STROKE_SHOW) && - (gp_style->stroke_rgba[3] > GPENCIL_ALPHA_OPACITY_THRESH)); + (gp_style->stroke_rgba[3] > GPENCIL_ALPHA_OPACITY_THRESH) && + (stroke_opacity > GPENCIL_ALPHA_OPACITY_THRESH)); const bool is_fill = ((gp_style->flag & GP_MATERIAL_FILL_SHOW) && (gp_style->fill_rgba[3] > GPENCIL_ALPHA_OPACITY_THRESH)); @@ -189,7 +191,6 @@ void GpencilExporterPDF::export_gpencil_layers() /* Duplicate the stroke to apply any layer thickness change. */ bGPDstroke *gps_duplicate = BKE_gpencil_stroke_duplicate(gps, true, false); - prepare_stroke_export_colors(ob, gps_duplicate); /* Apply layer thickness change. */ gps_duplicate->thickness += gpl->line_change; diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c index a20ce2d05d0..26887b51f81 100644 --- a/source/blender/makesrna/intern/rna_userdef.c +++ b/source/blender/makesrna/intern/rna_userdef.c @@ -779,7 +779,7 @@ static const EnumPropertyItem *rna_userdef_audio_device_itemf(bContext *UNUSED(C RNA_enum_item_add(&item, &totitem, &new_item); } -# ifndef NDEBUG +# if !defined(NDEBUG) || !defined(WITH_AUDASPACE) if (i == 0) { EnumPropertyItem new_item = {i, "SOUND_NONE", 0, "No Sound", ""}; RNA_enum_item_add(&item, &totitem, &new_item); |