Python helpers that make your life damn easy

 

A cool thing in Python is that you can name function arguments... Indeed you can write :

myMaterial = createMaterial(diffuse="diffuse_map.tga")
// or
myMaterial = createMaterial(diffuse=(1,0,0), hardness=40, specular='specular_map.tga')
// or 
myMaterial = createMaterial(reflection=0.8, hardness=40, refraction=0.2,
                            specular=(0.7,0.7,0.7), diffuse="diffuse_map.tga")

The same applies to the MatrixHelper :

myMatrix = createMatrix(translation=(0,0,4), rotation=(10,90,180), scaling=1.6)

Every argument is facultative. Note that you cannot have access to the VolumicColor field (for example) of Material like this because python's MaterialHelper is only a wrapper around raytressi's MaterialHelper (and raytressi's MaterialHelper doesn't provide access to VolumicColor...)