Page 1 of 1

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

Posted: 11 Jun 2013, 14:51
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...

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

Posted: 11 Jun 2013, 17:20
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"

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

Posted: 11 Jun 2013, 18:38
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.

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

Posted: 11 Jun 2013, 20:00
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?

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

Posted: 11 Jun 2013, 20:42
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

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

Posted: 12 Jun 2013, 08:35
by Soom
It works!!! Thanks!

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

Posted: 12 Jun 2013, 08:44
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...