How to erase a grid shape?

prismspecs's icon

Couldn't find the info in documentation or forums, apologies for the simple question.

I'm trying to set up a patch where you can switch between 2 modes. Mode 1 is webcam, mode 2 is a gl shape. When I switch to webcam I would like the shape to disappear. Any ideas?

Max Patch
Copy patch and select New From Clipboard in Max.

Rob Ramirez's icon

@enable 0?

prismspecs's icon

Ah, wow. Thanks. One additional question--If I am switching between having a webcam/videoplane and a gridshape occupy the gl context, how can I disable the videoplane so there's not a flat black plane bisecting my shapes?

Max Patch
Copy patch and select New From Clipboard in Max.

Pedro Santos's icon

@enable 0 on the videoplane?
You should send enable 1 to the object you want while sending enable 0 to all the ones you don't.
Here's a useful approach using the == operator. For instance, "== 2" outputs a "1" when the input matches the argument, and a "0" when it doesn't.

Max Patch
Copy patch and select New From Clipboard in Max.

prismspecs's icon

Incredibly helpful, thank you.