Tuesday, September 20, 2011

Custom Tool Tabs

The 5.2.3 release candidate that was just published contains a nice hidden feature that I and many other users have been missing for a long time: Custom tool tabs.

So why is this a hidden feature, shouldn't this be featured quite prominently?
Looks like our friends from the lab did not have the time to code a nice user
interface for it, therefore it is currently a bit of a hidden feature.

So instead of clicking around in a GUI, you have to hunt for the tool names you want to group together and list them in a text file in the order you want them to appear. The file that controls the tool grouping and order is customToolsUI.txt in your Bibble user folder (it does not exist by default, you have to create it yourself).
In this file you define the tabs and tools for each of them. Each line consists of two tab labels (one for regular and one for small fonts) and the user interface file of a tool or the name of a plug-in.

Not as easy as drag and drop in a GUI, but miles better than having to work with the hard coded tool grouping. I have been using this feature during the beta phase of 5.2.3 and it has already been a tremendous time saver.

So how does this work in real life? The file shown below creates the tool tab layout shown next to it (the screenshot shows the version for small fonts).

Std, Std, Presets.ui
Std, Std, Advanced/Curves.ui
Std, Std, BasicTools.ui
Std, Std, Advanced/Exposure.ui
S+N, SN, Advanced/Sharpen.ui
S+N, SN, Advanced/RAWNoise.ui
S+N, SN, Advanced/NoiseNinjaRegistered.ui
S+N, SN, sph.waveletsharpen
S+N, SN, sph.waveletdenoise
S+N, SN, com.kbarni.pixie
Color, C, Advanced/WhiteBalance.ui
Color, C, ColorBalance.ui
Color, C, com.seanmpuckett.brenda
Color, C, Advanced/ColorManagement.ui
Color, C, SelectiveColor/SelectiveColorWidget.ui
Andrea, Andy, com.nexi.andrea
Andrea, Andy, sph.SiliconBonk
Andrea, Andy, sph.FatToni
Andrea, Andy, net.sadman.presettoni
Andrea, Andy, net.sadman.splittoni
Meta, Meta, Metadata.ui
Meta, Meta, Keywords.ui
Lens, Lens, Advanced/LensCorrection.ui
Lens, Lens, tin.tin.zPerspector
Post, Post, com.kbarni.vigne
Post, Post, net.sadman.typewriter
Post, Post, tin.tin.zFrame
Post, Post, tin.tin.zShadow
Post, Post, net.sadman.texa
Xtra, Xtra, Histogram.ui
Xtra, Xtra, MirrorInvert.ui

Now lets have a look at some entries to explain the concept:
Standard, Std, Presets.ui
This line instructs Bibble to put the Presets tool (identified by the Presets.ui file) into the "Standard" or "Std" tab.
Color, C, Advanced/ColorManagement.ui
Here the Color Management tool is put into the "Color" or "C" tab.
The second tab name in these specifications is the one that is used when you select small fonts in the preferences.

And finally here an example for a plug-in:
S+N, SN, sph.waveletsharpen
This puts Wavelet Sharpen which is identified by the internal plug-in identifier into the S+N tab (I like to keep sharpen and noise tools all in one tab).

So how to you know the name of the UI files that Bibble uses?
Have a look in the Bibble install directory. In there under supportfiles/tools you will find the UI files for all the tools that Bibble supports directly. You will actually find more files in there than are useful for this customization as the UI files for the popup windows (like layers and crop) are also located here. But with a bit of experimentation (or by copying the file shown in this blog post as a starting point) you should be up and running pretty quickly.

The names of the plug-ins that are to be used here can be found in the Info.bxml files in each of the plug-in directories.
So the above name for Wavelet Sharpen comes from the file Plugins/Wavelet Sharpen2.bplugin/Info.bpxml which contains the statement identifier="sph.waveletsharpen".
Andreas pointed out an easier method to find the plug-in identifiers, they are also listed in the bibbledebug.txt file in your Bibble user folder.

Bibble needs to be restarted to pick up changes in the customToolsUI.txt file. You might want to have a close look at the bibbledebug.txt file while working on the customTools.ui file. Errors will show up there.
Note, you can not list a UI file twice, so if you want to have the Curves Tool on multiple tabs, you still need to pin it. Or you could create/link UI files under a different name and then use them twice.

EDIT: There is some further discussion on UI customization in the following thread in the Bibble forums: http://support.bibblelabs.com/forums/viewtopic.php?f=62&t=19388