if then

matteo's Avatar

matteo

08 Aug, 2013 08:05 PM

Hi,

I tried to create a filter (eg if x>300 then ... ) using a "compare" node but its output is just "true/false". I need a numerical output as in the example before, just the number smaller than 300. so how to achieve it?

regards,
matteo

  1. Support Staff 1 Posted by lucasnijs on 08 Aug, 2013 10:02 PM

    lucasnijs's Avatar

    Hi Matteo,

    add a multiply node afterwards. It will multiply with 1 (true) or 0 (false).
    example file added

    regards,

    Lucas

  2. 2 Posted by Matteo Moretti on 09 Aug, 2013 06:46 AM

    Matteo Moretti's Avatar

    Thank you lucas, is there any way to save the false values (i.e. if x>300 then paint in red else color i blue)
    In you example, the "false" values are transformed in zero.

    matteo

    Il giorno 09/ago/2013, alle ore 00:03, "lucasnijs" <[email blocked]> ha scritto:

  3. Support Staff 3 Posted by lucasnijs on 09 Aug, 2013 08:17 AM

    lucasnijs's Avatar

    Why did you not say so immediately? ;-)
    here is a sample that colors a rect blue (if the number is smaller then 300) and else red.
    best,
    Lucas

  4. 4 Posted by Matteo Moretti on 09 Aug, 2013 01:02 PM

    Matteo Moretti's Avatar

    :)
    thank you :)

    matteo

    Il giorno 09/ago/2013, alle ore 10:17, lucasnijs <[email blocked]> ha scritto:

  5. Frederik De Bleser closed this discussion on 15 Aug, 2013 07:23 AM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac

Recent Discussions

22 Feb, 2024 05:51 AM
22 Feb, 2024 01:11 AM
21 Feb, 2024 05:27 PM
21 Feb, 2024 04:49 PM
16 Feb, 2024 05:24 PM

 

06 Feb, 2024 04:45 AM
19 Jan, 2024 09:50 AM
13 Jan, 2024 03:47 AM
05 Jan, 2024 05:10 PM
05 Jan, 2024 04:54 PM
04 Jan, 2024 11:49 PM