Reset single output value at interaction node
Posted: 29 Aug 2012, 15:45
Hi,
I need to reset a single output value on the touch transformation node.
I am using the Scaling output (limited within 0 to 1) to resize a rectancle.
If a user stops to scale, a script changes size of the rectancle to small or enlarged (2 states).
After that I need to reset just the Scaling Value (or set it).
My workaround to this problem is to wait until the next user reaches the previous
scaling value and not till then pass value through. So the possible pinch gesture is narrowed.
Works good so far..
But I got another case: I need to use the scaling value just to upscale a rectancle.
After the user has stopped scaling the size of the rect it has to resize back to "normal" by script/expr.
There is just one fix state: "normal size/state".
So I need to reset the scaling value at the moment of "normal state"
else if scaling has reached MaxScaling no more upscaling is possible...
(example: "normal state", scaling value=2 (max=2, min=1) Scaling below "normal state/size" is not allowed!)
One possible workaround could be not to use Max/MinScaling and to subtract current ScalingValue from previous backwarded ScalingValue
from "normal state"....But then we could deal with very big floats if no one resets the complete outputs. Not the way to choose.
The available Reset resets all values, but I need to leave X,Y untouched.
Any hints?
Thanks Alex for your fast replies, I will reply to yours' in bug report tonight.
I need to reset a single output value on the touch transformation node.
I am using the Scaling output (limited within 0 to 1) to resize a rectancle.
If a user stops to scale, a script changes size of the rectancle to small or enlarged (2 states).
After that I need to reset just the Scaling Value (or set it).
My workaround to this problem is to wait until the next user reaches the previous
scaling value and not till then pass value through. So the possible pinch gesture is narrowed.
Works good so far..
But I got another case: I need to use the scaling value just to upscale a rectancle.
After the user has stopped scaling the size of the rect it has to resize back to "normal" by script/expr.
There is just one fix state: "normal size/state".
So I need to reset the scaling value at the moment of "normal state"
else if scaling has reached MaxScaling no more upscaling is possible...
(example: "normal state", scaling value=2 (max=2, min=1) Scaling below "normal state/size" is not allowed!)
One possible workaround could be not to use Max/MinScaling and to subtract current ScalingValue from previous backwarded ScalingValue
from "normal state"....But then we could deal with very big floats if no one resets the complete outputs. Not the way to choose.
The available Reset resets all values, but I need to leave X,Y untouched.
Any hints?
Thanks Alex for your fast replies, I will reply to yours' in bug report tonight.