Login | Register 
FEATURES
APPLICATIONS
DOWNLOADS
EDUCATION
BLOG
WIKI
FORUM
STORE

Widgets - setting value range for sliders

General discussion about anything TouchDesigner

Widgets - setting value range for sliders

Postby tetkin » Sun Jan 13, 2019 7:53 pm

How do you set the min/max value range for the sliders in the new Widget system?
/gal had parameters for the range and for clamping the values, but I don't see anything equivalent in the new widgets.

Looks like you can set the norm min/max of the Value0 parameter on the widget itself, which seems to have the desired effect. But won't that get wiped out by cloning?
User avatar
tetkin
 
Posts: 363
Joined: Thu Mar 08, 2012 6:32 pm
Location: Los Angeles, CA

Re: Widgets - setting value range for sliders

Postby spaghetti » Thu Jan 17, 2019 11:20 pm

Yeah I'm also looking for this. Seems like a big one that's missed. Where are you finding this norm min/max setting?
spaghetti
 
Posts: 35
Joined: Sat Oct 08, 2016 5:28 pm

Re: Widgets - setting value range for sliders

Postby tetkin » Fri Jan 18, 2019 2:17 pm

The norm min/max are properties of the parameters, so you can edit them using the "customize component" dialog. But I'm not sure that that approach will work with cloning.
User avatar
tetkin
 
Posts: 363
Joined: Thu Mar 08, 2012 6:32 pm
Location: Los Angeles, CA

Re: Widgets - setting value range for sliders

Postby jarrett » Sat Jan 19, 2019 3:05 am

The only way currently to change widget value ranges is by using the component editor and editing the appropriate Value0 / 1/ 3/4 parameters. The upcoming advanced widgets has much nicer facilities for this.
______________________
Jarrett Smith
Derivative
User avatar
jarrett
Staff
 
Posts: 83
Joined: Tue Nov 13, 2007 1:12 am
Location: Los Angeles

Re: Widgets - setting value range for sliders

Postby JiveJive » Fri Jun 07, 2019 1:56 pm

hello,
I use for append slider widget range with a script:
normMin and normMax for set the range and min et max for clamp the value with the same range.
it works..


Code: Select all
# create a float parameter on the Base COMP node called base1
baseOp = op('base1')
newPage = baseOp.appendCustomPage('Car Controls')
newTuplet = newPage.appendFloat('Speed', label='Speed of Car', size=1)
# get the first (and only) parameter of this tuplet
p = newTuplet[0]

# define attributes of the newly created parameter

# normMin member defines the slider minimum value
p.normMin = -2

# normMax member defines the slider maximum value
p.normMax = 2

# default member defines the default value of the parameter
p.default = 0.1

# min member defines the absolute minimum value of the parameter
# clampMin member prevents lower values than set in min
p.min = -10
p.clampMin = True

# max member defines the absolute maximum value of the parameter
# clampMax member prevents higher values than set in max
p.max = 10
p.clampMax = True
JiveJive
 
Posts: 3
Joined: Fri May 25, 2018 8:38 am


Return to General TouchDesigner Discussion

Who is online

Users browsing this forum: No registered users and 15 guests