I was on the way following TD tutorial from 2019, where the instructor builds a V slider with the knob snaps back right in the middle when the dragging is finished. Math CHOP is connected to the slider with the range set between -1 and 1, and speed CHOP is next to it.
The main difference between the older and the current version is that the u/v direction feature has become part of slider comp’s UI, instead of a line that had to be coded. And what has been selected in the ui is reflected in the panel execute DAT that’s inside the slider.
In the tutorial, the instructor takes only ‘select’ for the panel value and the value change is disabled. the code for the panel execute DAT follows as:
def onOnToOff(panelValue):
parent().panel.v.val = 0.5
return
But when I disable the value change in the current version of the slider the knob won’t move, and there are ‘u’ and ‘v’ already taken for the panel value. I could add ‘select’ next to them but the result shows no difference, which means the knob stays in the last position dragged by mouse click. And with the code above the knob won’t snap back in the middle.
Will anybody have any solution or suggestion for this slider comp problem?