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
| ( | |
| Box length:10 width:5 height:1 isSelected:on | |
| local iGlobal = (dotNetClass "Autodesk.Max.GlobalInterface").Instance | |
| local pblock = (getClassInstances ParamBlock2ParamBlock2 target:$.baseObject)[1] | |
| local pblockNET = iGlobal.Animatable.GetAnimByHandle (getHandleByAnim pblock) | |
| pblockNET.ResetAll true true | |
| notifyDependents pblock | |
| ) |
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
| fn selectNormalsBorderEdges obj includeOpenEdges:on = if isKindOf obj Editable_mesh do | |
| ( | |
| local iGlobal = (dotNetClass "Autodesk.Max.GlobalInterface").Instance | |
| local mesh = (iGlobal.TriObject.Marshal (refs.getAddr obj.baseObject)).Mesh_ | |
| local edgeList = try iGlobal.AdjEdgeList.Create mesh off catch iGlobal.AdjEdgeList.Create mesh | |
| local borderEdges = #{}; borderEdges.count = 3 * mesh.NumFaces | |
| local faceVerts = meshOp.getFaces obj #all | |
| local normals = mesh.SpecifiedNormals | |
| local numEdges = edgeList.Edges.Count | |
| local edges = edgeList.Edges.Item |
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 |