Skip to content

Instantly share code, notes, and snippets.

@EricTRocks
Last active October 3, 2016 22:07
Show Gist options
  • Save EricTRocks/4aaf277014d9e8a39865801254c9b8bd to your computer and use it in GitHub Desktop.
Save EricTRocks/4aaf277014d9e8a39865801254c9b8bd to your computer and use it in GitHub Desktop.
Create Fabric Matrix Controller in Max
import MaxPlus
import pymxs
rt = pymxs.runtime
obj = MaxPlus.Factory.CreateHelperObject(MaxPlus.ClassIds.Point)
node = MaxPlus.Factory.CreateNode(obj, 'thing')
fabMatrixCtrlClassID = MaxPlus.Class_ID(0x06a53772, 0x7c2c7c4b)
fabMatrixCtrl = MaxPlus.Factory.CreateMatrix3Controller(fabMatrixCtrlClassID)
MaxPlus.Core.EvalMAXScript('ctrl = FabricMatrixController()')
rt.ctrl.DFGAddPort("index", 0, "UInt32")
rt.ctrl.DFGSetExtDeps('"Math:*", "Kraken:*"')
node.Select()
MaxPlus.Core.EvalMAXScript('pntNode = selection[1]')
node.Deselect()
rt.pntNode.controller = rt.ctrl
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment