bhnh
04-14-2008, 10:32 PM
Here's a brief script wherein a custom att of one object controls the color of a second object...
(
ca = attributes predecessor
(
parameters main rollout:params
(
pred type:#Node
clutch type:#float ui:btn_clutch default:1.0
)
rollout params "Predecessor Test"
(
button btn_clutch "Clutch Button"
on btn_clutch pressed do
(
if clutch == 1.0 then clutch = 0.0 else clutch = 1.0
)
)
)
rollout predtest "Test Pred attribute"
(
button btn_init "First Box"
button btn_next "Next Box"
local p, i=50, holder, fs
on btn_init pressed do
(
b = box()
custAttributes.add b ca
print b.clutch
p = b
)
on btn_next pressed do
(
b = box pos:[i,0,0]
custAttributes.add b ca
b.pred = p
holder = point()
holder.parent = b
fs = float_script()
holder.position.x_position.controller = fs
fs.addNode "cube" b
fs.script = "try (with animate off (if cube.clutch == 1.0
then cube.pred.wirecolor = blue else cube.pred.wirecolor = red \n 0))catch(0) "
i += 50
p = b
)
)
createDialog predtest 200 60
)
When I scrub the animation in Max the color changes happen as planned (animation in max (http://www.e-nimation.com/colorFloat_Script/colorFloat_Script.htm). But when published, either as a .mov (animation as .mov (http://www.e-nimation.com/colorFloat_Script/colorFloat_Script.mov) or an .avi (animation as .avi (http://www.e-nimation.com/colorFloat_Script/colorFloat_Script.avi), the color changes don't appear. Am I missing something fundamental here? Any input greatly appreciated.
(
ca = attributes predecessor
(
parameters main rollout:params
(
pred type:#Node
clutch type:#float ui:btn_clutch default:1.0
)
rollout params "Predecessor Test"
(
button btn_clutch "Clutch Button"
on btn_clutch pressed do
(
if clutch == 1.0 then clutch = 0.0 else clutch = 1.0
)
)
)
rollout predtest "Test Pred attribute"
(
button btn_init "First Box"
button btn_next "Next Box"
local p, i=50, holder, fs
on btn_init pressed do
(
b = box()
custAttributes.add b ca
print b.clutch
p = b
)
on btn_next pressed do
(
b = box pos:[i,0,0]
custAttributes.add b ca
b.pred = p
holder = point()
holder.parent = b
fs = float_script()
holder.position.x_position.controller = fs
fs.addNode "cube" b
fs.script = "try (with animate off (if cube.clutch == 1.0
then cube.pred.wirecolor = blue else cube.pred.wirecolor = red \n 0))catch(0) "
i += 50
p = b
)
)
createDialog predtest 200 60
)
When I scrub the animation in Max the color changes happen as planned (animation in max (http://www.e-nimation.com/colorFloat_Script/colorFloat_Script.htm). But when published, either as a .mov (animation as .mov (http://www.e-nimation.com/colorFloat_Script/colorFloat_Script.mov) or an .avi (animation as .avi (http://www.e-nimation.com/colorFloat_Script/colorFloat_Script.avi), the color changes don't appear. Am I missing something fundamental here? Any input greatly appreciated.
