[Closed] question: get bound spacewarp from psystem?
Hi!
I wrote a script where you can select an object which then functions as the emitter of one or more automatically generated parrays(particle systems).
You can select the object and the parrays can be deleted automatically.
To all of this parrays are created and exists only ONE wind spacewarp. (the same ONE for all of them!)
How can I get the info of a spacewarp to which parray it is bound?
When I’m selecting an object in my scene I want the script to automatically delete all PArrays it functions as emitter of (this part works!) AND delete the wind spacewarp which is bound to this PArrays. This wind spacewarp only!
How can I get this information in MaxScript? I’m looking since 3 hours for the right information on this problem and can’t find it…
Thanks for all your tips and help!!!
- Chris
i didn’t found any way to get these information either, but you can try the following:
when you create the parrays and bind the spacewarp to it, you can store the name of the spacewarp in the parray with the setAppData() function. Later, when you are deleting the parray, just retrieve the name with getAppData() and getNodeByName() and delete the spacewarp.
hope this helps!
Originally posted by Chris Noeth
How can I get the info of a spacewarp to which parray it is bound?
refs.dependents <MAXWrapper_object>
will give you an array of all maxwrappers which depend on the specified maxwrapper…
to filter out objects you need to check each item in this array using isValidNode.
Here’s an example:
mySpacewarp = $Wind01
spaceWarpRefs = for o in refs.dependents mySpacewarp where isValidNode o collect o
spaceWarpRefs will contain all objects that depend on mySpacewarp.
- Martijn
Thanks magicm and (again ) Cthulhu for the fast answers and help!
This helps a lot!!! :applause:
- Chris