It says so right here.
update: Actually it says “on or after October 7”, not “on October 7”
Credit to Mr Blue for spotting this.
This video shows you how to assign a keyboard shortcut to a custom script command.
One thing I forgot to mention was the View in Browser feature: that’s a good way to search for commands and shortcuts, because it displays the complete keyboard mapping in a single html page.
The version I uploaded on screencast looks sharper.
Sticking an ICE tree on a mesh and then getting the kine.global, updating it, and setting the kine.global doesn’t really work. And I’m not sure it should. Between ICE optimizations and the way the XSI evaluation model works, I don’t think you’ll get consistent updates. SCOPs are similar, but they have that Always Evaluate flag to force evaluations.
Second attempt. I also have an ICE Tree in the Modeling region that initializes self.tmp.
Here’s how to switch from one material library to another. This script could be useful when you have a corrupted material library (eg missing render tree connections), but you have a backup copy of the material library. For example, you could export a good version of the material library from a backup copy of the scene, and then import the matlib into the current version of the scene.
// Material Library with bad render trees (missing connections) var oMatLib = Dictionary.GetObject( "Sources.Materials.DefaultLib" ); // Material Library with good render trees var oMatLib1 = Dictionary.GetObject( "Sources.Materials.DefaultLib1" ); oEnum = new Enumerator( oMatLib.Items ) ; for (;!oEnum.atEnd();oEnum.moveNext() ) { var oMat = oEnum.item() ; if ( oMat.UsedBy.Count > 0 ) { var oMat1 = oMatLib1.Items(oMat.Name); if ( oMat1 == null ) { LogMessage( "Cannot find " + oMat.Name + " in " + oMatLib1.Name ); } else { LogMessage( "Repacing " + oMat.FullName + " with " + oMat1.FullName ); // Groups var g = oMat.Owners.Filter( "#Group" ); SIAssignMaterial( g.GetAsText(), oMat1 ); // Objects SIAssignMaterial( oMat.UsedBy.GetAsText(), oMat1 ); } } }
Here’s a snippet that shows how to loop through all material libraries and materials and delete unconnected shaders:
var oMatLibs = ActiveProject.ActiveScene.MaterialLibraries; oEnum = new Enumerator( oMatLibs ) ; for (;!oEnum.atEnd();oEnum.moveNext() ) { var oMatLib = oEnum.item() ; oEnum1 = new Enumerator( oMatLib.Items ) ; for (;!oEnum1.atEnd();oEnum1.moveNext() ) { var oMat = oEnum1.item() ; DeleteUnusedShaders( oMat ); } }
The same thing but in Python.
oMatLibs = Application.ActiveProject.ActiveScene.MaterialLibraries for lib in oMatLibs: for mat in lib.Items: Application.DeleteUnusedShaders( mat )