Browse Source

Expose `Image.COMPRESS_SOURCE_LAYERED` to scripting

(cherry picked from commit 7f49e5beec642c6c3b72ba234d8c956207ce6b34)
Haoyu Qiu 3 years ago
parent
commit
73d5851232
2 changed files with 4 additions and 0 deletions
  1. 1 0
      core/image.cpp
  2. 3 0
      doc/classes/Image.xml

+ 1 - 0
core/image.cpp

@@ -2988,6 +2988,7 @@ void Image::_bind_methods() {
 	BIND_ENUM_CONSTANT(COMPRESS_SOURCE_GENERIC);
 	BIND_ENUM_CONSTANT(COMPRESS_SOURCE_GENERIC);
 	BIND_ENUM_CONSTANT(COMPRESS_SOURCE_SRGB);
 	BIND_ENUM_CONSTANT(COMPRESS_SOURCE_SRGB);
 	BIND_ENUM_CONSTANT(COMPRESS_SOURCE_NORMAL);
 	BIND_ENUM_CONSTANT(COMPRESS_SOURCE_NORMAL);
+	BIND_ENUM_CONSTANT(COMPRESS_SOURCE_LAYERED);
 }
 }
 
 
 void Image::set_compress_bc_func(void (*p_compress_func)(Image *, float, CompressSource)) {
 void Image::set_compress_bc_func(void (*p_compress_func)(Image *, float, CompressSource)) {

+ 3 - 0
doc/classes/Image.xml

@@ -603,5 +603,8 @@
 		<constant name="COMPRESS_SOURCE_NORMAL" value="2" enum="CompressSource">
 		<constant name="COMPRESS_SOURCE_NORMAL" value="2" enum="CompressSource">
 			Source texture (before compression) is a normal texture (e.g. it can be compressed into two channels).
 			Source texture (before compression) is a normal texture (e.g. it can be compressed into two channels).
 		</constant>
 		</constant>
+		<constant name="COMPRESS_SOURCE_LAYERED" value="3" enum="CompressSource">
+			Source texture (before compression) is a [TextureLayered].
+		</constant>
 	</constants>
 	</constants>
 </class>
 </class>