problem with putting my own script in expression

   3355   1   2
User Avatar
Member
58 posts
Joined: July 2005
Offline
i created & tested a script, i name it : hnpoints
the content is like this:
echo `npoints(“$arg1”)`
usage : hnpoints <objname>
it works fine in texport.

in my case , i have sphere1 and curve1 under /obj/geo1
and just for fun i put this expression:
execute(“hnpoints ../curve1”)
into param box of -x radius- of my sphere1 and it doesn't work. it returned 0. it doesn't recognize the curve1.
the wierd thing was:
i run this function first in textport, then i edit the expression in param box by doing silly thing like delete the bracket and add it back. now it works. i don't know what's wrong…
it looks like when i refresh the expression, it refresh the relationship between obj, but first still i have to run the function in texport .
Does anyone know how to solve it? is it a bug?
do i have to do the ‘refreshing’ for every script that i make??

clay~
User Avatar
Member
321 posts
Joined: July 2005
Offline
clay
i created & tested a script, i name it : hnpoints
the content is like this:
echo `npoints(“$arg1”)`
usage : hnpoints <objname>
it works fine in texport.

in my case , i have sphere1 and curve1 under /obj/geo1
and just for fun i put this expression:
execute(“hnpoints ../curve1”)
into param box of -x radius- of my sphere1 and it doesn't work. it returned 0. it doesn't recognize the curve1.
the wierd thing was:
i run this function first in textport, then i edit the expression in param box by doing silly thing like delete the bracket and add it back. now it works. i don't know what's wrong…
it looks like when i refresh the expression, it refresh the relationship between obj, but first still i have to run the function in texport .
Does anyone know how to solve it? is it a bug?
do i have to do the ‘refreshing’ for every script that i make??

clay~

My guess is that the pwd of the execute() is different then where you think it is. Try putting in an “echo `oppwf()`” to
see if ../curve1 will actually point you to where curve1 really is.
– Antoine
Antoine Durr
Floq FX
antoine@floqfx.com
_________________
  • Quick Links