Simple Copy or Cut Button Set

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

Simple Copy or Cut Button Set

Post by Svengali » 14 Apr 2020, 11:13

CopyOrCut.png
Two little buttons that make Copying or Cutting out a brush, simple but sophisticated.

What do they do?

The "Copy it Out" button works in two clicks:
1. first click, it provides a redish, free-hand line to draw around one or more elements on screen.
2. second click, it copies the outlined element(s) into a brush, LEAVING THE ORIGINAL ELEMENTS STILL ON SCREEN.

The "Cut it Out" button also works in two clicks:
1. first click, it provides a red, free-hand line to draw around one or more elements on screen.
2. second click, it cuts the outlined element(s) into a brush, REMOVING THE ORIGINAL ELEMENTS FROM THE SCREEN.

The strange thing about both buttons is that they perform two DIFFERENT operations, on first click, they let you define the area(s) to be cut (outlining areas), then click a second time to grab the area(s) outlined after the first click.

I think this two-stage functionality is a byproduct of the peculiar fact that any and all TVPaint Button commands are first read all the way through and loaded, THEN commands are processed, first to last. As an example, here is the listing for the "Copy it Out" button:

Code: Select all

Command: tv_SetActiveShape SELECTFREEHAND SMOOTH 0 AALIASING 0 KEEP 0 SUBPIXEL 3 OPTIMIZE 1
Key: Shape Select: Copy To CustomBrush
Key: Shape Select: Clear
First time through, the selection Command is activated allowing you to outline one or more screen areas, and since no selected areas exist yet, the following Shape Select:Copy To CustomBrush command has nothing to do, also the Shape Select: Clear has nothing to do.

Second time through, the Command to SelectFreeHand is ignored since areas have already been selected, but the follow-up Shape Select commands can now Copy To CustomBrush AND Clear.

Likewise, the "Cut it Out" button works the same way, first time through lets you SelectFreeHand, and second time through Cut To CustomBrush AND Clear.

How I use these Buttons:
I have assigned these buttons to two adjacent, Shortcut Keys, Q = Cut it Out and W = Copy it Out.
To Cut a Brush, I press Q key once so I can outline what I want to cut out of the image and put into a brush, then I press Q key again to make the cut happen.
To Copy a Brush, I press W key once so I can outline what I want to copy out of the image and put into a brush, then I press W key again to make the copy happen.

An interesting side benefit of this two part operation is that the outline can be edited to be extremely precise, and can select multiple areas to be captured into a brush. I discovered that when I draw around an area(s) to capture, of course the outlined area(s) becomes part of what will be grabbed, BUT if I right click and "edit" the existing outlines, I can SUBTRACT from what has already been selected, so the final outline can be pixel-perfect before I press the shortcut key a second time to capture the outlined area.

Normally, when you cut or copy, drawing the outline and capturing happens in one step, so you have to be very careful in drawing the outlined area, or you won't get what you want and you have to UNDO and re-cut.

Sven
You do not have the required permissions to view the files attached to this post.
Last edited by Svengali on 17 Apr 2020, 21:10, edited 3 times in total.
Desktop: tvp Pro 11.0.10-64bit, Win8.1 - 24GB ram -2TB HHD - 256GB SSD - Wacom Cintiq 16, driver 6.3.36-1
Android Tablet: release 11, Samsung Galaxy Note10.1 - 32GB internal - microSD 32GB

User avatar
D.T. Nethery
Posts: 2628
Joined: 27 Sep 2006, 19:19

Re: Simple Copy or Cut Button Set

Post by D.T. Nethery » 14 Apr 2020, 14:16

Thank you for posting this useful tool set.
MAC OS 10.12.6 , Macbook Pro Retina 15-inch, Mid 2015,
2.5 GHz Intel Core i7, 16 GB Memory , TVPaint PRO 11.0.8, 64bit -
Wacom Cintiq 21 UX - Wacom Intuos Pro 5 - driver version 6.3.20-8

Svengali
Posts: 1313
Joined: 28 Dec 2006, 10:08
Contact:

Re: Simple Copy or Cut Button Set

Post by Svengali » 14 Apr 2020, 15:19

Very welcome David.

Let me add: I meant to include that both buttons will work on MULTIPLE SELECTED FRAMES TO CAPTURE ANIMBRUSHES:
1. select the frames to be copied from.
2. press the appropriate short-cut key, then draw around the area(s) to be captured into the AnimBrush.
3. press YES in the "Cut Out an AnimBrush ?" popup up box.

result is a clean, multiframe AnimBrush from the source.

Sven
Desktop: tvp Pro 11.0.10-64bit, Win8.1 - 24GB ram -2TB HHD - 256GB SSD - Wacom Cintiq 16, driver 6.3.36-1
Android Tablet: release 11, Samsung Galaxy Note10.1 - 32GB internal - microSD 32GB

User avatar
NathanOtano
Posts: 960
Joined: 01 Apr 2014, 07:07
Location: Paris, France
Contact:

Re: Simple Copy or Cut Button Set

Post by NathanOtano » 25 Apr 2020, 12:48

I did something similar in my Smart Tools panel, if you're curious it's the "Cut B" button : http://forum.tvpaint.com/viewtopic.php? ... 7c3bcfcbea
The button activates cut brush on one click if you're on another tool (so you can copy with it), and if you have a selection instead it cuts a custom brush and deselects (you can undo to get back your cutted image and still have your brush). When you use it with a custom brush active, it pastes it in place and goes back to your drawing brush

There is some troubleshooting to do maybe but i use it all the time it's quite handy

Yours is much cleaner to execute and works really well thanks!
Storyboard, animation and design work : http://nathanotano.tumblr.com/
As I'm highly interested in animation workflows, I'm open to scripting new TVP functions for individuals and studios. Please don't hesitate to contact me!

Post Reply