Skip to content

Commit 3c87108

Browse files
committed
Merge pull request #109446 from aaronfranke/gltf-handle-image-enum
GLTF: Make handle binary image mode enum type-safe
2 parents 55f51c0 + a5424c3 commit 3c87108

File tree

8 files changed

+78
-31
lines changed

8 files changed

+78
-31
lines changed

modules/fbx/editor/editor_scene_importer_ufbx.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,8 @@ Node *EditorSceneFormatImporterUFBX::import_scene(const String &p_path, uint32_t
6868
state->set_allow_geometry_helper_nodes(allow_geometry_helper_nodes);
6969
}
7070
if (p_options.has("fbx/embedded_image_handling")) {
71-
int32_t enum_option = p_options["fbx/embedded_image_handling"];
72-
state->set_handle_binary_image(enum_option);
71+
const int32_t enum_option = p_options["fbx/embedded_image_handling"];
72+
state->set_handle_binary_image_mode((GLTFState::HandleBinaryImageMode)enum_option);
7373
}
7474
if (p_options.has(SNAME("nodes/import_as_skeleton_bones")) ? (bool)p_options[SNAME("nodes/import_as_skeleton_bones")] : false) {
7575
state->set_import_as_skeleton_bones(true);
@@ -97,7 +97,7 @@ void EditorSceneFormatImporterUFBX::get_import_options(const String &p_path,
9797
if (p_path.is_empty() || p_path.has_extension("fbx")) {
9898
r_options->push_back(ResourceImporterScene::ImportOption(PropertyInfo(Variant::INT, "fbx/importer", PROPERTY_HINT_ENUM, "ufbx,FBX2glTF"), FBX_IMPORTER_UFBX));
9999
r_options->push_back(ResourceImporterScene::ImportOption(PropertyInfo(Variant::BOOL, "fbx/allow_geometry_helper_nodes"), false));
100-
r_options->push_back(ResourceImporterScene::ImportOption(PropertyInfo(Variant::INT, "fbx/embedded_image_handling", PROPERTY_HINT_ENUM, "Discard All Textures,Extract Textures,Embed as Basis Universal,Embed as Uncompressed", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED), FBXState::HANDLE_BINARY_EXTRACT_TEXTURES));
100+
r_options->push_back(ResourceImporterScene::ImportOption(PropertyInfo(Variant::INT, "fbx/embedded_image_handling", PROPERTY_HINT_ENUM, "Discard All Textures,Extract Textures,Embed as Basis Universal,Embed as Uncompressed", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED), FBXState::HANDLE_BINARY_IMAGE_MODE_EXTRACT_TEXTURES));
101101
r_options->push_back(ResourceImporterScene::ImportOption(PropertyInfo(Variant::INT, "fbx/naming_version", PROPERTY_HINT_ENUM, "Godot 4.0 or 4.1,Godot 4.2 to 4.4,Godot 4.5 or later"), 2));
102102
}
103103
}

modules/fbx/fbx_document.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -943,8 +943,8 @@ Ref<Image> FBXDocument::_parse_image_bytes_into_image(Ref<FBXState> p_state, con
943943
}
944944

945945
GLTFImageIndex FBXDocument::_parse_image_save_image(Ref<FBXState> p_state, const Vector<uint8_t> &p_bytes, const String &p_file_extension, int p_index, Ref<Image> p_image) {
946-
FBXState::GLTFHandleBinary handling = FBXState::GLTFHandleBinary(p_state->handle_binary_image);
947-
if (p_image->is_empty() || handling == FBXState::GLTFHandleBinary::HANDLE_BINARY_DISCARD_TEXTURES) {
946+
FBXState::HandleBinaryImageMode handling = FBXState::HandleBinaryImageMode(p_state->handle_binary_image_mode);
947+
if (p_image->is_empty() || handling == FBXState::HandleBinaryImageMode::HANDLE_BINARY_IMAGE_MODE_DISCARD_TEXTURES) {
948948
if (p_index < 0) {
949949
return -1;
950950
}
@@ -953,7 +953,7 @@ GLTFImageIndex FBXDocument::_parse_image_save_image(Ref<FBXState> p_state, const
953953
return p_state->images.size() - 1;
954954
}
955955
#ifdef TOOLS_ENABLED
956-
if (Engine::get_singleton()->is_editor_hint() && handling == FBXState::GLTFHandleBinary::HANDLE_BINARY_EXTRACT_TEXTURES) {
956+
if (Engine::get_singleton()->is_editor_hint() && handling == FBXState::HandleBinaryImageMode::HANDLE_BINARY_IMAGE_MODE_EXTRACT_TEXTURES) {
957957
if (p_state->base_path.is_empty()) {
958958
if (p_index < 0) {
959959
return -1;
@@ -1030,7 +1030,7 @@ GLTFImageIndex FBXDocument::_parse_image_save_image(Ref<FBXState> p_state, const
10301030
return p_state->images.size() - 1;
10311031
}
10321032
#endif // TOOLS_ENABLED
1033-
if (handling == FBXState::HANDLE_BINARY_EMBED_AS_BASISU) {
1033+
if (handling == FBXState::HANDLE_BINARY_IMAGE_MODE_EMBED_AS_BASISU) {
10341034
Ref<PortableCompressedTexture2D> tex;
10351035
tex.instantiate();
10361036
tex->set_name(p_image->get_name());
@@ -1040,8 +1040,8 @@ GLTFImageIndex FBXDocument::_parse_image_save_image(Ref<FBXState> p_state, const
10401040
p_state->source_images.push_back(p_image);
10411041
return p_state->images.size() - 1;
10421042
}
1043-
// This handles the case of HANDLE_BINARY_EMBED_AS_UNCOMPRESSED, and it also serves
1044-
// as a fallback for HANDLE_BINARY_EXTRACT_TEXTURES when this is not the editor.
1043+
// This handles the case of HANDLE_BINARY_IMAGE_MODE_EMBED_AS_UNCOMPRESSED, and it also serves
1044+
// as a fallback for HANDLE_BINARY_IMAGE_MODE_EXTRACT_TEXTURES when this is not the editor.
10451045
Ref<ImageTexture> tex;
10461046
tex.instantiate();
10471047
tex->set_name(p_image->get_name());
@@ -1112,7 +1112,7 @@ Ref<Texture2D> FBXDocument::_get_texture(Ref<FBXState> p_state, const GLTFTextur
11121112
ERR_FAIL_INDEX_V(p_texture, p_state->textures.size(), Ref<Texture2D>());
11131113
const GLTFImageIndex image = p_state->textures[p_texture]->get_src_image();
11141114
ERR_FAIL_INDEX_V(image, p_state->images.size(), Ref<Texture2D>());
1115-
if (FBXState::GLTFHandleBinary(p_state->handle_binary_image) == FBXState::HANDLE_BINARY_EMBED_AS_BASISU) {
1115+
if (FBXState::HandleBinaryImageMode(p_state->handle_binary_image_mode) == FBXState::HANDLE_BINARY_IMAGE_MODE_EMBED_AS_BASISU) {
11161116
ERR_FAIL_INDEX_V(image, p_state->source_images.size(), Ref<Texture2D>());
11171117
Ref<PortableCompressedTexture2D> portable_texture;
11181118
portable_texture.instantiate();

modules/gltf/doc_classes/GLTFState.xml

Lines changed: 26 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,10 @@
8383
Returns an array of all [GLTFCamera]s in the glTF file. These are the cameras that the [member GLTFNode.camera] index refers to.
8484
</description>
8585
</method>
86-
<method name="get_handle_binary_image">
86+
<method name="get_handle_binary_image" deprecated="Use [member handle_binary_image_mode] instead.">
8787
<return type="int" />
8888
<description>
89+
Deprecated untyped alias for [member handle_binary_image_mode]. When importing a glTF file with unimported raw binary images embedded inside of binary blob buffers, in data URIs, or separate files not imported by Godot, this controls how the images are handled.
8990
</description>
9091
</method>
9192
<method name="get_images">
@@ -203,10 +204,11 @@
203204
Sets the [GLTFCamera]s in the state. These are the cameras that the [member GLTFNode.camera] index refers to.
204205
</description>
205206
</method>
206-
<method name="set_handle_binary_image">
207+
<method name="set_handle_binary_image" deprecated="Use [member handle_binary_image_mode] instead.">
207208
<return type="void" />
208209
<param index="0" name="method" type="int" />
209210
<description>
211+
Deprecated untyped alias for [member handle_binary_image_mode]. When importing a glTF file with unimported raw binary images embedded inside of binary blob buffers, in data URIs, or separate files not imported by Godot, this controls how the images are handled.
210212
</description>
211213
</method>
212214
<method name="set_images">
@@ -305,6 +307,10 @@
305307
<member name="glb_data" type="PackedByteArray" setter="set_glb_data" getter="get_glb_data" default="PackedByteArray()">
306308
The binary buffer attached to a .glb file.
307309
</member>
310+
<member name="handle_binary_image_mode" type="int" setter="set_handle_binary_image_mode" getter="get_handle_binary_image_mode" enum="GLTFState.HandleBinaryImageMode" default="1">
311+
When importing a glTF file with unimported raw binary images embedded inside of binary blob buffers, in data URIs, or separate files not imported by Godot, this controls how the images are handled. Images can be discarded, saved as separate files, or embedded in the scene lossily or losslessly. See [enum HandleBinaryImageMode] for options.
312+
This property does nothing for image files in the [code]res://[/code] folder imported by Godot, as those are handled by Godot's image importer directly, and then the Godot scene generated from the glTF file will use the images as Godot imported them.
313+
</member>
308314
<member name="import_as_skeleton_bones" type="bool" setter="set_import_as_skeleton_bones" getter="get_import_as_skeleton_bones" default="false">
309315
If [code]true[/code], forces all GLTFNodes in the document to be bones of a single [Skeleton3D] Godot node.
310316
</member>
@@ -325,16 +331,30 @@
325331
</member>
326332
</members>
327333
<constants>
328-
<constant name="HANDLE_BINARY_DISCARD_TEXTURES" value="0">
334+
<constant name="HANDLE_BINARY_IMAGE_MODE_DISCARD_TEXTURES" value="0" enum="HandleBinaryImageMode">
335+
When importing a glTF file with embedded binary images, discards all images and uses untextured materials in their place. Images stored as separate files in the [code]res://[/code] folder are not affected by this; those will be used as Godot imported them.
336+
</constant>
337+
<constant name="HANDLE_BINARY_IMAGE_MODE_EXTRACT_TEXTURES" value="1" enum="HandleBinaryImageMode">
338+
When importing a glTF file with embedded binary images, extracts them and saves them to their own files. This allows the image to be imported by Godot's image importer, which can then have their import options customized by the user, including optionally compressing the image to VRAM texture formats.
339+
This will save the images's bytes exactly as-is, without recompression. For image formats supplied by glTF extensions, the file will have a filename ending with the file extension supplied by [method GLTFDocumentExtension._get_image_file_extension] of the extension class.
340+
[b]Note:[/b] This option is editor-only. At runtime, this acts the same as [constant HANDLE_BINARY_IMAGE_MODE_EMBED_AS_UNCOMPRESSED].
341+
</constant>
342+
<constant name="HANDLE_BINARY_IMAGE_MODE_EMBED_AS_BASISU" value="2" enum="HandleBinaryImageMode">
343+
When importing a glTF file with embedded binary images, embeds textures VRAM compressed with Basis Universal into the generated scene. Images stored as separate files in the [code]res://[/code] folder are not affected by this; those will be used as Godot imported them.
344+
</constant>
345+
<constant name="HANDLE_BINARY_IMAGE_MODE_EMBED_AS_UNCOMPRESSED" value="3" enum="HandleBinaryImageMode">
346+
When importing a glTF file with embedded binary images, embeds textures compressed losslessly into the generated scene. Images stored as separate files in the [code]res://[/code] folder are not affected by this; those will be used as Godot imported them.
347+
</constant>
348+
<constant name="HANDLE_BINARY_DISCARD_TEXTURES" value="0" deprecated="Use [constant HANDLE_BINARY_IMAGE_MODE_DISCARD_TEXTURES] instead.">
329349
Discards all embedded textures and uses untextured materials.
330350
</constant>
331-
<constant name="HANDLE_BINARY_EXTRACT_TEXTURES" value="1">
351+
<constant name="HANDLE_BINARY_EXTRACT_TEXTURES" value="1" deprecated="Use [constant HANDLE_BINARY_IMAGE_MODE_EXTRACT_TEXTURES] instead.">
332352
Extracts embedded textures to be reimported and compressed. Editor only. Acts as uncompressed at runtime.
333353
</constant>
334-
<constant name="HANDLE_BINARY_EMBED_AS_BASISU" value="2">
354+
<constant name="HANDLE_BINARY_EMBED_AS_BASISU" value="2" deprecated="Use [constant HANDLE_BINARY_IMAGE_MODE_EMBED_AS_BASISU] instead.">
335355
Embeds textures VRAM compressed with Basis Universal into the generated scene.
336356
</constant>
337-
<constant name="HANDLE_BINARY_EMBED_AS_UNCOMPRESSED" value="3">
357+
<constant name="HANDLE_BINARY_EMBED_AS_UNCOMPRESSED" value="3" deprecated="Use [constant HANDLE_BINARY_IMAGE_MODE_EMBED_AS_UNCOMPRESSED] instead.">
338358
Embeds textures compressed losslessly into the generated scene, matching old behavior.
339359
</constant>
340360
</constants>

modules/gltf/editor/editor_scene_importer_gltf.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ Node *EditorSceneFormatImporterGLTF::import_scene(const String &p_path, uint32_t
5151
}
5252
if (p_options.has("gltf/embedded_image_handling")) {
5353
int32_t enum_option = p_options["gltf/embedded_image_handling"];
54-
state->set_handle_binary_image(enum_option);
54+
state->set_handle_binary_image_mode((GLTFState::HandleBinaryImageMode)enum_option);
5555
}
5656
if (p_options.has(SNAME("nodes/import_as_skeleton_bones")) ? (bool)p_options[SNAME("nodes/import_as_skeleton_bones")] : false) {
5757
state->set_import_as_skeleton_bones(true);
@@ -85,7 +85,7 @@ void EditorSceneFormatImporterGLTF::get_import_options(const String &p_path,
8585
// Returns all the options when path is empty because that means it's for the Project Settings.
8686
if (p_path.is_empty() || file_extension == "gltf" || file_extension == "glb") {
8787
r_options->push_back(ResourceImporterScene::ImportOption(PropertyInfo(Variant::INT, "gltf/naming_version", PROPERTY_HINT_ENUM, "Godot 4.0 or 4.1,Godot 4.2 to 4.4,Godot 4.5 or later"), 2));
88-
r_options->push_back(ResourceImporterScene::ImportOption(PropertyInfo(Variant::INT, "gltf/embedded_image_handling", PROPERTY_HINT_ENUM, "Discard All Textures,Extract Textures,Embed as Basis Universal,Embed as Uncompressed", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED), GLTFState::HANDLE_BINARY_EXTRACT_TEXTURES));
88+
r_options->push_back(ResourceImporterScene::ImportOption(PropertyInfo(Variant::INT, "gltf/embedded_image_handling", PROPERTY_HINT_ENUM, "Discard All Textures,Extract Textures,Embed as Basis Universal,Embed as Uncompressed", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED), GLTFState::HANDLE_BINARY_IMAGE_MODE_EXTRACT_TEXTURES));
8989
}
9090
}
9191

modules/gltf/gltf_document.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3909,14 +3909,14 @@ Ref<Image> GLTFDocument::_parse_image_bytes_into_image(Ref<GLTFState> p_state, c
39093909
}
39103910

39113911
void GLTFDocument::_parse_image_save_image(Ref<GLTFState> p_state, const Vector<uint8_t> &p_bytes, const String &p_resource_uri, const String &p_file_extension, int p_index, Ref<Image> p_image) {
3912-
GLTFState::GLTFHandleBinary handling = GLTFState::GLTFHandleBinary(p_state->handle_binary_image);
3913-
if (p_image->is_empty() || handling == GLTFState::GLTFHandleBinary::HANDLE_BINARY_DISCARD_TEXTURES) {
3912+
GLTFState::HandleBinaryImageMode handling = GLTFState::HandleBinaryImageMode(p_state->handle_binary_image_mode);
3913+
if (p_image->is_empty() || handling == GLTFState::HandleBinaryImageMode::HANDLE_BINARY_IMAGE_MODE_DISCARD_TEXTURES) {
39143914
p_state->images.push_back(Ref<Texture2D>());
39153915
p_state->source_images.push_back(Ref<Image>());
39163916
return;
39173917
}
39183918
#ifdef TOOLS_ENABLED
3919-
if (Engine::get_singleton()->is_editor_hint() && handling == GLTFState::GLTFHandleBinary::HANDLE_BINARY_EXTRACT_TEXTURES) {
3919+
if (Engine::get_singleton()->is_editor_hint() && handling == GLTFState::HandleBinaryImageMode::HANDLE_BINARY_IMAGE_MODE_EXTRACT_TEXTURES) {
39203920
if (p_state->extract_path.is_empty()) {
39213921
WARN_PRINT("glTF: Couldn't extract image because the base and extract paths are empty. It will be loaded directly instead, uncompressed.");
39223922
} else if (p_state->extract_path.begins_with("res://.godot/imported")) {
@@ -3999,7 +3999,7 @@ void GLTFDocument::_parse_image_save_image(Ref<GLTFState> p_state, const Vector<
39993999
}
40004000
}
40014001
#endif // TOOLS_ENABLED
4002-
if (handling == GLTFState::GLTFHandleBinary::HANDLE_BINARY_EMBED_AS_BASISU) {
4002+
if (handling == GLTFState::HandleBinaryImageMode::HANDLE_BINARY_IMAGE_MODE_EMBED_AS_BASISU) {
40034003
Ref<PortableCompressedTexture2D> tex;
40044004
tex.instantiate();
40054005
tex->set_name(p_image->get_name());
@@ -4009,8 +4009,8 @@ void GLTFDocument::_parse_image_save_image(Ref<GLTFState> p_state, const Vector<
40094009
p_state->source_images.push_back(p_image);
40104010
return;
40114011
}
4012-
// This handles the case of HANDLE_BINARY_EMBED_AS_UNCOMPRESSED, and it also serves
4013-
// as a fallback for HANDLE_BINARY_EXTRACT_TEXTURES when this is not the editor.
4012+
// This handles the case of HANDLE_BINARY_IMAGE_MODE_EMBED_AS_UNCOMPRESSED, and it also serves
4013+
// as a fallback for HANDLE_BINARY_IMAGE_MODE_EXTRACT_TEXTURES when this is not the editor.
40144014
Ref<ImageTexture> tex;
40154015
tex.instantiate();
40164016
tex->set_name(p_image->get_name());
@@ -4243,7 +4243,7 @@ Ref<Texture2D> GLTFDocument::_get_texture(Ref<GLTFState> p_state, const GLTFText
42434243
ERR_FAIL_INDEX_V(p_texture, p_state->textures.size(), Ref<Texture2D>());
42444244
const GLTFImageIndex image = p_state->textures[p_texture]->get_src_image();
42454245
ERR_FAIL_INDEX_V(image, p_state->images.size(), Ref<Texture2D>());
4246-
if (GLTFState::GLTFHandleBinary(p_state->handle_binary_image) == GLTFState::GLTFHandleBinary::HANDLE_BINARY_EMBED_AS_BASISU) {
4246+
if (GLTFState::HandleBinaryImageMode(p_state->handle_binary_image_mode) == GLTFState::HandleBinaryImageMode::HANDLE_BINARY_IMAGE_MODE_EMBED_AS_BASISU) {
42474247
ERR_FAIL_INDEX_V(image, p_state->source_images.size(), Ref<Texture2D>());
42484248
Ref<PortableCompressedTexture2D> portable_texture;
42494249
portable_texture.instantiate();

modules/gltf/gltf_state.cpp

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,8 @@ void GLTFState::_bind_methods() {
9999
ClassDB::bind_method(D_METHOD("get_node_index", "scene_node"), &GLTFState::get_node_index);
100100
ClassDB::bind_method(D_METHOD("get_additional_data", "extension_name"), &GLTFState::get_additional_data);
101101
ClassDB::bind_method(D_METHOD("set_additional_data", "extension_name", "additional_data"), &GLTFState::set_additional_data);
102-
ClassDB::bind_method(D_METHOD("get_handle_binary_image"), &GLTFState::get_handle_binary_image);
103-
ClassDB::bind_method(D_METHOD("set_handle_binary_image", "method"), &GLTFState::set_handle_binary_image);
102+
ClassDB::bind_method(D_METHOD("get_handle_binary_image_mode"), &GLTFState::get_handle_binary_image_mode);
103+
ClassDB::bind_method(D_METHOD("set_handle_binary_image_mode", "method"), &GLTFState::set_handle_binary_image_mode);
104104
ClassDB::bind_method(D_METHOD("set_bake_fps", "value"), &GLTFState::set_bake_fps);
105105
ClassDB::bind_method(D_METHOD("get_bake_fps"), &GLTFState::get_bake_fps);
106106

@@ -132,9 +132,18 @@ void GLTFState::_bind_methods() {
132132
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "create_animations"), "set_create_animations", "get_create_animations"); // bool
133133
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "import_as_skeleton_bones"), "set_import_as_skeleton_bones", "get_import_as_skeleton_bones"); // bool
134134
ADD_PROPERTY(PropertyInfo(Variant::ARRAY, "animations", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_STORAGE | PROPERTY_USAGE_INTERNAL | PROPERTY_USAGE_EDITOR), "set_animations", "get_animations"); // Vector<Ref<GLTFAnimation>>
135-
ADD_PROPERTY(PropertyInfo(Variant::INT, "handle_binary_image", PROPERTY_HINT_ENUM, "Discard All Textures,Extract Textures,Embed as Basis Universal,Embed as Uncompressed", PROPERTY_USAGE_STORAGE | PROPERTY_USAGE_INTERNAL | PROPERTY_USAGE_EDITOR), "set_handle_binary_image", "get_handle_binary_image"); // enum
135+
ADD_PROPERTY(PropertyInfo(Variant::INT, "handle_binary_image_mode", PROPERTY_HINT_ENUM, "Discard All Textures,Extract Textures,Embed as Basis Universal,Embed as Uncompressed"), "set_handle_binary_image_mode", "get_handle_binary_image_mode"); // enum
136136
ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "bake_fps", PROPERTY_HINT_RANGE, "0.001,120,0.0001,or_greater"), "set_bake_fps", "get_bake_fps");
137137

138+
BIND_ENUM_CONSTANT(HANDLE_BINARY_IMAGE_MODE_DISCARD_TEXTURES);
139+
BIND_ENUM_CONSTANT(HANDLE_BINARY_IMAGE_MODE_EXTRACT_TEXTURES);
140+
BIND_ENUM_CONSTANT(HANDLE_BINARY_IMAGE_MODE_EMBED_AS_BASISU);
141+
BIND_ENUM_CONSTANT(HANDLE_BINARY_IMAGE_MODE_EMBED_AS_UNCOMPRESSED);
142+
143+
// Deprecated non-type-safe versions for backward compatibility, remove in Godot 5.0.
144+
ClassDB::bind_method(D_METHOD("get_handle_binary_image"), &GLTFState::get_handle_binary_image);
145+
ClassDB::bind_method(D_METHOD("set_handle_binary_image", "method"), &GLTFState::set_handle_binary_image);
146+
ADD_PROPERTY(PropertyInfo(Variant::INT, "handle_binary_image", PROPERTY_HINT_ENUM, "Discard All Textures,Extract Textures,Embed as Basis Universal,Embed as Uncompressed", PROPERTY_USAGE_INTERNAL), "set_handle_binary_image", "get_handle_binary_image"); // enum as int
138147
BIND_CONSTANT(HANDLE_BINARY_DISCARD_TEXTURES);
139148
BIND_CONSTANT(HANDLE_BINARY_EXTRACT_TEXTURES);
140149
BIND_CONSTANT(HANDLE_BINARY_EMBED_AS_BASISU);

0 commit comments

Comments
 (0)