does the clamp function in MEL have an equivalent in XSI expressions?

Date : Sat, 01 Oct 2005 10:52:38 -0700
To : xsi(at)Softimage.COM
From : Adam Sale <adamsale(at)shaw.ca>
Subject : does the clamp function in MEL have an equivalent in XSI expressions?
Hey everyone.. happy 1st of October!
 
I was looking through the _expression_ docs, and was hoping to come across some equivalent _expression_ as MEL's clamp
 
where in the example clamp(0,10,objectValue)
 
the _expression_ sets 0 as min, 10 as max, and if the value is anywhere in between passes the objects normal value..
 
So far all I've found is to set nested conditions as follows:
 

cond( slider.kine.local.posy <  0, 0, cond( slider.kine.local.posy > 10, 10, slider.kine.local.posy ) )

I have no problem setting up conditions as such, but just thought that the clamp was a more elegant solution, and saves a lot of typing and visual confusion when setting up more complex interaction.

Would scripted operators be the way to go here?

Thanks for any additional insight

 

Adam


Search the XSI List archives here or use the advanced search form to search across mailing lists. Searching help is available.
This site supposedly brought to you by Benjamin Grosser and the Imaging Technology Group.