#N canvas 145 368 982 643 10;
#X msg 38 219 outlets;
#X msg 71 328 outlet \$1;
#X floatatom 71 306 5 0 0 0 - - - 0;
#X floatatom 62 261 5 0 0 0 - - - 0;
#X msg 28 197 inlets;
#X msg 62 283 inlet \$1;
#X msg 108 420 inconnect \$1;
#X msg 97 380 outconnect \$1;
#X obj 28 539 print canvasconnnection;
#X floatatom 97 360 5 0 0 0 - - - 0;
#X floatatom 108 400 5 0 0 0 - - - 0;
#N canvas 720 574 450 300 subpatch 0;
#X obj 13 26 inlet;
#X obj 13 242 outlet;
#X obj 13 110 canvasobjectconnections;
#X connect 0 0 2 0;
#X connect 2 0 1 0;
#X restore 28 488 pd subpatch;
#X text 103 487 <- there is a [canvasconnections] inside;
#X text 95 206 get the number of inlets and outlets of the canvas;
#N canvas 344 318 600 344 META 0;
#X text 12 165 LICENSE GPL v2;
#X text 12 185 AUTHOR IOhannes m zmoelnig;
#X text 12 205 HELP_PATCH_AUTHORS IOhannes m zmölnig;
#X text 12 105 OUTLET_0 list;
#X text 12 145 KEYWORDS introspection;
#X text 11 65 INLET_0 inlets \, outlets \, inlet \, outlet \, outconnect \, inconnect;
#X text 12 45 DESCRIPTION query the connections of an arbitrary object in the specified (parent) canvas, f 90;
#X restore 879 40 pd META;
#X obj 29 47 canvasobjectconnections;
#N canvas 0 0 450 300 subpatchindex 0;
#X obj 51 145 r \$0-subpatch-index;
#X obj 51 191 outlet;
#X text 42 41 get the index of the [pd object] \, and set the message accordingly;
#X msg 51 168 set object \$1 \, bang;
#X connect 0 0 3 0;
#X connect 3 0 1 0;
#X restore 12 109 pd subpatchindex;
#X msg 12 144 object 20;
#X obj 603 188 cnv 15 200 140 empty empty empty 20 12 0 14 #e0e0e0 #404040 0;
#X obj 658 293 pack f f f f f;
#N canvas 720 574 450 300 object 0;
#X obj 13 26 inlet;
#X obj 64 28 inlet;
#X obj 108 27 inlet;
#X obj 159 29 inlet;
#X obj 13 242 outlet;
#X obj 72 243 outlet;
#X obj 128 243 outlet;
#X text 30 132 just a dummy with many iolets;
#X obj 273 113 canvasindex;
#X obj 273 90 loadbang;
#X obj 273 136 s \$0-subpatch-index;
#X obj 308 174 print a;
#X obj 308 197 print b;
#X msg 340 75 bang;
#X connect 8 0 10 0;
#X connect 8 0 11 0;
#X connect 8 1 12 0;
#X connect 9 0 8 0;
#X connect 13 0 8 0;
#X restore 626 243 pd object;
#X obj 697 210 unpack f f f f;
#N canvas 290 285 450 487 getallconnections 0;
#X obj 57 31 inlet;
#X msg 57 77 inlets \, outlets;
#X obj 57 140 canvasobjectconnections;
#X obj 57 163 list;
#X msg 57 186 \$2 \$1;
#X obj 57 209 unpack 0 s;
#X obj 57 232 t f b;
#X obj 57 255 until;
#X obj 57 278 i;
#X obj 57 301 t f f;
#X obj 100 292 + 1;
#X msg 97 257 0;
#X obj 145 255 t s s;
#X obj 145 278 select inlets outlets;
#X msg 145 301 inconnect;
#X msg 215 301 outconnect;
#X obj 57 324 list prepend;
#X msg 151 21 object 26;
#X obj 57 347 list trim;
#X obj 57 370 canvasobjectconnections;
#X obj 57 54 t b a a, f 33;
#X obj 57 393 outlet;
#X connect 0 0 20 0;
#X connect 1 0 2 0;
#X connect 2 0 3 0;
#X connect 3 0 4 0;
#X connect 4 0 5 0;
#X connect 5 0 6 0;
#X connect 5 1 12 0;
#X connect 6 0 7 0;
#X connect 6 1 11 0;
#X connect 7 0 8 0;
#X connect 8 0 9 0;
#X connect 9 0 16 0;
#X connect 9 1 10 0;
#X connect 10 0 8 1;
#X connect 11 0 8 1;
#X connect 12 0 13 0;
#X connect 13 0 14 0;
#X connect 13 1 15 0;
#X connect 14 0 16 1;
#X connect 15 0 16 1;
#X connect 16 0 18 0;
#X connect 17 0 20 0;
#X connect 18 0 19 0;
#X connect 19 0 21 0;
#X connect 20 0 1 0;
#X connect 20 1 2 0;
#X connect 20 2 19 0;
#X restore 645 490 pd getallconnections;
#X obj 645 513 print connections;
#N canvas 0 0 450 300 subpatchindex 0;
#X obj 51 145 r \$0-subpatch-index;
#X obj 51 191 outlet;
#X text 42 41 get the index of the [pd object] \, and set the message accordingly;
#X msg 51 168 set object \$1;
#X connect 0 0 3 0;
#X connect 3 0 1 0;
#X restore 645 422 pd subpatchindex;
#X msg 645 457 object 20;
#X msg 617 206 bang;
#X text 759 68 (c) 2022 IOhannes m zmoelnig;
#X text 183 48 query the connections of an arbitrary object in the specified (parent) canvas, f 80;
#X text 123 266 get objectIDs of all objects connected to the given inlet (prefixed with 'inlet' and the ID of the current inlet).;
#X text 138 311 get objectIDs of all objects connected to the given outlet (prefixed with 'outlet' and the ID of the current outlet).;
#X text 196 386 Those work similar \, but give all info about the given connection (in a format usable to restore the connections);
#X connect 0 0 11 0;
#X connect 1 0 11 0;
#X connect 2 0 1 0;
#X connect 3 0 5 0;
#X connect 4 0 11 0;
#X connect 5 0 11 0;
#X connect 6 0 11 0;
#X connect 7 0 11 0;
#X connect 9 0 7 0;
#X connect 10 0 6 0;
#X connect 11 0 8 0;
#X connect 16 0 17 0;
#X connect 17 0 11 0;
#X connect 20 1 19 1;
#X connect 20 2 19 3;
#X connect 21 0 20 2;
#X connect 21 2 20 2;
#X connect 22 0 23 0;
#X connect 24 0 25 0;
#X connect 25 0 22 0;
#X connect 26 0 20 0;
