Merge pull request #1166 from adolson/fix-texture-flag-bug

fix saving texture flags to *.png.flags file, closes #399
This commit is contained in:
Juan Linietsky 2015-01-10 07:47:00 -03:00
commit f97582b5e9
2 changed files with 3 additions and 2 deletions

1
.gitignore vendored
View File

@ -12,6 +12,7 @@ drivers/gles2/shaders/*.h
modules/register_module_types.cpp
core/version.h
core/method_bind.inc
core/method_bind_ext.inc
core/script_encryption_key.cpp
core/global_defaults.cpp
tools/editor/register_exporters.cpp

View File

@ -64,10 +64,10 @@ Error ResourceSaverPNG::save(const String &p_path,const RES& p_resource,uint32_t
text+=bool(texture->get_flags()&Texture::FLAG_FILTER)?"filter=true\n":"filter=false\n";
}
if (global_mipmaps!=bool(texture->get_flags()&Texture::FLAG_MIPMAPS)) {
text+=bool(texture->get_flags()&Texture::FLAG_FILTER)?"gen_mipmaps=true\n":"gen_mipmaps=false\n";
text+=bool(texture->get_flags()&Texture::FLAG_MIPMAPS)?"gen_mipmaps=true\n":"gen_mipmaps=false\n";
}
if (global_repeat!=bool(texture->get_flags()&Texture::FLAG_REPEAT)) {
text+=bool(texture->get_flags()&Texture::FLAG_FILTER)?"repeat=true\n":"repeat=false\n";
text+=bool(texture->get_flags()&Texture::FLAG_REPEAT)?"repeat=true\n":"repeat=false\n";
}
if (bool(texture->get_flags()&Texture::FLAG_ANISOTROPIC_FILTER)) {
text+="anisotropic=true\n";