summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2022-10-09 18:28:15 +0200
committerRémi Verschelde <rverschelde@gmail.com>2022-10-09 18:28:15 +0200
commit432125aa542cbb20e7ab5d8f561fd7880442b23c (patch)
tree7e443a09c6640aa6c70f95d06eac0e28c98846d8
parent3a045a1744d126e206ca90ee273b99d5378f6ea6 (diff)
parente87c9fc48c1a7802b67dd6b140534fa43ae8f8ac (diff)
Merge pull request #67084 from HolonProduction/svg_default_option
Show svg import options in default settings.
-rw-r--r--editor/import/resource_importer_texture.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/editor/import/resource_importer_texture.cpp b/editor/import/resource_importer_texture.cpp
index 73f1c0b39b..ed3f1ff489 100644
--- a/editor/import/resource_importer_texture.cpp
+++ b/editor/import/resource_importer_texture.cpp
@@ -233,7 +233,8 @@ void ResourceImporterTexture::get_import_options(const String &p_path, List<Impo
r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "process/size_limit", PROPERTY_HINT_RANGE, "0,4096,1"), 0));
r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "detect_3d/compress_to", PROPERTY_HINT_ENUM, "Disabled,VRAM Compressed,Basis Universal"), (p_preset == PRESET_DETECT) ? 1 : 0));
- if (p_path.get_extension() == "svg") {
+ // Do path based customization only if a path was passed.
+ if (p_path.is_empty() || p_path.get_extension() == "svg") {
r_options->push_back(ImportOption(PropertyInfo(Variant::FLOAT, "svg/scale", PROPERTY_HINT_RANGE, "0.001,100,0.001"), 1.0));
// Editor use only, applies to SVG.