Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntonio Vazquez <blendergit@gmail.com>2021-03-24 20:46:36 +0300
committerAntonio Vazquez <blendergit@gmail.com>2021-03-24 20:47:33 +0300
commit9ac7946dd03fb75bab591c5ed0a742c00b80286b (patch)
tree25475ba77abc10dc14ecbbac09d4dbb1bdcd3c54 /source/blender/editors/io/io_gpencil_export.c
parent43c48965d7cf87dd00ccf8714d2f6d08ffa4c474 (diff)
GPencil: Fix wrong file extension when exporting SVG
Due a code cleanup it was using .PDF all times.
Diffstat (limited to 'source/blender/editors/io/io_gpencil_export.c')
-rw-r--r--source/blender/editors/io/io_gpencil_export.c8
1 files changed, 4 insertions, 4 deletions
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);