Pixel Perfect Posted June 30, 2011 Share Posted June 30, 2011 Is it possible to obtain the model / mesh file names from the Entity collection once loaded from an sbx file? Are these retained/exposed? I can do everything else I need to from the loaded scene without having to parse the sbx file and would rather not do so just to obtain the model file names if I could avoid it. This is so I can convert them to .obj files programatically and dump them into a common directory. Quote Intel Core i5 2.66 GHz, Asus P7P55D, 8Gb DDR3 RAM, GTX460 1Gb DDR5, Windows 7 (x64), LE Editor, GMax, 3DWS, UU3D Pro, Texture Maker Pro, Shader Map Pro. Development language: C/C++ Link to comment Share on other sites More sharing options...
macklebee Posted July 1, 2011 Share Posted July 1, 2011 i can do it in bmax... so maybe that will help with a c++ version? For e = EachIn fw.Main.world.entities If GetEntityClass(e) = ENTITY_MODEL Then Print(TModel(e).reference.path) End If Next 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...
Pixel Perfect Posted July 1, 2011 Author Share Posted July 1, 2011 Thanks macklebee, thats exactly what I'm looking for but I'm not sure that's exposed in the C DLL. The ability to access all the properties of entities in BlitzMax is a big advantage! I wonder what the MeshName(TEntity mesh) returns. I'm at work at the moment so can't try it! Quote Intel Core i5 2.66 GHz, Asus P7P55D, 8Gb DDR3 RAM, GTX460 1Gb DDR5, Windows 7 (x64), LE Editor, GMax, 3DWS, UU3D Pro, Texture Maker Pro, Shader Map Pro. Development language: C/C++ Link to comment Share on other sites More sharing options...
macklebee Posted July 1, 2011 Share Posted July 1, 2011 oh yeah... i forgot all about that... it returns the same thing For e = EachIn fw.Main.world.entities If GetEntityClass(e) = ENTITY_MODEL Then Print(MeshName(TMesh(GetChild(e, 1)))) End If Next 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...
Pixel Perfect Posted July 1, 2011 Author Share Posted July 1, 2011 Excellent .... many thanks for trying that, that will do nicely Quote Intel Core i5 2.66 GHz, Asus P7P55D, 8Gb DDR3 RAM, GTX460 1Gb DDR5, Windows 7 (x64), LE Editor, GMax, 3DWS, UU3D Pro, Texture Maker Pro, Shader Map Pro. Development language: C/C++ Link to comment Share on other sites More sharing options...
cassius Posted July 1, 2011 Share Posted July 1, 2011 Is this code more or less the same? For Local e:TEntity = EachIn CurrentWorld().Entities Select GetEntityKey(e, "Name") Quote amd quad core 4 ghz / geforce 660 ti 2gb / win 10 Blender,gimp,silo2,ac3d,,audacity,Hexagon / using c++ Link to comment Share on other sites More sharing options...
macklebee Posted July 1, 2011 Share Posted July 1, 2011 Is this code more or less the same? For Local e:TEntity = EachIn CurrentWorld().Entities Select GetEntityKey(e, "Name") No. The code i showed above returns the GMF model's folder path. c:/program files/leadwerks engine sdk/models/props/oildrum/oildrum.gmf The GetEntityKey(e,"name") returns a model's name key, assuming it even has that key. oildrum_1 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...
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.