Camera initial state and setTextureOff priority

I’ve got a camera for rendering shadows, it renders all in gray without textures. But there are some alpha/transparency textures that I would like to keep anyway. Can this be done? How?

The camera has:

#Make everything rendered by the shadow camera grey:
self.initial = NodePath('initial')
self.initial.setColor(.75,.75,.75,1,1)
self.initial.setTextureOff(2)
self.initial.setMaterialOff(2)
self.initial.setLightOff(2)
self.shadowCamera.node().setInitialState(self.initial.getState())

I was thinking that I could set a textures priority to something above 2 to keep that texture (in my egg file via priority { 10}) , but that doesn’t work.

You can’t set priorities like that in an egg file, but you can set them after you load the model. You can also use model.adjustAllPriorities(10) to add 10 to all the render state priorities at model and below.

David

Thanks, that works, but gives me some extra work on getting levels to load. Will figure something out.