After Effects
More info here
This script demonstrates how to get the guid for object scene materials which are not available to scripting. Each material inside the scene's material node has a unique id assigned to it that can be read by script. The corresponding id is found inside the meshes "Material List" node. On the node connected to the "Material List Manager". Pass this node to the plugin to get it's id and match it against the "Material Flavor Manager's" "Material ID" connector value.
Select the node connected to the Material List Manager and push the button for the script to display the id in the list view.
By the way the "Material ID" connector on the "Material Flavor Manager" is hidden and can't be seen on the node even though it can be read via script.
GetInstancedMaterialNode is really "GetMaterialShortName" - given the Material List encapsulator(or Material List Manager node or the renderable node) and an index value get the short name for the material. Material may be instanced or not.
Use GetMaterialNode to get the full path of the material with the same arguments.
The plugin package is required to use this script. Download the plugin package here.
"Material lookup table data object used for translating material indices"
Can be used when manually setting up booleans in the node editor.
Testing seems to indicate the node name is the short name of the node, not the full path
MergeMaterialLists solves the problems of: What happens when materials repeat? How handle it? Scene instanced materials kindof makes sense but no instancing?
also solves the issue of updating the material index when copying raw material nodes and hooking them up manually.
Creates the MaterialLookupTable in memory. This is the first step to working with the material lookups.
Add a node to the materia lookup in memory or just return it's index in the table
set a material index translation for the table in memory for the node from the source node material index to the destination boolean material index
save the material lookup table from memory into the Csg operation node
read material lookup table data from memory
large return numbers indicate invalid values.
when returning the count the values for source and destination index are invalid, otherwise the count is invalid with source and destination containing actual values
from the IRfMaterialListSet
merge materials together returning a translation list of indices for the second object
This command works with the Material List encapsulator node.
This command will automatically find the node when it's containing node is passed in.
This is true for the node that gets attached to the IRfMaterialListSet and the node whos materials are merged in.
IRfMaterialListSet expose some functions to scripting
list of material indices given Material List Encapsulator ? maybe also the whole object node?.
get the material node given the index and the Material List Encapsulator ? maybe also the whole object node?.
works with instanced materials
get the material short name given the index and the Material List Encapsulator or Material List Manager, maybe also the whole object node?.
set material will connect a material to the Material List Manager
delete a material but result will disconnect the last material. should work as "expected" on the last material only?
compare 2 materials to see if they produce the same appearance
not fully tested, is it appearance or conns and conn values?
testing seems to indicate that only inputs that effect the material appearance are used for the comparison
testing shows this command to be unreliable when used with scene instanced materials
Loads a material directly into the Material Editor.
RemoveUnusedMaterials will remove orphan materials from the selected node