Scripted Utility Version 0.1 Beta Source FOR MAX 2.5 and 3.x (3/29/2000)

Copyright (c) 2000 by Borislav Petrov, Bobo's Rendert**ls. 


MatMaster lets the user change any combination of Material properties globally
and create Presets of Material Properties to apply to scene materials.


Version 0.1 (3/29/2000)

MatMaster has been developed for both MAX 2.5 and 3.x. It should be very stable under 3.x, but there are some know problems with MAX 2.5 caused by the general stability of MAXScript...

To start MatMaster, Run or Evaluate the source file, go to Utilities/MAXScript and select "MatMaster" from the Utilities drop-down list.

The [UPDATE MATERIALS] button applies the Presets to the materials. When there are no Presets, the button will do nothing.

The "Affect Materials in" options let you apply the changes to the whole scene or only selected objects' materials.

The Presets List consists of a single text line for editing the names of Presets, a listbox for selecting Presets and 3 buttons for managing Presets. Press [Create] to create a new Preset. It will have a default name "Preset N" where N is the number of presets plus one.

To change the name, select the Preset from the list - the name will appear in the text line above. Type a new name and press Enter - the name will change.

When creating Presets, a new subdirectory of the \Scripts directory called \MatMaster will be created, and a file with a name "MM_AAAA_BBBB_CCCC.MMP" will be created, where AAAA,BBBB and CCCC are random ID numbers. Each file stands for a Preset - you can copy them to other PCs etc. NOTE that although Presets made in 2.5 and 3.x will be basically compatible, some values set in MAX 3.1 (like Shader #) might crash 2.5. It is a good idea not to mix MAX 2.5 and 3.1 Preset files.

To create a copy of a Preset, use the [Clone] button - a copy of the current Preset with a suffix _Clone will be created. It will keep all Properties from the original and can be used as template by adding/removing Properties.

To Delete a Preset from the disk, press [Delete]. You will be prompted to confirm the operation.

The drop-down list is used to define the type of material you want to change. By default, the properties of a Standard material will be displayed. The drop-down list lets you select Raytrace material as an option, and also an User-Defined material type (ANY type) placed in Slot 1 of the Material Editor. This option will let you use special types of materials like those by Blur Studio, for 3rd party renderers etc. NOTE that you can mix Properties from different types of materials in a single Preset - the scene materials will be affected only when the property is found anyway...

The "Available Material Properties" list shows all properties available for the specified material type. Some special properties will not be displayed, like the name of the Shaders or Samplers.

To find a property by name, just type some letters in the top line of the list.

To add a property to a Preset, there must be an active Preset in the Presets list. Either press [Add...] or double-click the name in the list - it will appear in the "Preset Properties" list. You cannot add the same Property twice.

To remove a property from a Preset, press the [Remove...] button.

When a property is being added to a Preset, it will use the default value of the "template material". There are four value types supported: Float, Integer, Color and Binary (Boolean On/Off). Every property "knows" its type and will enable the correct control in the "Preset Value" group.

To set all Preset values to existing values from a material assigned to a scene object, press the [>Get From Scene Object] button and pick an object with a material in the scene.



Version 0.1 Scripted Utility