summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathan Warden <nathan@nathanwarden.com>2017-10-21 12:18:19 -0500
committerNathan Warden <nathan@nathanwarden.com>2017-10-21 13:23:32 -0500
commit5f7478e196a488ef03dca715ad50b0448f82f9d5 (patch)
treec37e6259320266784ee26199c2871a7989fc0271
parentf002e4cb82844083edb8a825160582d00f42bb21 (diff)
Added properties for CubeMap.
-rw-r--r--scene/resources/texture.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/scene/resources/texture.cpp b/scene/resources/texture.cpp
index c202fad1a4..3a0fdb1ab8 100644
--- a/scene/resources/texture.cpp
+++ b/scene/resources/texture.cpp
@@ -1324,10 +1324,8 @@ void CubeMap::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_width"), &CubeMap::get_width);
ClassDB::bind_method(D_METHOD("get_height"), &CubeMap::get_height);
- //ClassDB::bind_method(D_METHOD("get_rid"),&CubeMap::get_rid);
ClassDB::bind_method(D_METHOD("set_flags", "flags"), &CubeMap::set_flags);
ClassDB::bind_method(D_METHOD("get_flags"), &CubeMap::get_flags);
-
ClassDB::bind_method(D_METHOD("set_side", "side", "image"), &CubeMap::set_side);
ClassDB::bind_method(D_METHOD("get_side", "side"), &CubeMap::get_side);
ClassDB::bind_method(D_METHOD("set_storage", "mode"), &CubeMap::set_storage);
@@ -1335,6 +1333,10 @@ void CubeMap::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_lossy_storage_quality", "quality"), &CubeMap::set_lossy_storage_quality);
ClassDB::bind_method(D_METHOD("get_lossy_storage_quality"), &CubeMap::get_lossy_storage_quality);
+ ADD_PROPERTY(PropertyInfo(Variant::INT, "flags", PROPERTY_HINT_ENUM, "Mipmaps,Repeat,Filter,Default"), "set_flags", "get_flags");
+ ADD_PROPERTY(PropertyInfo(Variant::INT, "storage_mode", PROPERTY_HINT_ENUM, "Raw,Lossy Compressed,Lossless Compressed"), "set_storage", "get_storage");
+ ADD_PROPERTY(PropertyInfo(Variant::REAL, "lossy_storage_quality"), "set_lossy_storage_quality", "get_lossy_storage_quality");
+
BIND_ENUM_CONSTANT(STORAGE_RAW);
BIND_ENUM_CONSTANT(STORAGE_COMPRESS_LOSSY);
BIND_ENUM_CONSTANT(STORAGE_COMPRESS_LOSSLESS);