gd-3d / bless

blender level editor software suite
MIT License
22 stars 2 forks source link

KHR_node_visibility issues with godot #67

Open yankscally opened 3 weeks ago

yankscally commented 3 weeks ago

Because the editor imports ImporterMesh3D first before creating the MeshInstance3D node, it loses a lot of properties.

"It discards every property except name, transform, mesh, skin, skeleton."

MeshInstance3D *mesh_instance_node_3d = memnew(MeshInstance3D);
Ref<ArrayMesh> array_mesh = mesh->get_mesh();
mesh_instance_node_3d->set_name(node->get_name());
mesh_instance_node_3d->set_transform(importer_mesh_3d->get_transform());
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());
node->replace_by(mesh_instance_node_3d);

There is practically no information on this, but it may come up again so I made a note.