summaryrefslogtreecommitdiff
path: root/scene
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2017-10-21 23:44:06 +0200
committerGitHub <noreply@github.com>2017-10-21 23:44:06 +0200
commite0c14e630625f73fb4d8a0f6b06f4ae27db542cf (patch)
tree3aa82ee779374b142ce6fbd8cd750d60e8ed0d81 /scene
parentd39348151e5db86a4cd1773a963aee095685ce7b (diff)
parent5f7478e196a488ef03dca715ad50b0448f82f9d5 (diff)
Merge pull request #12286 from NathanWarden/add_cubemap_properties
Added properties for CubeMap.
Diffstat (limited to 'scene')
-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 b23ebf2f3e..4b78950e9f 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);