This question does not seem suited for the nuke-dev list, but that's no reason to ignore it.
Expressions support a couple things that could help. You could use the absolute value: abs(1+ControlPanel.Contrast-Factor) or, you may want to add some logic with a ternary operation (shortand if?then:else statement): 1+ControlPanel.Contrast-Factor<0?0:1+ControlPanel.Contrast-Factor There are probably a ton of other ways to solve this problem, but it all depends on the context. cheers, jesse On Sat, Oct 6, 2012 at 7:46 PM, Synicade <[email protected]>wrote: > ** > I have some saturation values controlled by an expression, however when > they go too far they go into the negatives. > Is there an expression to stop values from going into the negatives? > > Here is the current expression, it might be confusing out of context but > it basically means Add 1 to the value given by the contrast and subtract by > the factor > > *Code:* 1+ControlPanel.Contrast-Factor > > Again, values often go into the negatives which looks awful, how do I > prevent this? > > _______________________________________________ > Nuke-dev mailing list > [email protected], http://forums.thefoundry.co.uk/ > http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-dev > >
_______________________________________________ Nuke-dev mailing list [email protected], http://forums.thefoundry.co.uk/ http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-dev
