Page 1 of 1

Can you assign line smoothing to a brush in a custom panel?

Posted: 18 May 2017, 20:28
by BruceM
With regards to creating custom panels, can you assign a particular line smoothing value to a brush that would be saved within that custom panel? I'm attempting to create a custom panel for a pen that I can click on that will already have a value of line smoothing assigned to it, however the line smoothing setting doesn't seem to program in as part of that brush.
Is this something that you can't do in TVP?

Re: Can you assign line smoothing to a brush in a custom panel?

Posted: 19 May 2017, 04:56
by Svengali
to guarantee the linesmoothing you want, insert the following line in each button defining a brush or tool:
Select Type Script's Command after the Tool line and type the following GEORGE command and parameters...

tv_DrawSmoothing 1 1 10 1 PullString

tv_drawsmoothing activate[0|1] realtime[0|1] value(pixeloffset) HUD [0|1] [PulledString|Average] (mode)

first number either 0 or 1 turns drawsmoothing off or on
second number either 0 or 1 turns realtime off or on
third number = length in pixels of the tow-line which offsets the cursor and the line being drawn
fourth number either 0 or 1 turn the tow-line visibility off or on
last parameter = PulledString or Average, (a word) which either leaves line as drawn or redraws the line after drawn to look smoother

Any button tool that doesn't have this George command line appended following the Tool define line will inherit the existing smoothing settings.

Sven

Re: Can you assign line smoothing to a brush in a custom panel?

Posted: 19 May 2017, 14:47
by BruceM
Thanks Svengali!
One additional question-- I've never done coding of any kind, so this will probably sound like a stupid question, but do I copy the 2 lines verbatim, including the words inside the parentheses:

"tv_DrawSmoothing 1 1 10 1 PullString
tv_drawsmoothing activate[0|1] realtime[0|1] value(pixeloffset) HUD [0|1] [PulledString|Average] (mode)"

Thanks!

-Bruce

Re: Can you assign line smoothing to a brush in a custom panel?

Posted: 19 May 2017, 15:19
by Svengali
BruceM wrote: 19 May 2017, 14:47 One additional question-- I've never done coding of any kind, so this will probably sound like a stupid question, but do I copy the 2 lines verbatim, including the words inside the parentheses:

tv_DrawSmoothing 1 1 10 1 PullString
tv_drawsmoothing activate[0|1] realtime[0|1] value(pixeloffset) HUD [0|1] [PulledString|Average] (mode)"
Only the first line needs to be cut and pasted into your brush button list.

The second line explains the first line order and options for the required parameters. For instance [0|1] means choose either 0 (for off) or 1 (for on).

If you want the tow-rope drag distance between line and cursor to be longer, increase the 10 parameter to 15 or 20, if you want the "tow-rope" hidden, set the HUD 1 (between 10 and PullString) to zero.

You can experiment by creating several copies of your original brush button and in each copy combine different parameter values to see how the smoothing of the brush-line changes.




Sven

Re: Can you assign line smoothing to a brush in a custom panel?

Posted: 19 May 2017, 15:33
by BruceM
Thanks so much, Svengali!
I'll give it a go!