Page 1 of 1

How do I link brush size to the [ and ] keys instead?

Posted: 17 Jun 2017, 22:03
by ButtercupSaiyan
I'm on Windows and using TVPaint 10 Pro. I figured out the answer to my previous question so I'll just edit this. I would like a way to link brush size to the [ and ] keys. I used CTRL+K but can't seem to find the command for this sort of operation?

I have included an image of the relevant area if it helps at all.
tvpaint1.png
tvpaint1.png (22.45 KiB) Viewed 23944 times

Re: How do I link brush size to the [ and ] keys instead?

Posted: 18 Jun 2017, 10:29
by Elodie
From memory, it's increase / decrease size. You can also use "Z" .

Re: How do I link brush size to the [ and ] keys instead?

Posted: 18 Jun 2017, 18:12
by o0Ampy0o
Elodie wrote: 18 Jun 2017, 10:29 From memory, it's increase / decrease size. You can also use "Z" .
My first thought was to go to Brush and its sub-categories. I tried a custom shortcut for "Free Resize" but it did not work. I looked at the default "Z" and saw that it was accessed though the Tool Options heading instead of Brush ("Tool Options: Change Size"). "Z" works fine for me so I did not try to customize it.

What would "Brush: Free Resize" apply to?

Re: How do I link brush size to the [ and ] keys instead?

Posted: 18 Jun 2017, 21:42
by Svengali
With a little work you can make it easy to use the [ and ] shortcut keys to scale the brush up or down by 10%.

Two steps are involved.
1. You create two buttons which will use embedded scripts to scale the brush.
2. You can then assign one button to the [ shortcut key and the other to the ] shortcut key.

Step one, creating two buttons:
In the Custom Panels Menu choose New Custom Panel.
In the new custom panel, right-click on the panel name so you can rename the panel to My Panel.
Create a button by right-clicking in the Panel and choosing Add Action.
Name the action DownSizeBrush.
click on the End line and choose Embedded George Script.
Type (or cut and paste) the following 4 lines into the Script's command window:

Code: Select all

 tv_BrushRestore SIZE
 parse result dummy BrushSize
 BrushSize = BrushSize - 10
 tv_BrushRestore SIZE BrushSize
Click OK to close the Embedded George Script.
Click OK to save the new button.

Now Create another button the same way but name it UpSizeBrush.
Same as you did last time, click on the End line and choose Embedded George Script.
type exactly the same script but for line three type:
BrushSize = BrushSize + 10
Click OK to close the Embedded George Script.
Click OK to save the button.

You should now have two buttons in your new My Panel.
You can test that the buttons work by selecting a brush and clicking on either of the two buttons to shrink or enlarge the brush...

Step two, Assign the buttons to the [ key and the ] key:
Press Control + K to open the Configure Keyboard Shortcuts panel.
In the right panel window, look for My Panel and click the + next to it.
you should see two options listed:
DownSizeBrush
UpSizeBrush
(these are based on the name you assigned to the buttons in your My Panel.)
All you have to do now is Assign these to your [ key and your ] key.

Once you test the [ and ] shortcut keys out, you can permanently hide the My Panel panel.
(You can change the scripts' values of + 10 or -10, to make the shortcut key increments whatever you want.)

In the future, you might want to create other buttons (and embedded scripts) that do other operations like changing Opacity, or Angle.
In the existing My Panel panel, create new buttons and add them following the same two steps as above.

Sven

Re: How do I link brush size to the [ and ] keys instead?

Posted: 19 Jun 2017, 04:21
by Elodie
What would "Brush: Free Resize" apply to?
"Brush" category is for "custom brushes" actually, so I assume this function allows to resize custom brushes only.

A couple of years ago, "z" shortcut only worked for custom brushes. Then, it was extended to other tools.

I think you will find increase / decrease size in " tool". You can also use the search engine in that panel.

Re: How do I link brush size to the [ and ] keys instead?

Posted: 19 Jun 2017, 05:03
by Svengali
Elodie wrote: 19 Jun 2017, 04:21 I think you will find increase / decrease size in " tool". You can also use the search engine in that panel.
In the Keyboard Shortcuts the Tools Option Category is where you can find "Tools Option:Increase Size" and "Tools Option:Decrease Size".

Indeed, Increase Size and Decrease Size seem to increase and decrease all tools by 00.5% per click.

A third option is "Tools Option:Change Size" which puts the tool inside a red box that can be diagonally scaled (interactively).


The method I outlined above (that uses buttons with embedded scripts) only works for Custom Brush tools.

Sven