Is there any way to have a pwindow and a window share content and controls?

prismspecs's icon

I'd like to set up some projection mapping and ideally the user could choose to pin the corners on their screen OR on the projected output window. So you could click/drag cornerpin corners in either window and it would update the other as well

phiol's icon

Hi prismspecs

Have you had a look @ jit.gl.cornerpin ?
If that doesn't work, the right outlet of jit.window will output the mouse's coords w. click report of 0-1

print: mouse 136 180 1 0 0 0 0 0

hope this helps

phiol

prismspecs's icon

Thanks for the reply. I am currently using cornerpin, but it only works in one single window, as far as I know, and I'd like to have the option for a second window (or pwindow, in this case) to manipulate those corners with the mouse. Anything done to the corners in one window would of course also happen in the other. Jitter won't allow me to have two windows with the same name, however.

generalh's icon

Hello,
I would use 2 patches with each a jit.gl.cornerpin @mousereport 1 @hover 1 ask for getstate each time a corner (dragging=1) is used and at the dumpout outlet
select the messages concerning upper L,R lower L,R
and update the one who wasn't used. It's a bit hard logic (gate the getstate message from the other when one is used ) but should work
HTH
Hubert

prismspecs's icon

That makes sense, thank you!

generalh's icon

poum poum poum poum john lee hooker
it works on my computer...
Cheers

doublecornerpin.maxpat
Max Patch
doublecornerpin2.maxpat
Max Patch
phiol's icon
Max Patch
Copy patch and select New From Clipboard in Max.

did you mean something like this ?