diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2024-06-03 10:35:34 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2024-06-03 10:35:34 +0200 |
commit | bc7a7a479eab822dd69756e35604093704233a5d (patch) | |
tree | 9e07e20eadab59102a49babe77b7d31c35b57cb7 /modules | |
parent | 3ac98435ce75dbf6e67525c0b3d1aeba2530ae4a (diff) | |
parent | c182adcd48195e94a9c7364af00a64b80ebdf2f7 (diff) | |
download | redot-engine-bc7a7a479eab822dd69756e35604093704233a5d.tar.gz |
Merge pull request #73941 from Jummit/active-collection
Blend import: Allow importing `active_collection_only`
Diffstat (limited to 'modules')
-rw-r--r-- | modules/gltf/editor/editor_scene_importer_blend.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/modules/gltf/editor/editor_scene_importer_blend.cpp b/modules/gltf/editor/editor_scene_importer_blend.cpp index ccf347e03e..822e11ea4b 100644 --- a/modules/gltf/editor/editor_scene_importer_blend.cpp +++ b/modules/gltf/editor/editor_scene_importer_blend.cpp @@ -207,6 +207,9 @@ Node *EditorSceneFormatImporterBlend::import_scene(const String &p_path, uint32_ parameters_map["use_renderable"] = false; parameters_map["use_visible"] = false; } + if (p_options.has(SNAME("blender/nodes/active_collection_only")) && p_options[SNAME("blender/nodes/active_collection_only")]) { + parameters_map["use_active_collection"] = true; + } if (p_options.has(SNAME("blender/meshes/uvs")) && p_options[SNAME("blender/meshes/uvs")]) { parameters_map["export_texcoords"] = true; @@ -332,6 +335,7 @@ void EditorSceneFormatImporterBlend::get_import_options(const String &p_path, Li r_options->push_back(ResourceImporter::ImportOption(PropertyInfo(Variant::INT, SNAME(PATH), PROPERTY_HINT_ENUM, ENUM_HINT), VALUE)); ADD_OPTION_ENUM("blender/nodes/visible", "All,Visible Only,Renderable", BLEND_VISIBLE_ALL); + ADD_OPTION_BOOL("blender/nodes/active_collection_only", false); ADD_OPTION_BOOL("blender/nodes/punctual_lights", true); ADD_OPTION_BOOL("blender/nodes/cameras", true); ADD_OPTION_BOOL("blender/nodes/custom_properties", true); |