INVISIBLE LAYERS in one COLOR GROUP

This section is dedicated to the feature & improvement requests (be sure what you are asking does not exist yet in TVPaint Animation ;) )
Post Reply
User avatar
Animationriver
Posts: 230
Joined: 02 Jul 2017, 09:04
Location: Moscow
Contact:

INVISIBLE LAYERS in one COLOR GROUP

Post by Animationriver » 06 Apr 2021, 09:59

Hello.
I have a humble proposal.
If there is a possibility in the new version of the program. Lay in the layers menu. Select item: ALL INVISIBLE LAYERS IN ONE COLOR GROUP. And, perhaps. ALL INVISIBLE LAYERS IN THE WHOLE PROJECT IN ONE COLOR GROUP.
Because when I make a project easier, I often look for such an opportunity, I would be very happy. Thanks. :D
www.youtube.com/c/animationriver
MAC OS 10.12.6-64 bits , MacBook Pro (Retina, 15-inch, Mid 2014)
2.8 GHz Intel Core i7, 16 GB Memory , TVPaint PRO 11.5.0, 64bit
NVIDIA GeForce GT 750M 2048 Мb
Wacom Cintiq 27 QHD Touch - Wacom Intuos Pro 5 - driver version 6.3.29-6[/b]

User avatar
Xavier
Site Admin
Posts: 898
Joined: 01 Oct 2019, 11:08

Re: INVISIBLE LAYERS in one COLOR GROUP

Post by Xavier » 24 May 2021, 11:13

Hi, could you please explain what these menus entries should do exactly ? I'm not sure to fully understand what you mean.
Short but strong

User avatar
Animationriver
Posts: 230
Joined: 02 Jul 2017, 09:04
Location: Moscow
Contact:

Re: INVISIBLE LAYERS in one COLOR GROUP

Post by Animationriver » 09 Jun 2021, 15:32

Hello. Thank you for responding. I want to clean all the invisible layers from the project. Often they are never needed again. And when I save the storyboard project. A lot of information in the INVISIBLE (DISABLED) layers creates a heavy file. And loads the work. The file can be 40MB in size. But it weighs 100 mb. If I can combine all the invisible layers with one group color, I will be very happy. If I delete all the invisible layers with one button I will be very happy. Thank you.
Look in video. Thank you.
Attachments
DELITE INVISIBLE LAYERS.mp4
(20.4 MiB) Downloaded 46 times
DELITE ALL INVISIBLE LAYERS IN ALL PROJECT.mp4
(13.45 MiB) Downloaded 44 times
www.youtube.com/c/animationriver
MAC OS 10.12.6-64 bits , MacBook Pro (Retina, 15-inch, Mid 2014)
2.8 GHz Intel Core i7, 16 GB Memory , TVPaint PRO 11.5.0, 64bit
NVIDIA GeForce GT 750M 2048 Мb
Wacom Cintiq 27 QHD Touch - Wacom Intuos Pro 5 - driver version 6.3.29-6[/b]

User avatar
Peter Wassink
Posts: 3826
Joined: 17 Feb 2006, 15:38
Location: Amsterdam
Contact:

Re: INVISIBLE LAYERS in one COLOR GROUP

Post by Peter Wassink » 09 Jun 2021, 16:23

i think it could be achieved by adding two new layer selection options.
We now have:
-select All
-select Group
-select Layer


If we Add:
-select Active (layers)
-invert (layer) Selection


you can select all the active/inactive layers and the assign them a group or delete them...
Peter Wassink - 2D animator
• PC: Win10/64 Home - Xeon Quadcore E5410@2.33Ghz - 12Gb RAM
• laptop: Win10/64 Pro - i7-4600@2.1 GHz - 16Gb RAM

User avatar
Animationriver
Posts: 230
Joined: 02 Jul 2017, 09:04
Location: Moscow
Contact:

Re: INVISIBLE LAYERS in one COLOR GROUP

Post by Animationriver » 11 Jun 2021, 14:51

Peter Wassink wrote:
09 Jun 2021, 16:23
i think it could be achieved by adding two new layer selection options.
We now have:
-select All
-select Group
-select Layer


If we Add:
-select Active (layers)
-invert (layer) Selection


you can select all the active/inactive layers and the assign them a group or delete them...
 Hello. Maybe. But you need a button to delete all inactive layers in the entire project. This will make cleaning work easy. :D
www.youtube.com/c/animationriver
MAC OS 10.12.6-64 bits , MacBook Pro (Retina, 15-inch, Mid 2014)
2.8 GHz Intel Core i7, 16 GB Memory , TVPaint PRO 11.5.0, 64bit
NVIDIA GeForce GT 750M 2048 Мb
Wacom Cintiq 27 QHD Touch - Wacom Intuos Pro 5 - driver version 6.3.29-6[/b]

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

Re: INVISIBLE LAYERS in one COLOR GROUP

Post by Svengali » 11 Jun 2021, 15:51

Here's a short script that might do what you want (but it removes ALL hidden layers, no matter what their COLOR GROUP) :?

1. It loops through all the layers creating a list of all inactive layers.
2. Once all inactive layers are found, it will loop through all those layers...
3. Layer by layer, it will display the message "Layer named (name of layer) will be deleted ..."
4. You simply click OK, then that layer is deleted.
5. The original current layer is re-selected and the script is done.
6. Once done, if necessary, ALL the deleted layers can be resurrected in one UNDO operation.

TO USE: Make a new button, then copy the script below and EMBED it in the Embedded GEORGE Script button action, save the button and assign an ICON to the new button.

Code: Select all

Param none
ScriptName = "DeleteHidden"

tv_LayerCurrentID
OriginalLayerID = result

ExitFlag = 0
Counter = 0
SelectedLayerCounter = -1

