mirror of
https://github.com/godotengine/godot.git
synced 2025-12-08 06:09:55 +00:00
GLTF: Preserve node visibility on import
This commit is contained in:
parent
87318a2fb7
commit
924732772b
6 changed files with 6 additions and 3 deletions
|
|
@ -88,7 +88,7 @@ void SceneExporterGLTFPlugin::_popup_gltf_export_dialog() {
|
|||
}
|
||||
_file_dialog->set_current_file(filename + String(".gltf"));
|
||||
// Generate and refresh the export settings.
|
||||
_export_settings->generate_property_list(_gltf_document);
|
||||
_export_settings->generate_property_list(_gltf_document, root);
|
||||
_settings_inspector->edit(nullptr);
|
||||
_settings_inspector->edit(_export_settings.ptr());
|
||||
// Show the file dialog.
|
||||
|
|
|
|||
|
|
@ -129,7 +129,7 @@ String get_friendly_config_prefix(Ref<GLTFDocumentExtension> p_extension) {
|
|||
}
|
||||
|
||||
// Run this before popping up the export settings, because the extensions may have changed.
|
||||
void EditorSceneExporterGLTFSettings::generate_property_list(Ref<GLTFDocument> p_document) {
|
||||
void EditorSceneExporterGLTFSettings::generate_property_list(Ref<GLTFDocument> p_document, Node *p_root) {
|
||||
_property_list.clear();
|
||||
_document = p_document;
|
||||
String image_format_hint_string = "None,PNG,JPEG";
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ protected:
|
|||
bool _get_extension_setting(const String &p_name_str, Variant &r_ret) const;
|
||||
|
||||
public:
|
||||
void generate_property_list(Ref<GLTFDocument> p_document);
|
||||
void generate_property_list(Ref<GLTFDocument> p_document, Node *p_root = nullptr);
|
||||
|
||||
String get_copyright() const;
|
||||
void set_copyright(const String &p_copyright);
|
||||
|
|
|
|||
|
|
@ -63,6 +63,7 @@ Error GLTFDocumentExtensionConvertImporterMesh::import_post(Ref<GLTFState> p_sta
|
|||
mesh_instance_node_3d->set_mesh(array_mesh);
|
||||
mesh_instance_node_3d->set_skin(importer_mesh_3d->get_skin());
|
||||
mesh_instance_node_3d->set_skeleton_path(importer_mesh_3d->get_skeleton_path());
|
||||
mesh_instance_node_3d->set_visible(importer_mesh_3d->is_visible());
|
||||
node->replace_by(mesh_instance_node_3d);
|
||||
_copy_meta(importer_mesh_3d, mesh_instance_node_3d);
|
||||
_copy_meta(mesh.ptr(), array_mesh.ptr());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue