I made script for facial rigging, and I used wire parrameter for connecting sliders to position axis of face nodes, but when I add more than one Position_XYZ controller to the position list, I cannot wire by the scripting the new slider to the second Position_XYZ because the second has same name, that means I have two position_XYZ controller and when I wire the second slider to the second position_XYZ by the script, then the script wire the second to the first Postion_XYZ, how can I fix this problem?
0
votes
2 Answers
0
votes
0
votes
You should reference the subcontrollers in the list controller by indexing its subanims instead of directly by names:
CLEyelidUpper.pos.controller.Available.controller = Position_XYZ()
paramWare.connect $faceCControl.modifier[#PEN_Attribute_Holder].faceCon[#EyeWideL] $ClEyelidUpper.pos.controller[1].controller[#X_Positon] "EyeWideL*0.0025"
If you want to assign to the last position_XYZ that you just added, simply use the .count
property:
$ClEyelidUpper.pos.controller[$ClEyelidUpper.pos.controller.count].controller[#X_Positon]