Notifications
Clear all
[Closed] ParamWire and list controller
Jun 25, 2014 10:51 am
hi,
i try to wire weight of a list controller, but all failed
a test case :
s= Sphere()
rot_list = rotation_list()
s.rotation.controller = rot_list
chn_1 = Euler_XYZ()
chn_2 = Euler_XYZ()
rot_list[1].controller = chn_1
rot_list.available.controller = chn_2
rot_list.setName 1 "CHN1"
rot_list.setName 2 "CHN2"
-- to be sure
rot_list.weight[1].controller = bezier_float()
rot_list.weight[2].controller = bezier_float()
-- Macro recorder give me :
-- paramWire.connect $.baseObject[#Radius] $.rotation.controller[#Weight__CHN1] "100 - Radius"
try(
paramwire.connect s.baseObject[#radius] rot_list[#Weight__CHN1] "100 - Radius"
paramwire.connect s.baseObject[#radius] rot_list[#Weight__CHN2] "Radius"
)catch(
"test with label failed : Runtime error: connect requires subAnims"
)
try(
paramwire.connect s.baseObject[#radius] rot_list.weight[1].controller "100 - Radius"
paramwire.connect s.baseObject[#radius] rot_list.weight[1].controller "Radius"
)catch(
"test with controller failed : Runtime error: connect requires subAnims"
)
someone have an idea ?
thx for your help
Kermit
1 Reply
Jun 25, 2014 10:51 am
type this and see which objects are not subAnims
classof s.baseObject[#radius]
classof rot_list[#Weight__CHN1]
classof rot_list.weight[1].controller
you’ll see that rot_list[#Weight__CHN1] & rot_list.weight[1].controller are not.
the subAnims you want to target are in the array of object.rotation.controller.weights
paramwire.connect s.baseObject[#radius] rot_list.weights[#Weight__CHN1] "100 - Radius"
paramwire.connect s.baseObject[#radius] rot_list.weights[#Weight__CHN2] "Radius"
or
paramwire.connect s.baseObject[#radius] rot_list.weights[1].controller "100 - Radius"
paramwire.connect s.baseObject[#radius] rot_list.weights[1].controller "Radius"