MatthiasBuehlmann
10-10-2006, 06:03 PM
Hi!
I'm using scripted controllers which depend on other properties of the object they are assigned to. So i need to reference to this object in the script.
I read in the maxscript that there is no way to get the node the controller is working on expect for this one:
refsArray = (refs.dependents this)
for i in refsArray where isvalidnode i do (mynode=i)
But this doesn't really work since refsArray may contain more than only one node where isvalidnode i is true.
If there is another way to get the node the controller is working on, PLEASE tell it to me.
Now it thought ich could assign the controller script by another script. a little user interface, where you can pick an object and then assign the scripted controller and this interfaces script automatically adds a script controller, copies the script in the script controller and adds a variable with the reference to the object the controller just got added to.
Is this possible? and if yes - how do i add the script by script to the scripted controller?
Thanks!
I'm using scripted controllers which depend on other properties of the object they are assigned to. So i need to reference to this object in the script.
I read in the maxscript that there is no way to get the node the controller is working on expect for this one:
refsArray = (refs.dependents this)
for i in refsArray where isvalidnode i do (mynode=i)
But this doesn't really work since refsArray may contain more than only one node where isvalidnode i is true.
If there is another way to get the node the controller is working on, PLEASE tell it to me.
Now it thought ich could assign the controller script by another script. a little user interface, where you can pick an object and then assign the scripted controller and this interfaces script automatically adds a script controller, copies the script in the script controller and adds a variable with the reference to the object the controller just got added to.
Is this possible? and if yes - how do i add the script by script to the scripted controller?
Thanks!
