diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2021-11-15 00:46:04 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-15 00:46:04 +0100 |
commit | 8bb163807a63ad4f5b6ea6469149252ea5304881 (patch) | |
tree | 88817f9593709cd78457912f7372d5f4141e78c8 /editor/import/resource_importer_texture.cpp | |
parent | 315e94ee2a3c8a5f3e68bba2a8ee82c1b4b31901 (diff) | |
parent | cd2a4990844fac72ae624a51bb797716e69ce2c3 (diff) |
Merge pull request #54976 from reduz/importer-options-by-path
Diffstat (limited to 'editor/import/resource_importer_texture.cpp')
-rw-r--r-- | editor/import/resource_importer_texture.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/editor/import/resource_importer_texture.cpp b/editor/import/resource_importer_texture.cpp index e4553c625b..b1fa2eda28 100644 --- a/editor/import/resource_importer_texture.cpp +++ b/editor/import/resource_importer_texture.cpp @@ -153,7 +153,7 @@ String ResourceImporterTexture::get_resource_type() const { return "StreamTexture2D"; } -bool ResourceImporterTexture::get_option_visibility(const String &p_option, const Map<StringName, Variant> &p_options) const { +bool ResourceImporterTexture::get_option_visibility(const String &p_path, const String &p_option, const Map<StringName, Variant> &p_options) const { if (p_option == "compress/lossy_quality") { int compress_mode = int(p_options["compress/mode"]); if (compress_mode != COMPRESS_LOSSY && compress_mode != COMPRESS_VRAM_COMPRESSED) { @@ -194,7 +194,7 @@ String ResourceImporterTexture::get_preset_name(int p_idx) const { return preset_names[p_idx]; } -void ResourceImporterTexture::get_import_options(List<ImportOption> *r_options, int p_preset) const { +void ResourceImporterTexture::get_import_options(const String &p_path, List<ImportOption> *r_options, int p_preset) const { r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "compress/mode", PROPERTY_HINT_ENUM, "Lossless,Lossy,VRAM Compressed,VRAM Uncompressed,Basis Universal", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED), p_preset == PRESET_3D ? 2 : 0)); r_options->push_back(ImportOption(PropertyInfo(Variant::FLOAT, "compress/lossy_quality", PROPERTY_HINT_RANGE, "0,1,0.01"), 0.7)); r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "compress/hdr_compression", PROPERTY_HINT_ENUM, "Disabled,Opaque Only,Always"), 1)); |