Created
April 27, 2022 17:06
-
-
Save Swordslayer/9e65eb35b5928ee27cf932937c9227ac to your computer and use it in GitHub Desktop.
How to to object instance without creating a scene node.
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 | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment