Break Instance across all layers?

Please use this part to report bugs & errors, ask questions & "How to..."
Post Reply
swiftsketcher
Posts: 41
Joined: 18 Jun 2012, 03:57

Break Instance across all layers?

Post by swiftsketcher » 06 Mar 2019, 02:25

I can do this with one layer at a time, (image > instances > Break Instance) and have this set to a button. But is there a way to have this action apply to all layers at the same time?

swiftsketcher
Posts: 41
Joined: 18 Jun 2012, 03:57

Re: Break Instance across all layers?

Post by swiftsketcher » 14 Mar 2019, 08:59

Anyone? Please? This would really speed up production for work at our studio.

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

Re: Break Instance across all layers?

Post by Svengali » 14 Mar 2019, 11:52

Desktop: tvp Pro 11.0.9-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

swiftsketcher
Posts: 41
Joined: 18 Jun 2012, 03:57

Re: Break Instance across all layers?

Post by swiftsketcher » 22 Mar 2019, 19:51

Hi Sven! Thanks for this.

This is *almost* what I need, but not quite. I want to create instances across all layers that doesn't delete anything currently there, or push forward any frames. The closest button that does that in the custom panel is the "clear current frame layer". I want that same action, but instead of deleting, it just breaks the instance.

Unfortunately the Handy Custom Panel/All Layers tab doesn't have anything like this either. Any advice?

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

Re: Break Instance across all layers?

Post by Svengali » 22 Mar 2019, 21:24

I think this is what you need...
create a new action button and insert the following embedded script.

Code: Select all

tv_LayerGetImage
FrameNumber = result
ExitFlag = 0
Counter = 0	
While ExitFlag == 0
	tv_LayerGetID Counter
	LayerID = result
	// tv_warn "Counter = " Counter " LayerID = " LayerID " FrameNumber = " FrameNumber
	IF CMP(LayerID, "none")
		ExitFlag = 1
	ELSE
		tv_LayerSet LayerID
		tv_exposurebreak FrameNumber
		Counter = Counter + 1
	END
END
sven
Desktop: tvp Pro 11.0.9-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

swiftsketcher
Posts: 41
Joined: 18 Jun 2012, 03:57

Re: Break Instance across all layers?

Post by swiftsketcher » 22 Mar 2019, 22:14

Svengali wrote:
22 Mar 2019, 21:24
I think this is what you need...
create a new action button and insert the following embedded script.

Code: Select all

tv_LayerGetImage
FrameNumber = result
ExitFlag = 0
Counter = 0	
While ExitFlag == 0
	tv_LayerGetID Counter
	LayerID = result
	// tv_warn "Counter = " Counter " LayerID = " LayerID " FrameNumber = " FrameNumber
	IF CMP(LayerID, "none")
		ExitFlag = 1
	ELSE
		tv_LayerSet LayerID
		tv_exposurebreak FrameNumber
		Counter = Counter + 1
	END
END
sven
SVEN!! You're my hero, you've saved me literal hours of work. Thank you, THANK YOU!

Post Reply