tabtabtab v1.8
This location is for Registered Users Only.
Perhaps you need to login or register.
11.0, 10.5, 10.0, 9.0, 8.0, 7.1, 7.0, 6.3 or later
Linux, Mac, Windows
'tabtabtab', an alternative 'tab node creator thingy' for The Foundry's Nuke
It does substring matching (so 'blr' matches 'blur'), and weights your most used nodes first (so if I make the useful 'Add [math]' node often, it appears higher in the list than 'Add 3:2 pulldown')
Installation
Put tabtabtab on PYTHONPATH or NUKE_PATH somewhere (maybe in ~/.nuke/
)
mkdir -p ~/.nuke
cd ~/.nuke
curl -O https://raw.github.com/dbr/tabtabtab-nuke/master/tabtabtab.py
Then to your ~/.nuke/menu.py
add:
def ttt():
import tabtabtab
m_graph = nuke.menu('Node Graph')
m_graph.addCommand('Tabtabtab', tabtabtab.main, 'Tab')
try:
ttt()
except Exception:
import traceback
traceback.print_exc()
The original menu will still be available via 'Ctrl+Tab'. You can change the last 'Tab' argument to another shortcut if you wish.
Notes
This requires Nuke 6.3v5 or higher (for the integrated PySide module)
For older versions of 6.3, you must have a custom PyQt installation. For 6.2, see Dylan Palmboom's tabtabtabLegacy fork, which may also work in even more ancient version.
Relevant Foundry bug-id's:
[Fixed in Nuke 6.3v8] Bug #23576, 'Segmentation Fault on Nuke exit after using a custom PySide window' (causes a mostly harmless 'Segmentation fault' message on exiting Nuke)
Feature #11662 to get this functionality integrated into Nuke
In order to support Nuke 9, you need to use a different snippet in
your menu.py
, adding the tabtabtab call to the Node Graph
instead
of the Edit menu (see the updated installation instructions). The
same snippet works in older verisons of Nuke.
More elabourate description
With the default 'tab thing', you press tab, start typing a node name (like 'Blu') and you get a list of nodes that start with 'Blu' (like 'Blur'):
'tabtabtab' works very similarly, but does substring matching:
In this example, 'tra' finds 'Transform' as you'd hope, but also other nodes, such as 'Trilinear'... This is appearing because the letters 'tra' can be found in order, 'TRilineAr'.
While this seems like it might cause lots of useless results, you quickly memorise shortcuts like 'trear' which matches 'TRilinEAR' and very little else. More usefully, 'trage' will uniquely match 'TRAnsformGEo' in an easy to type way, 'rdg' matches 'ReaDGeo'
The first letter must match, so 'geo' will match 'GeoSelect', but not 'ReadGeo'. However 'rgeo' will match 'ReadGeo'
Weighting
Each time you create a node, it's 'weight' is increase - the higher the weight, the higher the node appears in the list.
This means if you create lots of 'Add [math]' nodes, it will be weighted highly, so all you might need to type is tab then 'a', and it will be at the top of the list.
The nodes weight is shown by the block to the right of the node - the more green, the higher the weighting
Matching menu location
If you start typing a shortcut, it will only match the part before the '[Filter/SubMenu]' (e.g 'blf' will not match 'Blur [Filter]')
However if you type either '[' or two spaces, you can match against the menu location (the part in '[...]')
For example, 'ax' matches 'AddMix [Merge]' and 'Axis [3D]'. If you type 'ax[3' or 'ax 3' (ax-space-space-3) it will only match 'Axis [3D]'
Change log
v1.0
- Basically working
v1.1
- Node weights are saved
v1.2
- Window appears under cursor
v1.3
- Created node remains selected between tab's, meaning 'tabtab' creates the previously node
- Clicking a node in the list creates it
- Window doesn't go offscreen if cursor is near edge
v1.4
- Blocks Nuke UI when active. This greatly improves usability when the weights are slow to load (e.g in heavy Nuke script, or slow home-dir access), as it prevents key-presses intended for tabtabtab from being handled by Nuke (possibly creating new/modifying nodes etc)
- Up/down arrow keys cycle correctly
- Indicator blocks now actually indicate node weights, instead of always being green. The blocks are also now narrower, which looks nicer
- Prevent vertical scrollbar (reduced number of shown items to 15)
- Node weights are loaded on every invokation, preventing overwriting of values with multiple Nuke instances
v1.5
- Fixes crash-on-exit for Nuke 6.3v8 (as Nuke bug #23576 is closed)
- Window now closes properly
v1.6
Code to add to
menu.py
more robust, so tabtabtab errors will never prevent Nuke from startingSearch string starting with space will disable the non-consecutive searching, so
[tab][space]scen
will create aScene
instead of a highly weightScanlineRender
Exposes menu items in
nuke.menu('Nuke')
along with the nodes. Meaning items in the 'File' menu etc are exposed, for example[tab]exit
will be the same as 'File > Exit'
v1.7
ToolSets/Delete
submenu is excluded from tabtabtab. Github issue #6Document that
Ctrl+Tab
opens the original tab menuFixed bug which caused the node list to stop updating
- Fixed bug where 'last used node' might have matched a different
node (contrived example: the restored
Blur [Filter]
search text might have matched the more highly weightedBlur2 [Filter]
)
v1.8
Installation instructions updated to support Nuke 9
Weights file no longer overwritten if it fails to load for some reason. Github issue #13
Support PySide2
Comments
however i found some bug ...
- when you hit Tab, sometimes the focus is set to the QListView and sometimes to the QLineEdit. ( might be always on the QLineEdit no ? )
- when you select an item in the QListView by a mouse click, i cannot hit Enter to create the Node.
- it might be useful to have the same behaviour than the default Nuke Tab command, when you Single click on a item in the list, the Node is created.
and the next time you press Tab, make the QLineEdit remember the last created node name, so you can hit Enter again to create the last created Node.
I hope you can fix this
thanks.
Maty.
If you rerun the first block of installation commands ("cd" and "curl"), you should get these changes (updated Nukepedia, but it takes a while to get approved)
Thanks for all the feedback!
Thanks Ben
by the way, your version 1.3 works very fine now, i think this feature will be added to the next release of Nuke
thanks for your update!
maty.
i've noticed another bug with your script
It seems that Nuke crash on application exit, when the Tabtabtab is called.
Here a simple case when this occur :
-Launch Nuke
-Hit Tab to display the Tabtabtab
-Click anywhere or hit Esc to kill the Tabtabtab
-Exit Nuke
> nuke crashed ...
note that if you don't hit Tab key to display Tabtabtab and quit Nuke, it won't crash.
here my actual configuration:
Windows 7 64bits
Nuke 6.3v5 64bits
I hope you can reproduce the bug and fix it
thanks!
maty.
ImportError: No module named sip
This is on Win7 x64. Does anyone know how to fix this?
Cheers
this script needs at least the Nuke 6.3v5 or a good compiled version of PyQt or PySide i think,
because your error is related to PyQt.
Thanks Matthieu, and thank you Ben of course.
I wanted to know if you have found a solution for my previous comment about Nuke crashing on exit
after opening the Tabtabtab ?
thanks! i want to use this tool again !
Is there any way I can get this to work with Nuke 6.2v1? I really want to try it out
Maybe you know of a way to modify the code so it works on this version of Nuke?
Thanks
Dylan: Making it work pre Nuke 6.3v5 is probably doable, but not necessarily straight forward.. nukescripts/pyQ tAppUtils.py and http://www.nukepedia.com/gizmos/python-scripts/ui/pyqt-with-non-modal-widgets/ might be of help, but I don't have a pyQt installation to test with..
Your script is really clever!
Thanks for the cool stuff!
I have just uploaded tabtabtabLegacy 1.4. I jumped the version from 1.0 to 1.4 just to keep it the same as yours. I like the changes and fixes you made. In tabtabtabLegacy .py, I have outlined the small changes I made in ###tabtabtabLeg acy### tags so that you can see what I did. They're very small changes. Maybe you could test it for Nuke 6.3 and if it works and you're happy to do it, incorporate it into your tabtabtab? In the code, it checks the version of Nuke, so maybe this will work.
Also, when you open tabtabtab on 6.3, and there's a viewer open in a seperate window, does that window disappear, then come back after the node is chosen in tabtabtab? It does that in 6.2v1 as I mentioned before, but it doesn't break anything. If you find a way to stop this happening, please let me know :-).
Thanks again, let me know how it goes.
It would be nice though if it worked like the standard Tab menu, with things like ctrl-enter to replace node, and shift-enter for node in new branch.
You can install immediately by following the installation instructions in the readme:
https://github.com/dbr/tabtabtab-nuke/#installation
> Also, when you open tabtabtab on 6.3, and there's a viewer open in a seperate window, does that window disappear, then come back after the node is chosen in tabtabtab?
I suspect this is because creating a Qt window in pre 6.3 is very close to starting a separate application - so as far as Nuke things, it is not the focused application, so hides the viewer (I think there's an option to disable that viewer behaviour?). With the integrated Qt, Nuke remains the active window, so acts normally
I'll try and incorporate the legacy stuff at some point soon (forgot to do it for this version!) - I want to shuffle things around so the tabtabtabLegacy module is a short file with just the compatibility stuff in it, rather than have it mixed in with "if LEGACY:" type things, just for pedantic-tidyne ss sake
> with things like ctrl-enter to replace node
That should work already - or at least it does for me (on OS X with 6.3v7 and v8, and if I recall right it works on Linux also).
If it doesn't work for you, I'm stuck - the code just calls the regular `nuke.createNod e("Blur")` function, and that function checks if the modifier-keys are pressed and does the appropriate node-layout. I've not seen any function/parame ter to explicitly branch a node etc (short of making the node, and manually dealing with the connections and positioning)
What OS and Nuke version are you using?
On commands not weighted it has a different behaviour.
For example:
[space][sce] --- > creates a scene
[tab][tab] --> creates ScanlineRender
Thanks
Quico.
If tabtabtab is installed then tabbing between boxes in a nodes palette does not work. i.e. bring up a transform node, cursor in the translate x box, type a number, then tab to the y box and instead of moving the cursor to that box, tabtabtab comes up.
I've sadly had to disable tabtabtab as this has been v frustrating for a long time, and I've only just figured the correlation between the 2 out. ;-(
menuBar.addCommand("Edit/Tabtabtab", tabtabtab.main, "Tab", shortcutContext =2)
Traceback (most recent call last):
File "/Users/electri cpig/.nuke/menu .py", line 40, in
menuBar.addComm and("Edit/Tabta btab", tabtabtab.main, "Tab", shortcutContext=2)
NameError: name 'menuBar' is not defined
Do you have one more step please?
So if you put this line first it should work:
menuBar = nuke.menu('Nuke')
or
nuke.menu('Nuke').addCommand("Edit/Tabtabtab", tabtabtab.main, "Tab", shortcutContext =2)
I only needed:
import tabtabtab
nuke.menu('Nuke').addCommand("Edit/Tabtabtab", tabtabtab.main, "Tab", shortcutContext =2)
In the end, and deleted all the other python listed in the install at the top of this page.
Does this 'focus' ability apply to other contexts on the Mac? I remember IRIX being far more 'focus sensitive' than OS X, almost as though some focus ability is lost from the Mac compared to IRIX/Linux, and hence inhibits the Nuke GUI somewhat?
The shortcut context has three options as per the help():
0==Window, 1=Application, 2=DAG
That's all there is to it I guess.
Soudns like you are referring to *nix' window managers being able to adjust window focus based on cursor position (with and without click), movement etc, somethign thet OSX doesn't support afaik.
Thanks, I was not aware of the extra syntax and only noticed the issue Mike was having yesterday after so long using tabtabtab. All fixed for me now.
The tabtabtab menu would not create in the correct position under the mouse, with the text entry directly under the mouse. Instead it would create the window exactly centered on the mouse pointer, so you had to sort of hunt around once the window opened.
The fix was to edit the tabtabtab.py file at lines 526 and 540, to move the *.under_cursor( ) calls one line down, below the *.show() call that follows it.
I don't pretend to have any real idea why, I just know that this fixed it for me.
I was thinking that a prefix would alert it of this case for example
@These are my roto nodes
Might create a backdrop node around the selected nodes already with the text after the @. Could use # for sticky notes and these would go to the side of selected nodes or the last clicked/selecte d area.
It got me thinking as I have a script that automatically asks for the text for the backdrop node but I often hit tab and start typing that first before I even created a backdrop! This way I get best of both worlds (once I start remembering to type the prefix first of course!)
Hope that makes sense, maybe others feel it is a good idea? Hit thumbs up if you do.
Regards and thanks for a wonderful script!
-Chris
Thanks for the script it's been great!
e.g.:
menuBar.addCommand("Edit/Tabtabtab", tabtabtab.main, "Tab", shortcutContext =2)
Cheers!
I'm running into a weird bug though. On a Mac I'm finding that every time I invoke it (whether I select a node or not) it adds menu option to the Edit menu: A separation line and a "Start Dictation..." menu item.
After just a few times the bottom of the Edit menu looks like this:
________________________
Start Dictation...
________________________
Start Dictation...
________________________
Start Dictation...
________________________
Start Dictation...
________________________
Start Dictation...
________________________
Start Dictation...
________________________
Start Dictation...
It isn't retained between launches and doesn't appear to affect anything but is a bit disconcerting.
Dan
http://https//github.com/dbr/tabtabtab-nuke/
Use the latest version from there, and follow the instructions on there. They were updated for Nuke 9 and later, which sounds like the issue you are reporting here.
would it be hard to add the ability the pattern matching so that it also finds words in the middle of a node class?
E.g. when typing "blur" currently node classes like "ExponentialBlu r" are not listed.
Also, somebody had a suggestion to also support menu names, so that when you type "color" the nodes in the color menu are shown. This might get messy but sounded interesting as an option.
What do you reckon?
I have made changes to the search results today and suggesting them to Ben, you can see my tweak here: https://github.com/dbr/tabtabtab-nuke/pull/18
It's worked fine in 10.5, but I've tried several fixes listed here to no success. I keep getting a plugin error.
http://www.nukepedia.com/prepare-for-qt5
Quote:Quote: looks like the qt5 issue as mentioned.
i wanted to try out pyqt4topyqt5 but i'm not on linux
Quote: so tabtabtab will only load for nk10.5 and when launching nk11, it's disabled.
I really don't want to remove tabtabtab from my menu.py so when i switch between different versions of nuke, i still have tabtabtab working on the qt4 versions.
here: https://github.com/dbr/tabtabtab-nuke/
Is it not included or did i do something wrong?
Otherwise I would have to add every single gizmo to my menu.py one line at a time correct?
import os
for gizmo in os.listdir('/pa th/to/folder'):
gizmo = gizmo.rsplit('. ')[0]
nuke.menu('Node s').addCommand( gizmo, 'nuke.createNod e({0})'.format( gizmo)
Violets are blue,
if someone makes this work in N11,
gets a beer from me too.
Seriously I cannot live without this and I won't settle with the new search menu.
Quote:
Changing from line 17 of the tabtabtab.py to read as follows:
Quote: Allows tabtabtab to initialise, but it is unable to update the weights. But then changing line 237:
Quote: This bodge should ensure it doesn't stop working if some QString incompatibility arises.
Not very elegant. Anyone's got better ideas? Am I the only one running into this problem?
thanks for this tool !
RSS feed for comments to this post