GOP done right
Getting graph on parent patches to display correctly is a bit difficult to do on Pd (at least up to now, which is 0.38). Here's a step by step introduction on how to get beautiful results:
- use a cnv object as a background,
- Put all you want to see on top of the background cnv
- remember its dimensions as x and y.
- Set "Graph On Parent" to true.
- resize the abstraction, so that only the bg-cnv plus about 15 pixel above it are visible. The empty space above is for the abstraction name.
- save, close, File->New, put: your_gop_abs
- Right-click your_gop_abs, edit Properties: Set width to: x (from above) + 2 pixels Set height to: y (from above) + 15 pixels. Save properties.
- Right-click again and Open your your_gop_abs
- SAVE it! Yes, again! This is important, as the resizing done in the parent patch in step 7) is not saved yet in the child abstraction.
- you migtht need to fiddle a bit with the positions of graphical objects.
Doing GOP on Data Structures is a little bit different. GOP data always lives inside a subpatch (like pd paint). Lets assume we have some data inside a subpatch that looks like this:
Now you can set this to be graph on parent using the usual properties dialog:
However if you look in the main patch now, you will see, that the dimensions of the subpatch are totally messed up:
To change this, you need to edit the properties of the subpatch inside the main patch:
and set the x- and y-dimensions, so that they match the screen sizes:
Now the data structures inside the subpatches shines through the way you expect them to be.
comments
- Richie wrote:
This was a fun tutorial, and something that was confusing me for a while. Thanks.,.,