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?