Clear all instances on a layer?

Share your custom panels, brushes, papers... (you need to be registered to read posts in this section)
User avatar
Sewie
Posts: 1309
Joined: 18 Jun 2008, 11:57
Location: The Netherlands, Europe
Contact:

Clear all instances on a layer?

Post by Sewie »

Maybe I'm missing something but I can't find a way to clear all instances on a layer with one action or keyboard shortcut. I suppose it should be possible but does anybody know how?
So I just want the instances empty, not removed, so I'll have a layer with just empty instances with the timing I had before I emptied them.

I hope that's clear.
Michael Sewnarain - Website
Windows 11/64b Pro - TVP11.7.0 & 11.7.1 - Pro/64b - Cintiq32 Pro - Intel i7-12700K - 64Gb RAM
User avatar
Paul Fierlinger
Posts: 8100
Joined: 03 May 2008, 12:05
Location: Pennsylvania USA
Contact:

Re: Clear all instances on a layer?

Post by Paul Fierlinger »

I use the Animator Panel's/Layer/white icon with "X 2" on top. This is designed to create a duplicate of your drawing layer with empty instances, ready to color on. You might call that a one click way :roll:
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
Sewie
Posts: 1309
Joined: 18 Jun 2008, 11:57
Location: The Netherlands, Europe
Contact:

Re: Clear all instances on a layer?

Post by Sewie »

Yes, I use the same button.

But I was just wondering if there is an action, button or command that could clear the instances. Seems like it is such an obvious thing so perhaps I'm missing something.

Not an issue if there isn't, I just wanted to check.
Michael Sewnarain - Website
Windows 11/64b Pro - TVP11.7.0 & 11.7.1 - Pro/64b - Cintiq32 Pro - Intel i7-12700K - 64Gb RAM
User avatar
Paul Fierlinger
Posts: 8100
Joined: 03 May 2008, 12:05
Location: Pennsylvania USA
Contact:

Re: Clear all instances on a layer?

Post by Paul Fierlinger »

As far as I know, there is nothing else. I know that there have been several attempts made with George scripts but don't think any of them were too successful. I think the Animator Panel could use another button. If this can be done to erase the frames AND duplicate the layer, how about a halfway button: Clear all instances?
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: Clear all instances on a layer?

Post by Svengali »

Try this one. :D

