Notifications
Clear all
[Closed] Odd 2-way parameter wire results
Aug 18, 2016 12:29 am
I’ve got an object following a path and I want to control its percent along that path using a custom attribute. I also want the value on the CA rollout to update when the object is moved directly. So I have set up a 2-way wire as shown below. The problem is that the object can no longer be dragged normally. I’m probably missing something very obvious (which I’ve been known to do)…
(
b = box()
c = circle()
b.pos.controller = path_Constraint()
b.pos.controller.path = c
ca = attributes "ca" (
parameters params rollout:RO (
pos type:#float ui:spn_Pos
)
rollout RO "RO" (
spinner spn_Pos "" range:[0.0,360,0]
)
)
custAttributes.add b ca
paramWire.connect2way b.baseObject.ca[#pos] b.pos.controller[#percent] "Percent" "pos / 360"
)
EDIT:
Okay, I’m a derp. Just needed to change “Percent” to “Percent * 360”