LOOOOOL

oops.... sorry..

2011/5/5 Nathan Rusch <nathan_ru...@hotmail.com>

> Check his email address ;)
>
> -Nathan
>
> -----Original Message----- From: Stephen Newbold Sent: Thursday, May 05,
> 2011 8:54 AM To: Nuke plug-in development discussion Subject: Re: [Nuke-dev]
> Forcing knob range
> Super!  Out of interest, how did you find out about this.  Just spent
> 10mins trawling through the NDK docs and couldn't see a mention of this.
>
> Steve
>
> Wouter Klouwen wrote:
>
>> The IRange object has a third variable that indicates whether to enforce
>> it, so do:
>>   Double_knob(f, &falloff, IRange(0, 1, true), "falloff", "falloff");
>>
>> However, it will still be possibly to assign a value outside the range
>> using things like python or Tcl, so it isn't watertight.
>>
>> HTH
>>
>> On 05/05/2011 15:44, Stephen Newbold wrote:
>>
>>> Hi,
>>>
>>> Is there a way of forcing the input range when creating a knob? Say my
>>> code depends on values within a certain range and will crash otherwise,
>>> is it best to simply clamp the values manually before using the variable
>>> controlled by the knob?
>>>
>>> ie.
>>>
>>> Double_knob(f, &falloff, IRange(0, 1), "falloff", "falloff");
>>> clamp(falloff, 0, 1);
>>>
>>> This way values will stay between 0-1 regardless of what is entered by
>>> the user into the knob, but is it good practice?
>>>
>>> Cheers,
>>> Steve
>>>
>>>
>>
>>
>
> --
> Stephen Newbold
> Senior Compositor - Film
> MPC
> 127 Wardour Street
> Soho, London, W1F 0NL
> Main - + 44 (0) 20 7434 3100
> www.moving-picture.com
>
> _______________________________________________
> Nuke-dev mailing list
> Nuke-dev@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/
> http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-dev
> _______________________________________________
> Nuke-dev mailing list
> Nuke-dev@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/
> http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-dev
>



-- 
Xiaolong QIAN

Doctorant en arts et technologies / PhD. student in arts and technology
Université de Paris 8 / University Paris 8

Développeur de logiciel 3D / 3D software developer
MachineMolle, Paris
_______________________________________________
Nuke-dev mailing list
Nuke-dev@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-dev

Reply via email to