I can 'reset editor material slots' but I would like to delete all material from scene that my object in the scene will be clear with default material?
-- to remove any material from every object in the scene
for theItem in Geometry do
theItem.material = undefined
-- to apply the Standard material to every object in the scene
for theItem in Geometry do
theItem.material = Standard()
for theItem in Geometry do ( theItem.material = undefined )
EDIT: If you want it as a command you can associate to a shortcut or a toolbar button, evaluate following code, then go to Customize user interface and find it under Category "Material Tools".
macroScript RemoveMaterials
category:"Material Tools"
buttonText:"Remove Materials"
tooltip:"Remove Matrerial form All Scene Objects"
(
on execute do
for theItem in Geometry do
theItem.material = undefined
)
One more you may want to try, depending on what you're trying to accomplish, is using the material override setting in the processing tab of the mental ray renderer.
This will apply one material to every object in the scene for the purposes of rendering.
Replies
Select all the meshes, go to the Utility panel, click the More... button, choose UVW Remove and click OK, then click Materials.
theItem.material = undefined
EDIT: If you want it as a command you can associate to a shortcut or a toolbar button, evaluate following code, then go to Customize user interface and find it under Category "Material Tools".
One more you may want to try, depending on what you're trying to accomplish, is using the material override setting in the processing tab of the mental ray renderer.
This will apply one material to every object in the scene for the purposes of rendering.
In the Material Editor window, choose Utilities > Condense Material Slots.
Press Shift +T
Select any of the referenced or old Textures, Right Click and choose "Strip Path".
Save your file. Your materials should all be reset to default and there should only be one referenced material in your entire scene.
A while back I wrote a little maxscript GUI for the same kind of functions. Info and download.
http://www.scriptspot.com/3ds-max/matclean#comment-4556