projectironwill
02-12-2005, 05:16 AM
I'm new to both 3ds max 7 & MAXScript and I'm having trouble with creating a script to set all of the Material Map Amounts on all materials in a scene back to the default Map Amount values.
-- I want to step through each Material in the scene using a loop.
-- Change the Maps Amount for each material to the following:
meditMaterials[1].ambientMapAmount = 100
meditMaterials[1].diffuseMapAmount = 100
meditMaterials[1].specularMapAmount = 100
meditMaterials[1].specularLevelMapAmount = 100
meditMaterials[1].glossinessMapAmount = 100
meditMaterials[1].selfillumMapAmount = 100
meditMaterials[1].opacityMapAmount = 100
meditMaterials[1].filterMapAmount = 100
meditMaterials[1].bumpMapAmount = 30
meditMaterials[1].reflectionMapAmount = 100
meditMaterials[1].refractionMapAmount = 100
meditMaterials[1].displacementMapAmount = 100
-- Save the file
max file save
-- Open File Command to get the next file.
max file open
-- END OF SCRIPT
What is confusing me is the meditMaterials[#] IDs. I need to change all of the materials in the scene, not just using one ID.
This can be for Max 7 or 8.
Thanks for any help that can be provided.
-- I want to step through each Material in the scene using a loop.
-- Change the Maps Amount for each material to the following:
meditMaterials[1].ambientMapAmount = 100
meditMaterials[1].diffuseMapAmount = 100
meditMaterials[1].specularMapAmount = 100
meditMaterials[1].specularLevelMapAmount = 100
meditMaterials[1].glossinessMapAmount = 100
meditMaterials[1].selfillumMapAmount = 100
meditMaterials[1].opacityMapAmount = 100
meditMaterials[1].filterMapAmount = 100
meditMaterials[1].bumpMapAmount = 30
meditMaterials[1].reflectionMapAmount = 100
meditMaterials[1].refractionMapAmount = 100
meditMaterials[1].displacementMapAmount = 100
-- Save the file
max file save
-- Open File Command to get the next file.
max file open
-- END OF SCRIPT
What is confusing me is the meditMaterials[#] IDs. I need to change all of the materials in the scene, not just using one ID.
This can be for Max 7 or 8.
Thanks for any help that can be provided.