Jump to content

[SOLVED] Cant get Child Mesh Name


amit
 Share

Recommended Posts

Hi, trying to print child mesh name, using:

 

 int mesh_childrencount = CountChildren(mesh1);
dbprint("no of children for %s : %d", MeshName(mesh1), mesh_childrencount);
for(int i=1; i<=mesh_childrencount; i++)
{
 TEntity sm = GetChild(mesh1, i);
 TSurface ts = GetSurface(sm,1);
 str mat_name = MaterialName( GetSurfaceMaterial(ts) );
 str entity_name = MeshName(sm);
 mat_surface_map.insert(mat_name,(void*)&sm);
 dbprint("surface : %d : %s : %s\n", i, mat_name, entity_name);
}

 

The material name prints well, but the mesh name does not.

 

MeshName(mesh1) gives the file path of the gmf,

 

From Model I get one root mesh, which has around 129 child mesh, each of them has a name as shown in Model viewer, but if i do the code above, it does not.

 

If I open the model (in a .gmf) in Model Viewer, It shows all the child mesh name well.

 

any suggestions?

Link to comment
Share on other sites

It has been around since version 1 of Leadwerks :)

There we had a nice .chm help file with all the info, which worked in harmony with 3DWS too.

I think in LE3 we will have the good old style back, a game engine and a CSG editor which works together well.

LE3 should be soon out, since summer is almost over.

Ryzen 9 RX 6800M ■ 16GB XF8 Windows 11 ■
Ultra ■ LE 2.53DWS 5.6  Reaper ■ C/C++ C# ■ Fortran 2008 ■ Story ■
■ Homepage: https://canardia.com ■

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...