diff options
author | Jummit <jummit@web.de> | 2023-02-25 19:12:55 +0100 |
---|---|---|
committer | Jummit <jummit@web.de> | 2024-05-31 18:37:14 +0200 |
commit | c182adcd48195e94a9c7364af00a64b80ebdf2f7 (patch) | |
tree | 0630d3954fcb161f1ed0b9cb331a5891a5dcc915 /modules/gltf/editor | |
parent | 8bf8f41fc017531b502fe77b36c3b14e180cec5c (diff) | |
download | redot-engine-c182adcd48195e94a9c7364af00a64b80ebdf2f7.tar.gz |
Blend import: Ability to import only the active collection
Diffstat (limited to 'modules/gltf/editor')
-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); |