diff options
Diffstat (limited to 'tools/editor/pvrtc_compress.cpp')
-rw-r--r-- | tools/editor/pvrtc_compress.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/tools/editor/pvrtc_compress.cpp b/tools/editor/pvrtc_compress.cpp index 75b5c69bc2..b130f6c773 100644 --- a/tools/editor/pvrtc_compress.cpp +++ b/tools/editor/pvrtc_compress.cpp @@ -5,7 +5,7 @@ /* GODOT ENGINE */ /* http://www.godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ @@ -27,18 +27,20 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*************************************************************************/ #include "pvrtc_compress.h" + #include "editor_settings.h" #include "scene/resources/texture.h" #include "io/resource_saver.h" #include "io/resource_loader.h" #include "os/os.h" #include "os/file_access.h" + static void (*_base_image_compress_pvrtc2_func)(Image *)=NULL; static void (*_base_image_compress_pvrtc4_func)(Image *)=NULL; static void _compress_image(Image::CompressMode p_mode,Image *p_image) { - String ttpath = EditorSettings::get_singleton()->get("PVRTC/texture_tool"); + String ttpath = EditorSettings::get_singleton()->get("filesystem/import/pvrtc_texture_tool"); if (ttpath.strip_edges()=="" || !FileAccess::exists(ttpath)) { switch(p_mode) { @@ -82,10 +84,10 @@ static void _compress_image(Image::CompressMode p_mode,Image *p_image) { } - if (EditorSettings::get_singleton()->get("PVRTC/fast_conversion").operator bool()) { + if (EditorSettings::get_singleton()->get("filesystem/import/pvrtc_fast_conversion").operator bool()) { args.push_back("-pvrtcfast"); } - if (p_image->get_mipmaps()>0) + if (p_image->has_mipmaps()) args.push_back("-m"); Ref<ImageTexture> t = memnew( ImageTexture ); |