By default, this button will clear all Instances in the current layer. (you DON'T have to select all frames before pressing.)

In addition, if it is discovered that only a part of the frames of the current layer are selected, then it will clear all instances in the selected area only.

If an exposure is selected as the start or end frame of the selected segment, the instance for that exposure will also be cleared.

Press Ctrl-Z to undo the deletion.

Sven
Attachments
Clear Instances Temp Panel.tvpx
(79 KiB) Downloaded 226 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: Clear all instances on a layer?

Post by Paul Fierlinger »

WOW! How long have you had this around, Sven? BTW, Ctrl-Z didn't do anything for me, but even better, my standard "End Undo: Last Action" worked like it does for everything else. Thank you so much! :mrgreen:
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: Clear all instances on a layer?

Post by Svengali »

Hi paul,

the Clear All Instances button and script was something I wrote last night after seeing how useful it might be.

In most all software, Ctrl-Z is by convention always assigned to Undo:Last Action so I suspect that your Ctrl-Z key has just been reassigned to something else or is unassigned. It sounds like the END key is what you use instead so if that works by all means use it. :D

You are both right in that Clear All Instances should become a built-in button command AND shortcut key option.

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
Sewie
Posts: 1309
Joined: 18 Jun 2008, 11:57
Location: The Netherlands, Europe
Contact:

Re: Clear all instances on a layer?

Post by Sewie »

Thanks, Sven! Very handy to have.

It is a slow process though, am I correct in this? How does it work for you Paul?
With me it knocks the processor up to 70% and takes about 5 to 10 seconds to complete. Undo works for me but is just as processor intensive. The "duplicate current layer and clear all heads button" (the one Paul mentioned earlier) is quite a lot snappier, almost instant.

Again; I'm just checking.
Michael Sewnarain - Website
Windows 11/64b Pro - TVP11.7.0 & 11.7.1 - Pro/64b - Cintiq32 Pro - Intel i7-12700K - 64Gb RAM
User avatar
Paul Fierlinger
Posts: 8100
Joined: 03 May 2008, 12:05
Location: Pennsylvania USA
Contact:

Re: Clear all instances on a layer?

Post by Paul Fierlinger »

Scripts will always be slower than hard wired features but on my computer it is not all that slow; more like just a hesitation.
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: Clear all instances on a layer?

Post by Svengali »

Hi Sewie,

Wow, that does seem slow. Help me understand. Are you on windows or mac?

What is the size of the layer (frame count) and the nature of the individual drawings for the layer you are clearing? In Preferences, what is your physical memory size? What is your Undo size? What cache usage settings do you have? Do you have lots of free space on your hard drive (100gb or more)?

What is the speed if you select only a section of the frames for a layer (like 50 or so)? Is it much faster?

I just did a test where I took a fully drawn frame (no undrawn pixels) and stretched it to 300 frames and made all of the frames instances. The clear time was about one to two seconds, likewise on the undo.

I'll experiment with the script a little to see if I can streamline it with a couple of other commands.

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

Re: Clear all instances on a layer?

Post by Svengali »

I took a look at commands in the button that paul recommended which duplicates the layer and clears all heads.

From the commands there I pulled the following two button commands that you can use to create a button to clear all heads on the current layer:

First, make a duplicate button of my Clear All Instances button (reusing the icon) and just insert the following two commands:

Code: Select all

Key:Layer:Select All Images
tv_cmd Heads tv_Clear 0
The first is a "set keystroke" command and the second is a george command that you type in.

As you can see, it first selects all frames in the current layer then finds all the Head frames and clears them. I think it's faster than my script because I loop through and clear every frame, Heads and Exposures, not just heads.

Oh, and if you want to clear selected frames only, leave the first line (Key:Layer:Select All Images) out. To clear all frames you'll have to select the entire layer manually, then press the button.

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
Sewie
Posts: 1309
Joined: 18 Jun 2008, 11:57
Location: The Netherlands, Europe
Contact:

Re: Clear all instances on a layer?

Post by Sewie »

Hi Sven,

Fantastic! That last command works very well, just about 2 to 3 seconds with a progress bar showing what the software is up to. Always puts the mind at ease ;)
Thanks man! I will place this button in my Animator Panel.
Michael Sewnarain - Website
Windows 11/64b Pro - TVP11.7.0 & 11.7.1 - Pro/64b - Cintiq32 Pro - Intel i7-12700K - 64Gb RAM
User avatar
Sewie
Posts: 1309
Joined: 18 Jun 2008, 11:57
Location: The Netherlands, Europe
Contact:

Re: Clear all instances on a layer?

Post by Sewie »

Sven, do you think this button can be expanded in a way that it clears only the heads of a selection of frames as well?
So that it leaves the heads of the layer that aren't within the selection untouched?
Michael Sewnarain - Website
Windows 11/64b Pro - TVP11.7.0 & 11.7.1 - Pro/64b - Cintiq32 Pro - Intel i7-12700K - 64Gb RAM
Svengali
Posts: 1553
Joined: 28 Dec 2006, 10:08

Re: Clear all instances on a layer?

Post by Svengali »

Sewie wrote:Sven, do you think this button can be expanded in a way that it clears only the heads of a selection of frames as well?
So that it leaves the heads of the layer that aren't within the selection untouched?
Sewie,

re-read my previous post. You can make a button which only deletes SELECTED heads by removing the first line and keep the second.
tv_cmd Heads tv_Clear 0
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
Sewie
Posts: 1309
Joined: 18 Jun 2008, 11:57
Location: The Netherlands, Europe
Contact:

Re: Clear all instances on a layer?

Post by Sewie »

Oops, pardon me.
I did scan through this thread but I missed that part of your post. Thanks though!
Michael Sewnarain - Website
Windows 11/64b Pro - TVP11.7.0 & 11.7.1 - Pro/64b - Cintiq32 Pro - Intel i7-12700K - 64Gb RAM
Post Reply