[Bf-python] Re: erasing textures, materials, objects

alex mole nal at blueyonder.co.uk
Wed Apr 7 22:52:45 CEST 2004


Hi Nicolas

The simplest way to reset to default would be to just write a function 
to do it :)

def setTextureDefaults (t):
   t.image=None
   t.noiseDepth=...
   t.noiseSize=...
   t.rgb=...

And you could write a similar one to handle materials.


Alex


nicolas bonnand wrote:
>  > If you need many in parallel, try to do the same: create them once, 
> reuse later.
> 
> Thanks Willian and Stephen for your answers.
> 
> I'll do that.
> 
> 
> 1)  Then.... is there a trick to simply reinitialize a texture I want to 
> reuse ?
> 
> Am I really obliged to set each attribute to it's default value by hand 
> like this:    (???)
> 
> t.image=None
> t.noiseDepth=...
> t.noiseSize=...
> t.rgb=...
> 
> Is it possible to do the same in only one instruction ?
> Something like this:   t.setDefault()   ??????
> 
> 
> 
> 2) Same question for material
> Is there a trick to simply re-initialize a material ?
> 
> Something like this:       mat.setDefault()
> instead of
> 
> mat.rgbCol = [0.8, 0.8, 0.8]
> mat.setAlpha(1.0)
> mat.emit = 0.0
> ....
> 
> 
> Regards
> 
> Nicolas
> 
> 
> _______________________________________________
> Bf-python mailing list
> Bf-python at blender.org
> http://www.blender.org/mailman/listinfo/bf-python
> 
> 
> 



More information about the Bf-python mailing list