This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
( | |
local iGlobal = (dotNetClass "Autodesk.Max.GlobalInterface").Instance | |
local boxObj = createInstance Box | |
local turboObj = TurboSmooth iterations:3 | |
local derObj = iGlobal.CreateDerivedObject (iGlobal.Animatable.GetAnimByHandle (getHandleByAnim boxObj)) | |
derObj.AddModifier (iGlobal.Animatable.GetAnimByHandle (getHandleByAnim turboObj)) undefined 0 | |
local objState = derObj.Eval currentTime.ticks 0 | |
-- just to show the result, let's create some object with the snapshot of the stack as its baseobject | |
Plane baseObject:(getAnimByHandle ((iGlobal.Animatable.GetHandleByAnim objState.Obj asDotNetObject:on).ToUInt64())) isSelected:on |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
( | |
fn collectButtons widget &buttons = | |
( | |
local children = widget.children() | |
for i = 0 to children.count - 1 do | |
( | |
if children[i].__class__.__name__ == "QPushButton" do append buttons children[i] | |
collectButtons children[i] &buttons | |
) | |
) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
( | |
local compilerParams = dotNetObject "System.CodeDom.Compiler.CompilerParameters" #( | |
getDir #maxRoot + "\bin\assemblies\Autodesk.Max.Wrappers.dll", | |
getDir #maxRoot + "Autodesk.Max.dll") | |
compilerParams.GenerateInMemory = true | |
local compilerResults = (dotNetObject "Microsoft.CSharp.CSharpCodeProvider").CompileAssemblyFromSource compilerParams #( | |
"using System; | |
using Autodesk.Max; | |
using Wrappers = Autodesk.Max.Wrappers; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
( | |
local obj = Sphere segs:64 isSelected:on | |
local dataChannel = DataChannelModifier() | |
addModifier obj dataChannel | |
local iGlobal = (dotNetClass "Autodesk.Max.GlobalInterface").Instance | |
local CURVEP_BEZIER = bit.shift 1 0 | |
local CURVEP_CORNER = bit.shift 1 1 | |
fn convertPoint pt = |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
( | |
local iGlobal = (dotNetClass "Autodesk.Max.GlobalInterface").Instance | |
local refTargID = (dotNetClass "Autodesk.Max.SClass_ID").RefTarget | |
local painterID = iGlobal.Class_ID.Create PainterInterface.classID[1] PainterInterface.classID[2] | |
local painterID_V5 = (dotNetClass "System.Enum").ToObject (dotNet.getType (dotNetClass "Autodesk.Max.InterfaceID")) (dotNetObject "System.Int32" painterID.PartB) | |
local painterRefTarg = (iGlobal.UtilGetCOREInterface.CreateInstance refTargID painterID).GetInterface painterID_V5 | |
local painterMarshaler = (dotNetClass "Autodesk.Max.Wrappers.CustomMarshalerIPainterInterface_V5").GetInstance "" | |
local painter = painterMarshaler.MarshalNativeToManaged painterRefTarg.NativePointer | |
local curve = painter.FalloffGraph |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
plugin simpleManipulator MXSQtSample | |
name:"MXSQtSample" category:"Manipulators" | |
classID:#(0x76d22fb1, 0x190d5d2d) | |
( | |
parameters main rollout:params | |
( | |
radius type:#worldUnits default:10 | |
on radius set val do if not loading and this.params.isDisplayed do | |
( | |
this.params.dial.blockSignals on --> prevent recursive calls |