griminventions
23-01-2006 20:10:59
I'm trying to dynamically turn lighting on and off for an entity (mesh) so that it will appear full-bright so as to blink.
Can I use the functions mentioned in the API doc from subentity? Like
That doesn't seem to do anything. So I tried iterating over all the techniques of the material for each subentity, setting lightingEnabled for each, and that didn't do anything, either. I also tried to use selfIllumination but with no results. The model still receives light.
What am I doing wrong?
Can I use the functions mentioned in the API doc from subentity? Like
subent.material.lightingEnabled = False
That doesn't seem to do anything. So I tried iterating over all the techniques of the material for each subentity, setting lightingEnabled for each, and that didn't do anything, either. I also tried to use selfIllumination but with no results. The model still receives light.
What am I doing wrong?

for i in range( mesh.numSubEntities ):
ent = mesh.getSubEntity( i )
for j in range( ent.material.numTechniques ):
tec = ent.material.getTechnique( j )
tec.lightingEnabled = False