Jump to content

Recommended Posts

Posted

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.

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++

Posted

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

Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590

LE / 3DWS / BMX / Hexagon

macklebee's channel

Posted

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!

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++

Posted

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

Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590

LE / 3DWS / BMX / Hexagon

macklebee's channel

Posted

Excellent .... many thanks for trying that, that will do nicely :)

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++

Posted

Is this code more or less the same?

 

 

For Local e:TEntity = EachIn CurrentWorld().Entities

Select GetEntityKey(e, "Name")

amd quad core 4 ghz / geforce 660 ti 2gb / win 10

Blender,gimp,silo2,ac3d,,audacity,Hexagon / using c++

Posted

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

Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590

LE / 3DWS / BMX / Hexagon

macklebee's channel

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.

×
×
  • Create New...