Added checkbox for blender's "GPU Instances" option for exporting GLTF

This commit is contained in:
bfrac
2025-06-18 18:59:13 +03:00
parent c7b1767560
commit 40fcf5ee3e

View File

@ -247,6 +247,14 @@ Node *EditorSceneFormatImporterBlend::import_scene(const String &p_path, uint32_
parameters_map["export_gn_mesh"] = false;
}
}
if (blender_major_version >= 4) {
if (p_options.has(SNAME("blender/meshes/gpu_instances")) && p_options[SNAME("blender/meshes/gpu_instances")]) {
parameters_map["export_gpu_instances"] = true;
} else {
parameters_map["export_gpu_instances"] = false;
}
}
if (p_options.has(SNAME("blender/meshes/tangents")) && p_options[SNAME("blender/meshes/tangents")]) {
parameters_map["export_tangents"] = true;
} else {
@ -368,6 +376,7 @@ void EditorSceneFormatImporterBlend::get_import_options(const String &p_path, Li
ADD_OPTION_BOOL("blender/meshes/uvs", true);
ADD_OPTION_BOOL("blender/meshes/normals", true);
ADD_OPTION_BOOL("blender/meshes/export_geometry_nodes_instances", false);
ADD_OPTION_BOOL("blender/meshes/gpu_instances", false);
ADD_OPTION_BOOL("blender/meshes/tangents", true);
ADD_OPTION_ENUM("blender/meshes/skins", "None,4 Influences (Compatible),All Influences", BLEND_BONE_INFLUENCES_ALL);
ADD_OPTION_BOOL("blender/meshes/export_bones_deforming_mesh_only", false);