Jump to content

World saveNode don't store path to mesh


photo

Recommended Posts

Hi,

I create mesh, add some surfaces from another existing mesh, then i save mesh and node with this code:

		Unigine::MeshPtr mesh = Unigine::Mesh::create();
		Unigine::ObjectMeshStaticPtr targetMesh = Unigine::ObjectMeshStatic::create(mesh);

		//addSurfaces from another mesh

		targetMesh.get()->saveMesh("test.mesh");

		Unigine::World::get()->saveNode("test.node", targetMesh.get()->getNode(), 0);

Problem is in node, it missing link to mesh.

In node file is "<mesh_name/>" instead "<mesh_name>guid://1729b0860798d2bff78044a5b18806d96054e339</mesh_name>".

All other is corectly saved to node file.

 

Thanks

Honya

  • Like 1
Link to comment

Thanks for clarify it.

It would be good to mention in in documentation that i need add this code before save:

targetMesh.get()->setMeshName(Unigine::FileSystem::get()->getGUID(meshSavePath.c_str()).getFileSystemString());

Honya

Link to comment
×
×
  • Create New...