Page 1 of 2
Clear all instances on a layer?
Posted: 30 Aug 2013, 20:01
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.
Re: Clear all instances on a layer?
Posted: 30 Aug 2013, 21:14
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
Re: Clear all instances on a layer?
Posted: 30 Aug 2013, 22:01
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.
Re: Clear all instances on a layer?
Posted: 30 Aug 2013, 22:09
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?
Re: Clear all instances on a layer?
Posted: 31 Aug 2013, 04:10
by Svengali
Try this one.
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
Re: Clear all instances on a layer?
Posted: 31 Aug 2013, 08:01
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!
Re: Clear all instances on a layer?
Posted: 31 Aug 2013, 10:23
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.
You are both right in that
Clear All Instances should become a built-in button command AND shortcut key option.
Sven
Re: Clear all instances on a layer?
Posted: 01 Sep 2013, 09:24
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.
Re: Clear all instances on a layer?
Posted: 01 Sep 2013, 09:35
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.
Re: Clear all instances on a layer?
Posted: 01 Sep 2013, 11:02
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
Re: Clear all instances on a layer?
Posted: 01 Sep 2013, 12:23
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
Re: Clear all instances on a layer?
Posted: 01 Sep 2013, 13:18
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.
Re: Clear all instances on a layer?
Posted: 26 Nov 2013, 21:27
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?
Re: Clear all instances on a layer?
Posted: 26 Nov 2013, 22:04
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
Re: Clear all instances on a layer?
Posted: 26 Nov 2013, 23:07
by Sewie
Oops, pardon me.
I did scan through this thread but I missed that part of your post. Thanks though!