vvvv-Patchbox
Author: | velcrome |
Date: | 16 Sep, 2015 |
Category: | tool |
Credits: | sagashi, beyon, rmueller, velcrome, catweasel, reaktant, sebl, sebescudie, seltzdesign |
Download
64bit
Description
This toolset gives you some additional capabilities to patch with great speed.
Yes, thats right: it improves your thought-to-patch-ratio by over 9000!
Install
Download, place somewhere on disk (e.g. the girlpower folder of your vvvv). Drag'n'Drop into your root.v4p (can be opened with Alt+R while running vvvv) and save.
Usage
There are seven things available right now:
Node Creation
Patchlet
Retrieve the contents from a patch (e.g. mainloop.v4p) and paste it at the mouse position by typing:
make mainloop
Other prefab patchlets are in the /Patchlet folder, like tty or render9 Add your own.
Operandomatic
Doubleclick somewhere and type something like
@1 (to create a GetSlice with a preset index of 1) +-1 (to create a + with a preset second operand of -1) i5 (to create an I with a running length of 5) etc.
IOBox
IOScaler
Hold down the right mouse button while resizing an IOBox to fit the font size accordingly.
While scaling or moving an IOBox you can use the mouse wheel to add rows and columns to the iobox.
IOType
While scaling or moving an IOBox (Value Advanced) you can hit i, b or f to change the Value Type (Integer, Boolean or Real aka Float)
MagicIO
Doubleclick somewhere and type something like
io4x4 (to create a four-by-four iobox matrix of values) string5 (to create a iobox list of 5 strings) enum1x3 (to create a horizontal list of 3 enums) press3x2 (to create a two-by-three iobox matrix of booleans, preconfigured to be pressed) etc.
Patch
Commander
Hold Alt+Space to hide your current patch window. Releasing the shortcut will force the window to redraw, so you can simply make any gui glitch disappear.
Use Alt+Left/Right to move your current patch window in a similar manner as you are used from other windows with the Win+Left/Right shortcuts. The code to do so is modularized, you can make your own layout just as easily.
SnapToGrid
Hold down Space while moving/resizing nodes or ioboxes to make them snap to an invisible grid.
Remarks
While the original patches of many contributors were quite diverse in their approach (plugins, regex, in-string-replacements and whatnot) I took the liberty of homogenizing them towards XElement/XPath usage and modularizing them, so they can be combined and extended more easily. I hope some of the mechanics can make VL a better GUI.
More helpers can be integrated (like project statistics, an exporter, a in-patch git prompt or whatever you come up with) to increase project productivity. Choose active Improvements as you wish, there is no harm in disabling some.
Feel free to clone and pullrequest your feature into the code.
Comments
Comments are no longer accepted.Please create a new topic in the vvvv beta forum to discuss this contribution.
Reserving first post for dev notice:
Downloaders and potential users, don't let yourself be fooled by the following thread. This contrib will continue to strive to be safe to use. Discussion will occur about details, which is in your favour because code quality will increase eventually.
To the devvvvs and listening devs:
While coding this, I found some things that are unclear to me.
How can I get the current units/pixel number? I guess this depends on windows' dpi settings. Can this be added to the ScreenInfo plugin? (Could be useful for hi-jacked drm tv screens as well)
How can I get the actual node reference for a certain open patch? In this contrib resizing and moving a patch is done on the patch definition itself, but at times it might be wiser to do it on the instanced node instead.
How can I get the fully qualified path of a selected node (i.e. 12/3/9/214)?
When is the change of SetPatch (or from the plugin interface, for that matter) incorporated? Will it do so instantly, or will it buffer it till the next buildgraph event?
nice one! it will be superuseful. I found a problem though that every comment starting with 'i' will be treated as an I node. I fixed it with changing to capital "I" and making regex and sift case sensitive also the searching pattern more strict. So currently a comment like "identification" will be converted to an I node or "+blabla" will be converted to + node. i suggest using this pattern
hey velcrome,
have a look at ioscaler, maybe you want to include it.
and here is a half working snap-nodes-to-grid. not really fun to use so far.
i also made a gui redrawer, but yours seems simpler.
cool idea to make this modular.
@microdee
i think i'll settle for
@reaktant
I added your patches after some cleanup. Selecting multiple nodes is now perfectly possible.
@velcrome
great!
makes sense to just leave the mouse node away.
OK, i have now fiddled with this stuff for a week and added almost everything that we've been missing. There are a bunch of nice modules now that might help you to make even cooler additions to the GUI.
Iirc the Patchlet Manager was an idea sketch of @Kalle waaay back, and it finally arrived to vvvv. It uses the hack from @sagashi, that a fresh comment can be interpreted as some kind of command prompt. Simply doubleclick and type:
and hit enter, Patchbox will automatically load and insert the contents of the patchlet render9.v4p
Also the possibilities to preconfigure an IOBox without Herr Inspektor are now quite compelling: font size, row- and column-count, and Value Type can be configured directly, with mouse + Alt and simple keystrokes. See help patches of IOScaler and IOType for details.
Please test.
which beta is required to run this? 34.1 is ok, on 33.7 only half works (e.g. no ioscaler) any chance to make it work on 33?
There seems to have been a change in the Zip nodes, the 34.x are much more forgiving with null-elements and nil. Anyway, I made it work in both versions. Have fun.
This modules/Patchlet needs to be included in the next beta of VVVV.
@velcrome: thanks, superuseful! Here MagicIO string and enum don't work. These 2 commands create always IO value nodes. Using b34.1x64.
confirmed. there was a link missing. bugfix is on github
@velcrome: perfect! ;)
thank you! if possible, could you please add the ability to hide a patch window by right clicking its title bar?
Nice! But guys mind it takes some CPU, of course. For example frames drop from 28 to 24, could be problem on stage. Maybe something like http://upload.martinzrcek.cz/Patchbox%20(VVVV).v4p to enable only when potentially used? and a tip: Toggle Bang Press instead of Boolean?
So Usefull this tool, Thanks guys!!!!
Yes, indeed some welcome shortcuts. Due to its runtime footprint it seems worth some optimisation. Quite some of it i'd even wish to be native.
Unfortunately, one thing makes it unusable for me: Some errors spam my TTY when i resize a node:
I tried to track it down, but it seems to be deep in XPath, right?
Yes, that's from xpath. I think there is a schema or something missing, not entirely sure. Does checking Resolve Externals help?
Really cool tool, wish I came across this earlier. Commander is nice but a bit buggy - too easy to end up with a tiny window, for example if you just tap space, thats your window gone. Or if you let go Alt before Space same thing. This should be more reliable, ie. if you have pressed down Alt and Space together it should revert if you let either of them go (problem is the AND node).
Quick fix for Hide(VVVV).v4p. Now it brings back the window even if you let go of Alt before Space or just tap Space quickly:
Also would be nice to have a S+H(Patch) node, so it doesn't resize the wrong window if you click on it while holding Alt+Space.
https://www.dropbox.com/s/dzhrbvc0mpk5y57/Hide%20%28VVVV%29.v4p?dl=0
Also in IOMagic.v4p there is a connection missing, which prevents being able to create anything other than IOBox (Value Advanced). This is the missing connection:
Looks good.
I am traveling till February, so feel free to upload a new version with your fixes.
If you want, you can also PR my GitHub repo.
Could this end up in the addonpack? I am reluctant to use it since I work on multiple installations and would like to have to do as little as possible when making a new vvvv install.
i'd be okay with that (as is the license, anyway), so you just need to convince the addonpack maintainers
thanks seltzdesign for the fix of the Hide module and the reminder to publish a current version.