From 9ac7946dd03fb75bab591c5ed0a742c00b80286b Mon Sep 17 00:00:00 2001 From: Antonio Vazquez Date: Wed, 24 Mar 2021 18:46:36 +0100 Subject: GPencil: Fix wrong file extension when exporting SVG Due a code cleanup it was using .PDF all times. --- source/blender/editors/io/io_gpencil_export.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'source/blender/editors') diff --git a/source/blender/editors/io/io_gpencil_export.c b/source/blender/editors/io/io_gpencil_export.c index 6f1e503403b..98e30f51116 100644 --- a/source/blender/editors/io/io_gpencil_export.c +++ b/source/blender/editors/io/io_gpencil_export.c @@ -85,7 +85,7 @@ static void gpencil_export_common_props_definition(wmOperatorType *ot) "Export strokes with constant thickness"); } -static void set_export_filepath(bContext *C, wmOperator *op) +static void set_export_filepath(bContext *C, wmOperator *op, const char *extension) { if (!RNA_struct_property_is_set(op->ptr, "filepath")) { Main *bmain = CTX_data_main(C); @@ -98,7 +98,7 @@ static void set_export_filepath(bContext *C, wmOperator *op) BLI_strncpy(filepath, BKE_main_blendfile_path(bmain), sizeof(filepath)); } - BLI_path_extension_replace(filepath, sizeof(filepath), ".pdf"); + BLI_path_extension_replace(filepath, sizeof(filepath), extension); RNA_string_set(op->ptr, "filepath", filepath); } } @@ -121,7 +121,7 @@ static bool wm_gpencil_export_svg_common_check(bContext *UNUSED(C), wmOperator * static int wm_gpencil_export_svg_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event)) { - set_export_filepath(C, op); + set_export_filepath(C, op, ".svg"); WM_event_add_fileselect(C, op); @@ -280,7 +280,7 @@ static bool wm_gpencil_export_pdf_common_check(bContext *UNUSED(C), wmOperator * static int wm_gpencil_export_pdf_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event)) { - set_export_filepath(C, op); + set_export_filepath(C, op, ".pdf"); WM_event_add_fileselect(C, op); -- cgit v1.2.3