tv_UndoOpenStack

While ExitFlag == 0
	tv_LayerGetID Counter
	LayerID = result
	IF CMP(LayerID, "none")
		Total = Counter - 1
		ExitFlag = 1
		tv_LayerSet OriginalLayerID
	ELSE
		tv_LayerInfo LayerID
		parse result LDisplay LPosition LOpacity LName LType LStart LEnd LPre_LT LPost_LT LSelection LEditable LStencilState
		IF CMP(LDisplay,"OFF")
			SelectedLayerCounter = SelectedLayerCounter + 1
			LayerInfo(SelectedLayerCounter) = LayerID
			LayerName(SelectedLayerCounter) = LName
		END
	END
	Counter = Counter + 1
END

IF SelectedLayerCounter > -1		
	FOR i = 0 to SelectedLayerCounter
		LayerID =  LayerInfo(i)

		tv_warn "Layer named " LayerName(i) " will be deleted..."

		tv_LayerKill LayerID
	END
END

tv_LayerSet OriginalLayerID
tv_UndoCloseStack

This is a modification of the script that was posted a few days ago for Peter (that executes the same FX operation on all layers)... its really a simple script that could be adapted to other layer processes as well.

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: rel. 11, Samsung Galaxy Note10.1 - 32GB internal - microSD 32GB
Android Tablet: rel. 11.5, Samsung Galaxy Tab S7plus - 128GB internal - no microSD yet

User avatar
Animationriver
Posts: 230
Joined: 02 Jul 2017, 09:04
Location: Moscow
Contact:

Re: INVISIBLE LAYERS in one COLOR GROUP

Post by Animationriver » 13 Jun 2021, 19:13

Svengali wrote:
11 Jun 2021, 15:51
Here's a short script that might do what you want (but it removes ALL hidden layers, no matter what their COLOR GROUP) :?

1. It loops through all the layers creating a list of all inactive layers.
2. Once all inactive layers are found, it will loop through all those layers...
3. Layer by layer, it will display the message "Layer named (name of layer) will be deleted ..."
4. You simply click OK, then that layer is deleted.
5. The original current layer is re-selected and the script is done.
6. Once done, if necessary, ALL the deleted layers can be resurrected in one UNDO operation.

TO USE: Make a new button, then copy the script below and EMBED it in the Embedded GEORGE Script button action, save the button and assign an ICON to the new button.

Code: Select all

Param none
ScriptName = "DeleteHidden"

tv_LayerCurrentID
OriginalLayerID = result

ExitFlag = 0
Counter = 0
SelectedLayerCounter = -1

tv_UndoOpenStack

While ExitFlag == 0
	tv_LayerGetID Counter
	LayerID = result
	IF CMP(LayerID, "none")
		Total = Counter - 1
		ExitFlag = 1
		tv_LayerSet OriginalLayerID
	ELSE
		tv_LayerInfo LayerID
		parse result LDisplay LPosition LOpacity LName LType LStart LEnd LPre_LT LPost_LT LSelection LEditable LStencilState
		IF CMP(LDisplay,"OFF")
			SelectedLayerCounter = SelectedLayerCounter + 1
			LayerInfo(SelectedLayerCounter) = LayerID
			LayerName(SelectedLayerCounter) = LName
		END
	END
	Counter = Counter + 1
END

IF SelectedLayerCounter > -1		
	FOR i = 0 to SelectedLayerCounter
		LayerID =  LayerInfo(i)

		tv_warn "Layer named " LayerName(i) " will be deleted..."

		tv_LayerKill LayerID
	END
END

tv_LayerSet OriginalLayerID
tv_UndoCloseStack

This is a modification of the script that was posted a few days ago for Peter (that executes the same FX operation on all layers)... its really a simple script that could be adapted to other layer processes as well.

sven
OK. Thank you SVEN!
The button works for 1 clip. Then for the 2nd clip. So....
Can you do this for the whole project at once? Please.
www.youtube.com/c/animationriver
MAC OS 10.12.6-64 bits , MacBook Pro (Retina, 15-inch, Mid 2014)
2.8 GHz Intel Core i7, 16 GB Memory , TVPaint PRO 11.5.0, 64bit
NVIDIA GeForce GT 750M 2048 Мb
Wacom Cintiq 27 QHD Touch - Wacom Intuos Pro 5 - driver version 6.3.29-6[/b]

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

Re: INVISIBLE LAYERS in one COLOR GROUP

Post by Svengali » 14 Jun 2021, 17:43

I updated the script a little and made it to work automatically for all clips. Here is the button/script.
.
Delete Inactive Layers in All Clips.png
Delete Inactive Layers in All Clips.png (12.89 KiB) Viewed 141 times
To use:
1.Preparation: In all clips, make layers you want to delete inactive.
2. Press button to start.
3. beginning with clip 1, each will be searched for inactive layers which will be removed.
4. message confirming that the clip was processed, the clip's position in the clip list, the total number of layers in clip and number of layers that were removed.
5. Each time you press OK, the next clip will be processed... etc.
6. In a case where ALL layers in the current clip have been removed, you will be warned, and a temporary, one-frame layer for that clip will be created - no clip in itself is ever removed.
7. A single UNDO will restore all clips and layers.
8. FIRST, TEST BEFORE USING ON PROJECTS = RUN ON COPY OF PROJECT OR TEST PROJECT TO BE SAFE.

sven
Attachments
DeleteInactiveLayersinAllClips.tvpx
(97.5 KiB) Downloaded 1 time
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: rel. 11, Samsung Galaxy Note10.1 - 32GB internal - microSD 32GB
Android Tablet: rel. 11.5, Samsung Galaxy Tab S7plus - 128GB internal - no microSD yet

Post Reply