cocopino Posted May 26, 2010 Share Posted May 26, 2010 I am trying to change the vertex information of a model in LUA, I'm trying this code on the model to try and find out which surface I need: require("scripts/class") local class=CreateClass(...) function class:CreateObject(model) local object=self.super:CreateObject(model) Print ("model") Print (CountChildren(model)) Print (model:GetKey("name")) Print ("ob1") ob1 = GetChild(model, 1) Print (CountChildren(ob1)) Print (CountSurfaces(ob1)) Print (ob1:GetKey("name")) Print ("ob2") ob2 = GetChild(ob1, 1) Print (CountChildren(ob2)) Print (ob2:GetKey("name")) function object:Update() end function object:Free(model) self.super:Free() end end The first child is called "U3D_MESH" which sounds pretty promising. It doesn't have any surfaces though, while loading it with GetChild(LoadMesh("mesh.gmf"),1) in BlitzMax does work. When going deeper into the model it's returning bone names. Any ideas? Thanks! Quote desktop: Quad core Q6600 + 4GB + ATI HD4890 + XP laptop: Dual core T6400 + 4 GB + NVidia 9600M GT + Vista 32 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.