Page 1 of 1

Break Instance across all layers?

Posted: 06 Mar 2019, 02:25
by swiftsketcher
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?

Re: Break Instance across all layers?

Posted: 14 Mar 2019, 08:59
by swiftsketcher
Anyone? Please? This would really speed up production for work at our studio.

Re: Break Instance across all layers?

Posted: 14 Mar 2019, 11:52
by Svengali

Re: Break Instance across all layers?

Posted: 22 Mar 2019, 19:51
by swiftsketcher
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?

Re: Break Instance across all layers?

Posted: 22 Mar 2019, 21:24
by Svengali
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

Re: Break Instance across all layers?

Posted: 22 Mar 2019, 22:14
by swiftsketcher
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!