Dogzer
10-30-2009, 02:26 PM
I have in my scene two spheres.. Sphere01 and Sphere02
I run this code in maxscript listener:
$Sphere01.pos = $Sphere02.pos
$Sphere02.pos.x += 10
And it works. But when I run this code as new maxscript:
unregisterRedrawViewsCallback jose
fn jose =
(
$Sphere01.pos = Sphere02.pos
$Sphere02.pos.x += 10
)
registerRedrawViewsCallback jose
When the function is called i get this error message: Unknown property: "pos" in undefined
I reckon the reason sphere01 doesnt have the pos property is becasue it's somehow not defined, but it is in maxscript listener. But why is $Sphere01 undefined in a new maxscript code?
I run this code in maxscript listener:
$Sphere01.pos = $Sphere02.pos
$Sphere02.pos.x += 10
And it works. But when I run this code as new maxscript:
unregisterRedrawViewsCallback jose
fn jose =
(
$Sphere01.pos = Sphere02.pos
$Sphere02.pos.x += 10
)
registerRedrawViewsCallback jose
When the function is called i get this error message: Unknown property: "pos" in undefined
I reckon the reason sphere01 doesnt have the pos property is becasue it's somehow not defined, but it is in maxscript listener. But why is $Sphere01 undefined in a new maxscript code?
