[Solved] Shortcut for changing Smooth > None, Medium, Best

Please use this part to report bugs & errors, ask questions & "How to..."
Post Reply
User avatar
Soom
Posts: 1185
Joined: 25 Jul 2011, 16:25
Location: World
Contact:

[Solved] Shortcut for changing Smooth > None, Medium, Best

Post by Soom »

I thought this issue was addressed before, but I only found similar questions, but no solution in TVPaint...
Is there any way to set a shortcut, that will toggle between custom brush Smooth: NONE, MEDIUM and BEST modes? This is extremely annoying to have every time to go to the panel and change settings manually. In fact - there was the "Smart" AAliasing function implemented into Transform tool - why cannot it be done the same for a custom brush? I have to cut and stamp drawings more than 100 times per day, and it's never the same - sometimes I need to rotate, sometimes I don't, so every time I need to toggle between NONE and BEST manually...
Last edited by Soom on 12 Jun 2013, 08:39, edited 1 time in total.
at home: Hackintosh Intel Core i9-9900K, GPU AMD RX 6600 8GB, Cintiq 22" + Dell P2415Q 4K displays, MAC OS High Sierra / Windows 10, TVP Pro 11.7.1 + TVP Pro beta
at work: Windows 10, TVP 11.7.1 Std
https://vimeo.com/danas
User avatar
ZigOtto
Posts: 4102
Joined: 17 Feb 2006, 22:50
Location: south-Petazonia

Re: Shortcut for changing Smooth level > None, Medium, Best

Post by ZigOtto »

I think a little script could do the job (to toggle between different custombrush/AA settings),
meanwhile, you can assign one key to AA = None, and another one to AA = Best,
here are the 2 commands to assign to keys :

Code: Select all

tv_restorebrush subpixel 0 

Code: Select all

tv_restorebrush subpixel 2 
"0" for "None", ans "2" for "Best"
Svengali
Posts: 1571
Joined: 28 Dec 2006, 10:08

Re: Shortcut for changing Smooth level > None, Medium, Best

Post by Svengali »

Assume that you are using one or two hotkeys for cutting a brush and another hotkey for rotating an existing brush.

When cutting a brush you want the brush smoothing set to zero.
When rotating an existing brush you want the brush smoothing set to best.

Make two buttons in a panel named Hidden and create commands as Zig suggested.
Button named SmoothOff = tv_RestoreBrush SubPixel 0
Button named SmoothBest = tv_RestoreBrush SubPixel 2

Then, for hotkeys:
To Rotate (I use the asterisk): Hidden:SmoothBest + Brush:Rotate
To Capture, you could use several different hotkeys (actually I use a menu called with a hotkey posted elsewhere on the forum):
Hidden:SmoothOff + Brush:Cut Freehand AND Hidden:SmoothOff + Brush:Cut Rectangle

If you want to toggle between Off and Best create another hidden button called SmoothToggle and embed the following:

Code: Select all

tv_GetActiveTool
parse result ToolType d
IF CMP(ToolType, "tv_restorebrush") == 0
  tv_warn "not a cutbrush, aborting..."
  EXIT
END
tv_BrushRestore SubPixel
parse result Name State
IF State == 0
  tv_BrushRestore SubPixel 2
ELSE
  tv_BrushRestore SubPixel 0
END
Assign it to another hotkey.

Sven

Edit: In the next TVPaint release, it might be useful to add additional shortcut key options like - Brush:SmoothOFF, Brush:SmoothMed and Brush:SmoothBest to eliminate the need to make the buttons... or even have an auto-option, depending on the transformed state of the brush.
TVP Pro 11.0.10-64bit Win10 - 64GB ram -2TB HHD - 256GB SSD - Wacom Cintiq 16, driver 6.3.41-1
Android Tablet: rel. 11, Samsung Galaxy Note10.1 - 32GB with microSD 32GB
Android Tablet: rel. 11.5, Samsung Galaxy Tab S7plus - 128GB with microSD 64GB
User avatar
Soom
Posts: 1185
Joined: 25 Jul 2011, 16:25
Location: World
Contact:

Re: Shortcut for changing Smooth level > None, Medium, Best

Post by Soom »

Thanks to all the replies!
I will try tomorrow at work.
But as it looks to me, I only need the Rotate + Smooth BEST button, cause by default, whenever I pick the Cut Brush tool, it's always on NONE. But the question is - how do I assign a double action to a keyboard shortcut? I am using the default C button to rotate a brush - can I assign it so that it also involves another custom command?
at home: Hackintosh Intel Core i9-9900K, GPU AMD RX 6600 8GB, Cintiq 22" + Dell P2415Q 4K displays, MAC OS High Sierra / Windows 10, TVP Pro 11.7.1 + TVP Pro beta
at work: Windows 10, TVP 11.7.1 Std
https://vimeo.com/danas
Svengali
Posts: 1571
Joined: 28 Dec 2006, 10:08

Re: Shortcut for changing Smooth level > None, Medium, Best

Post by Svengali »

After you open the shortcut key list, select your first action and press assign, then select your second action and press Control while you click assign. And you can concatenate a third to the same key - select another action and press Control while you click assign.

Do you ever scale the cutbrush? Might be good to use BEST there too.

Although, If you are using cutbrushes as drawing tools, and you use the Tool:Brush Change Size action often, MEDIUM smoothing might be better. On some of my larger or more complex brushes, I get lag sometimes, so I default to MEDIUM smoothing on those.

By the way, order seems to matter - make your first action, smoothBEST and your concatenated brush rotate action, second.

Sven
TVP Pro 11.0.10-64bit Win10 - 64GB ram -2TB HHD - 256GB SSD - Wacom Cintiq 16, driver 6.3.41-1
Android Tablet: rel. 11, Samsung Galaxy Note10.1 - 32GB with microSD 32GB
Android Tablet: rel. 11.5, Samsung Galaxy Tab S7plus - 128GB with microSD 64GB
User avatar
Soom
Posts: 1185
Joined: 25 Jul 2011, 16:25
Location: World
Contact:

Re: Shortcut for changing Smooth level > None, Medium, Best

Post by Soom »

It works!!! Thanks!
at home: Hackintosh Intel Core i9-9900K, GPU AMD RX 6600 8GB, Cintiq 22" + Dell P2415Q 4K displays, MAC OS High Sierra / Windows 10, TVP Pro 11.7.1 + TVP Pro beta
at work: Windows 10, TVP 11.7.1 Std
https://vimeo.com/danas
User avatar
Soom
Posts: 1185
Joined: 25 Jul 2011, 16:25
Location: World
Contact:

Re: Shortcut for changing Smooth level > None, Medium, Best

Post by Soom »

Svengali wrote: Do you ever scale the cutbrush? Might be good to use BEST there too.

Although, If you are using cutbrushes as drawing tools, and you use the Tool:Brush Change Size action often, MEDIUM smoothing might be better. On some of my larger or more complex brushes, I get lag sometimes, so I default to MEDIUM smoothing on those.
Sven
Yes, I do use resize a lot too and need Best for it also. I am using cut brush only for copy/pasting, not for using it as a brush, therefore I prefer it on Best for rotation and scaling, and none for just stamping. Medium is useless in my case - not good for anything...
at home: Hackintosh Intel Core i9-9900K, GPU AMD RX 6600 8GB, Cintiq 22" + Dell P2415Q 4K displays, MAC OS High Sierra / Windows 10, TVP Pro 11.7.1 + TVP Pro beta
at work: Windows 10, TVP 11.7.1 Std
https://vimeo.com/danas
Post Reply