Check out, and critic my LOD script on my next post.
Old post
I am trying to get a meshes name and assign it to a property, I would also like to remove the first 2 letters (ME) but I ran into a couple problems, when I assign the mesh name to the property, the property then disappears from the debug list. Secondly when I try to remove the first 2 letters, it removes all of them, or that’s what it appears to do. I keep track by print
Any help is much appreciated.
Heres the code, and I attached a blend.
###Get stuff
import GameLogic as G
cont = G.getCurrentController()
own = cont.getOwner()
objList = G.getCurrentScene().getObjectList()
scene = GameLogic.getCurrentScene()
############
mesh = own.meshes
own.mesh = mesh
own.object = mesh
print own.mesh
Attachments
Mesh Name.blend (143 KB)