Save mesh with attached to bone movable object

Kohedlo

08-02-2010 22:53:21

After ATTACHING MOVABLE OBJECT to bone - iterator of atached objects see new movable object.
After i save mesh:

Mogre.Mesh mesh = .ent.GetMesh();

using (Mogre.MeshSerializer ms = new Mogre.MeshSerializer())
{
ms.ExportMesh(mesh, "C:/saved.mesh");

}


Size of mesh has change, but when i reload again this saved mesh - is no visible attached obj.And iterator not see new attached to bone obj. before save.

Also analogically saving the skeleton -no give effect.

What i missing7. Thanks all.

kraj0t

09-02-2010 07:33:21

Could you please post the code you're using before that? The way you're attaching the movable object to the bone and so on.

Maybe we can help you with that.

Kohedlo

15-02-2010 22:13:45



If need i send code.But i want reduce mu old question: data about materials -in mesh file. Can mesh file contain data about attached objects7 If yes -how to write this data to mesh7.

My context of code contain method - ent.AttachObjectToBone().

Kohedlo

18-03-2010 09:22:21

the code lice this works finely

ent.AttachObjectToBone("Joint2", DockSample.Editor.Character_Editor.OgreWindow.mSceneMgr.CreateEntity("1234","ninja.mesh"));

but the next wariant code -give exception

entToAttach = OgreWindow.mSceneMgr.GetEntity(comboBox3.SelectedItem.ToString());

ent.AttachObjectToBone("Joint2", EntToAttach); <- exception


Do you use this code -is works7 what is it7

Kohedlo

18-03-2010 16:05:09

Not works even
foreach (Entity entity in EntList)
{
if (entity.Name == comboBox3.SelectedItem.ToString())
{
ent.AttachObjectToBone("Joint2", entity);
}
}


I dont know how to slove it

Kohedlo

23-03-2010 19:38:23

Ok / Before attachind ent to bone need detach ent from scene node. This slove exception