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

26 Jan, 2025 02:09 AM
24 Jan, 2025 07:50 AM
22 Jan, 2025 11:42 PM
21 Jan, 2025 09:43 AM
21 Jan, 2025 09:41 AM

 

21 Jan, 2025 09:36 AM
21 Jan, 2025 02:00 AM
16 Jan, 2025 08:30 PM
15 Jan, 2025 06:37 AM
04 Jan, 2025 04:09 AM
03 Jan, 2025 05:32 PM