Notifications
Clear all

[Closed] Rotation script controller

Hi,

I’m having problems with this code. I have no idea why the expression “masterControl.rotation” is invalid…

delete geometry

t1 = teapot()
t1.name = "Slave"
t2 = teapot()
t2.name = "Master"
t2.pos = [0,100,0]

posCtrl = float_script()
rotCtrl = rotation_script()
t1.pos.controller.Z_Position.controller = posCtrl
t1.rotation.controller = rotCtrl
posCtrl.addTarget "MasterControl" t2[4]
rotCtrl.addTarget "MasterControl" t2[4]
posCtrl.setExpression "MasterControl.Radius"
rotCtrl.setExpression "MasterControl.rotation"

1 Reply

Omg a typo… This should be

rotCtrl.addTarget "MasterControl" t2[3]