PyPRP Discussion: Revised prp_MatClasses.py

This thread is to discuss the changes made to MatClasses in my branch so that it can be merged to the existing trunk and next release of PyPRP:
This is what was changed, and added:
Ambient Color This has been set to the MirColor in Blender. So Colors now work like this:
In blender Col controls the Material's in Uru color, Spec controls the Specular color and Mir controls the Ambient color in Uru.
This caused the biggest change in that the default setting when you create a new material in Blender is to set mir to 1.0 for Red Green and Blue. Since nearly all materials in Uru use a 0 for their ambient colors except for certain things (lamp flares, certain layer animations etc) Having it export with a 1 will negate any vertex coloring. So to set this right all new materials in blender will need to have their mir setting set to black rather than white so that vertex coloring will still show through.
Ambient Color Animations:
Since Mir color animations are not implemented yet in Blender, I mapped this to the Color panel located in the MapTo section in blender. So to create a layer animation that animates the layers ambient color, in the materials section you set the color selector in the mapto section (the default being purple) to the color you want to start the animation at. Then press I and select AllMapping, this will allow you to animate this color. You then go to your end frame, chose your color and repeat the process. Once done in the IPO curve editor window you can delete all the other IPO curves if you so choose except for texR, texG and texB (this isn't necessary but helpful)
Flags
Most flags are individually set now to their own mapto buttons in no particular order:
LIGHTEN = kBlendAdd
SUBTRACT = kBlendSubtract
SCREEN = kBlendNoTexAlpha
DIVIDE = kBlendAlphaMult
NEG = kShadeEmissive
HARD = kMiscBindNext
TRANSLU = kBlendAlphaHighTest
RAYMIR = kMiscRestartPassHere
CSP = kBlendAlphaAdd
CMIR = kZNoZWrite
in the Textures panel these are the newly mapped flags:
if you chose NOISE as a texture rather than an image or a enviornment map, it will automatically export a plDynamicTexMap.
USEALPHA = kBlendAlpha
You still need a alpha color channel to use this blend flag, as before, but this way if you want to blend multiple textures on the same material, you set the USEALPHA only for layers that will be using the alpha, and it will not automatically set the flag for all layers as it did before (so only layers that need the alpha channel require this button, and will get this flag)
This is what was changed, and added:
Ambient Color This has been set to the MirColor in Blender. So Colors now work like this:
In blender Col controls the Material's in Uru color, Spec controls the Specular color and Mir controls the Ambient color in Uru.
This caused the biggest change in that the default setting when you create a new material in Blender is to set mir to 1.0 for Red Green and Blue. Since nearly all materials in Uru use a 0 for their ambient colors except for certain things (lamp flares, certain layer animations etc) Having it export with a 1 will negate any vertex coloring. So to set this right all new materials in blender will need to have their mir setting set to black rather than white so that vertex coloring will still show through.
Ambient Color Animations:
Since Mir color animations are not implemented yet in Blender, I mapped this to the Color panel located in the MapTo section in blender. So to create a layer animation that animates the layers ambient color, in the materials section you set the color selector in the mapto section (the default being purple) to the color you want to start the animation at. Then press I and select AllMapping, this will allow you to animate this color. You then go to your end frame, chose your color and repeat the process. Once done in the IPO curve editor window you can delete all the other IPO curves if you so choose except for texR, texG and texB (this isn't necessary but helpful)
Flags
Most flags are individually set now to their own mapto buttons in no particular order:
LIGHTEN = kBlendAdd
SUBTRACT = kBlendSubtract
SCREEN = kBlendNoTexAlpha
DIVIDE = kBlendAlphaMult
NEG = kShadeEmissive
HARD = kMiscBindNext
TRANSLU = kBlendAlphaHighTest
RAYMIR = kMiscRestartPassHere
CSP = kBlendAlphaAdd
CMIR = kZNoZWrite
in the Textures panel these are the newly mapped flags:
if you chose NOISE as a texture rather than an image or a enviornment map, it will automatically export a plDynamicTexMap.
USEALPHA = kBlendAlpha
You still need a alpha color channel to use this blend flag, as before, but this way if you want to blend multiple textures on the same material, you set the USEALPHA only for layers that will be using the alpha, and it will not automatically set the flag for all layers as it did before (so only layers that need the alpha channel require this button, and will get this flag)