amit Posted August 6, 2012 Share Posted August 6, 2012 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? Quote Link to comment Share on other sites More sharing options...
macklebee Posted August 6, 2012 Share Posted August 6, 2012 MeshName() gives the file path. Try using GetEntityKey(entity, "name") to get the submesh name. Quote Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590 LE / 3DWS / BMX / Hexagon macklebee's channel Link to comment Share on other sites More sharing options...
amit Posted August 6, 2012 Author Share Posted August 6, 2012 MeshName() gives the file path. Try using GetEntityKey(entity, "name") to get the submesh name. Works like a charm, thanks. Where do you get all this info? Quote Link to comment Share on other sites More sharing options...
Canardia Posted August 6, 2012 Share Posted August 6, 2012 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. Quote ■ Ryzen 9 ■ RX 6800M ■ 16GB ■ XF8 ■ Windows 11 ■ ■ Ultra ■ LE 2.5 ■ 3DWS 5.6 ■ Reaper ■ C/C++ ■ C# ■ Fortran 2008 ■ Story ■ ■ Homepage: https://canardia.com ■ Link to comment Share on other sites More sharing options...
amit Posted August 9, 2012 Author Share Posted August 9, 2012 yep, i too hope so. would be waiting for LE3. Good documentation is what i could have really wanted few weeks before. but thanks to this forum, its a lot of help. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.