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

Date : Sun, 2 Oct 2005 02:04:10 -0400
To : XSI(at)Softimage.COM
From : Vince Fortin <vfortin(at)gmail.com>
Subject : Re: does the clamp function in MEL have an equivalent in XSI expressions?
Adam, FYI:
 
The only equivalents I know of are the Clamp and ClampInPlace methods but they are for vectors. Nothing for scalars AFAIK.
 
Expressions may be quick to set in place but their syntax and connection with the environment are a bit outdated if you ask me...
 
Vincent
 
On 10/1/05, Adam Sale <adamsale(at)shaw.ca> wrote:
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.