CutBrush Incremental Rotation

Share your custom panels, brushes, papers... (you need to be registered to read posts in this section)
Post Reply
Svengali
Posts: 1553
Joined: 28 Dec 2006, 10:08

CutBrush Incremental Rotation

Post by Svengali »

CutBrush Rotation.png
CutBrush Rotation.png (4.97 KiB) Viewed 1641 times
Here's a pair of buttons which will let you incrementally rotate your cutbrush left and right. Assign the buttons to shortcut keys.

The increment by which the cutbrush is rotated can/should be set by holding down the SHIFT key when you press one of the two buttons (the chosen incremental degree of rotation will be the same for left and right). Enter a new value which, if necessary, can be a decimal value.

REMOVED OPTION: The cumulative rotation can be reset to zero by holding down the Ctrl key when you press one of the two buttons.

Perhaps you will want to copy/move the buttons to one of your favorite panels BEFORE you assign them to shortcut keys...

SideNote One: The script sets the smoothing to zero (none) when the angle = 0, 90, 180, 270, 360, etc. For any other angle the smoothing is set to 2 (best). The rotation is always applied to the ORIGINAL cutbrush, thus no degradation.

SideNote Two: You can set a custom rotation point for the cutbrush and it will hold true through any rotation.

report any problems here. :?

Sven

EDITED (july 20th) Original version of CutBrushRotation.tvpx removed... download the improved version which is available below, in Reply # 2.
Last edited by Svengali on 20 Jul 2013, 17:29, edited 3 times in total.
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
Svengali
Posts: 1553
Joined: 28 Dec 2006, 10:08

YIPES! WARNING

Post by Svengali »

Unfortunately, somehow some of the incremental rotations of the cut brush are seen by TVPaint as a NEW BRUSH!!! :shock: :twisted: :shock:

Of course this means that another version of the brush gets added to the brush history - not good...

Would the developers have any suggestion as to how this can be avoided? Perhaps a new George Script Command which explicitly excludes a new brush from the history...

Sven :cry:
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
Svengali
Posts: 1553
Joined: 28 Dec 2006, 10:08

Re: CutBrush Incremental Rotation

Post by Svengali »

A notice to our TVPaint Programmers...

Further tests reveal that a "new brush" is created when the ANGLE value is updated for the current brush through a tv_BrushRestore command, just as assigning a new RGB value for the same brush will create a "new brush". And anytime a "new brush" is created the updated version of that brush forces another copy of itself into the brush history table.

While this may not exactly be a bug it IS a poorly considered aspect of the brush history table feature. SECONDARY changes in the characteristics of the current brush (like angle and color and probably other attributes too) really should NOT trigger a NEW ENTRY in the brush history table.

Two possible ways that might resolve the problem.

1. Changes in a brush's color or in angle (orientation) or other SECONDARY changes should be ignored by the brush history table update routine... OR perhaps a simple update to the attributes of the existing entry in the brush history table would suppress gratuitous extra copies.

2. Or, in the case of scripting, a new pair of commands might be included which would (like the undo stack commands) temporarily suspend updates to the brush history table. Example: tv_BrushHistory OFF and tv_BrushHistory ON or something similar.

sven

EDITED (july 20th): I've updated the rotateleft and rotateright scripts and append the improved "CutBrushRotation.tvpx" here. The scripts no longer include the "Ctrl" option for re=orientating the brush to zero. Instead, you simple reset the brush's ANGLE value in the attributes. I also added a filter which keeps the angle of rotation between -360 and +360 for easy reading.

So, if you want to test the CutBrushRotation scripts, download this version of CutBrushRotation.tvpx instead.
Attachments
CutBrushRotation.tvpx
(149 KiB) Downloaded 198 times
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
Paul Fierlinger
Posts: 8100
Joined: 03 May 2008, 12:05
Location: Pennsylvania USA
Contact:

Re: CutBrush Incremental Rotation

Post by Paul Fierlinger »

Hi Sven, this is very simple and therefore very nice. The only thing that I don't get is how you set/change the attributes to set new increments values..
Paul
http://www.slocumfilm.com
Desktop PC Win10-Pro -64 bit OS; 32.0 GB RAM
Processor: i7-2600 CPU@3.40GHz
AMD FirePro V7900; Intuos4 Wacom tablet
Svengali
Posts: 1553
Joined: 28 Dec 2006, 10:08

Re: CutBrush Incremental Rotation

Post by Svengali »

Hi Paul,

Thank you.

Two ways to change the incremental interval:
1. Hold down Shift while you click on either button. A popup lets you set the new interval.
2. Hold down Shift while you press either of the assigned shortcut keys. The same popup lets you set the new interval.

As I said in previous posts, you can reset the rotate value for the cutbrush to any starting angle (like zero for instance), then press the buttons or shortcut keys for precise rotation.

You can also move the center of rotation to any custom location and all future rotation will take place around that point.

Until I get some recommendation from TVP developers on how to bypass or fix the problem with using these scripts, the brush history table will quickly fill with copies of your cutbrush or cutbrushes.

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
Paul Fierlinger
Posts: 8100
Joined: 03 May 2008, 12:05
Location: Pennsylvania USA
Contact:

Re: CutBrush Incremental Rotation

Post by Paul Fierlinger »

Oh I see now... I hadn't been following the discussion closely enough to pick that up. I use this technique very sporadically, preferring simply to draw things over and over again, but there are times, such as when text is involved when your script will come in handy. As always, thanks for your trouble and generosity.
Paul
http://www.slocumfilm.com
Desktop PC Win10-Pro -64 bit OS; 32.0 GB RAM
Processor: i7-2600 CPU@3.40GHz
AMD FirePro V7900; Intuos4 Wacom tablet
User avatar
Lukas
Posts: 523
Joined: 14 Jan 2011, 11:15
Contact:

Re: CutBrush Incremental Rotation

Post by Lukas »

I love this! Thanks for sharing.

Could you also make it that Cmd also resets the brush (like Ctrl)?

Also when resetting the angle back to 0, it doesn't set brush smoothing to None, you might want to add that. :)
  • Club Baboo
  • TVPaint Pro 11.7.3
  • MacBook Pro 2018 macOS Ventura 13.4.1 + PC Windows 10
  • Wacom Cintiq 27QHD + Wacom Intuos4
Naveed123
Posts: 1
Joined: 22 Aug 2013, 04:49

Re: CutBrush Incremental Rotation

Post by Naveed123 »

the same for left and right). Enter a new value which, if necessary, can be a decimal value.
Post Reply