MAXScript Frequently Asked Questions
I created an object and a Conform space warp. I used bindSpaceWarp to bind the object to the space warp. After doing this a dozen times, I wanted to know... "Which space warp was object A assigned to?"
You can explore the dependencies of existing space warps in the scene in order to filter the one that is affecting your object:
Script:
fn getSpaceWarpByBinding theBinding =
(
--Loop through all space warps in the scene
for s in SpaceWarps do
(
--Loop through all dependents of the current space warp
--If the space warp is dependent on the supplied binding, return it!
for o in refs.dependents s where o == theBinding do return s
)--end s loop
)--end fn
-- Example Usage:
theSW = getSpaceWarpByBinding $Sphere01.modifiers[1]
See also
MAXWrapper Common Properties, Operators, and Methods