toggle different image marks

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
Peter Wassink
Posts: 4283
Joined: 17 Feb 2006, 15:38
Location: Amsterdam
Contact:

toggle different image marks

Post by Peter Wassink »

Currently we only have a single image mark toggle.
should not every mark color have its toggle?

i would like that, because it would make a markers-custompanel much more easy to use (and make!)
imagemarks-2.png
imagemarks-2.png (63.17 KiB) Viewed 7672 times
Peter Wassink - 2D animator
• PC: Win11/64 Pro - AMD Ryzen 9 5900X 12-Core - 64Gb RAM
• laptop: Win10/64 Pro - i7-4600@2.1 GHz - 16Gb RAM
User avatar
schwarzgrau
Posts: 1238
Joined: 23 Jan 2012, 22:08
Location: Offenbach / Germany
Contact:

Re: toggle different image marks

Post by schwarzgrau »

Since I work a lot with image marks I'm curious how you would use this?
Windows 11 22H2 / TVP 11.7.0 PRO WIBU / Cintiq 22HD
Windows 11 22H2 / TVP 11.7.0 PRO WIBU / Mobile Studio Pro 16" (2019)
Android 13 / TVP 11.7.0 / Galaxy Tab 7 FE
INSTAGRAM
User avatar
Peter Wassink
Posts: 4283
Joined: 17 Feb 2006, 15:38
Location: Amsterdam
Contact:

Re: toggle different image marks

Post by Peter Wassink »

say you have a system with three marker colors that you use a lot.
It would be nice if you could toggle each type. it would save having an erase marker button

Just looking to reduce keys to press.
it would also be nice if i could create an action where i could cycle through (a selection of ) markercolors
i.e.: press once; the frame gets a red mark. press again; it becomes orange. press again; it clears the marker.

i guess this would be possible to script?
Peter Wassink - 2D animator
• PC: Win11/64 Pro - AMD Ryzen 9 5900X 12-Core - 64Gb RAM
• laptop: Win10/64 Pro - i7-4600@2.1 GHz - 16Gb RAM
User avatar
NathanOtano
Posts: 1187
Joined: 01 Apr 2014, 07:07
Location: Biarritz, France
Contact:

Re: toggle different image marks

Post by NathanOtano »

Here is a small script I created some time ago to toggle between 4 marks :) it's easy to edit and add more marks if needed, you can also change the number to use other colors

Code: Select all

tv_layergetimage
curImage =result

tv_layercurrentID
curLayer = result

tv_LayerMarkGet curLayer curImage
curMarkColor = result

IF curMarkColor == 0
	tv_LayerMarkSet curLayer curImage 1
ELSE
	IF curMarkColor == 1
		tv_LayerMarkSet curLayer curImage 7
	ELSE
		IF curMarkColor == 7
			tv_LayerMarkSet curLayer curImage 5
		ELSE
			IF curMarkColor == 5
				tv_LayerMarkSet curLayer curImage 3
			ELSE
				tv_LayerMarkSet curLayer curImage 0
			END
		END
	END
END
Working on Windows 10
Creator of Disnosc, providing storyboard, animation and design for 2D realistic pictural animation: https://www.disnosc.fr/ - nathanotano@disnosc.fr
Highly interested in animation workflows, I'm open to scripting new TVP functions for individuals and studios.
User avatar
schwarzgrau
Posts: 1238
Joined: 23 Jan 2012, 22:08
Location: Offenbach / Germany
Contact:

Re: toggle different image marks

Post by schwarzgrau »

Since I use Mark1 for keyframes, Mark2 for Breakdowns, Mark3 for the inbetween, Mark 4 for the inbetween inside the inbetweens etc. I wrote a script which sets the current frame to Mark1, if there are to Mark1s around the current Frame it sets it to Mark2 etc. and if it there is a mark it will clear it. I can share it if this sounds useful for you.
However now I understood your feature request I would support it.
Windows 11 22H2 / TVP 11.7.0 PRO WIBU / Cintiq 22HD
Windows 11 22H2 / TVP 11.7.0 PRO WIBU / Mobile Studio Pro 16" (2019)
Android 13 / TVP 11.7.0 / Galaxy Tab 7 FE
INSTAGRAM
User avatar
NathanOtano
Posts: 1187
Joined: 01 Apr 2014, 07:07
Location: Biarritz, France
Contact:

Re: toggle different image marks

Post by NathanOtano »

schwarzgrau wrote: 28 Oct 2021, 20:17 Since I use Mark1 for keyframes, Mark2 for Breakdowns, Mark3 for the inbetween, Mark 4 for the inbetween inside the inbetweens etc. I wrote a script which sets the current frame to Mark1, if there are to Mark1s around the current Frame it sets it to Mark2 etc. and if it there is a mark it will clear it. I can share it if this sounds useful for you.
However now I understood your feature request I would support it.
It's exactly my script above :D seems that it would be a good native shortcut
Working on Windows 10
Creator of Disnosc, providing storyboard, animation and design for 2D realistic pictural animation: https://www.disnosc.fr/ - nathanotano@disnosc.fr
Highly interested in animation workflows, I'm open to scripting new TVP functions for individuals and studios.
User avatar
schwarzgrau
Posts: 1238
Joined: 23 Jan 2012, 22:08
Location: Offenbach / Germany
Contact:

Re: toggle different image marks

Post by schwarzgrau »

NathanOtano wrote: 29 Oct 2021, 10:25 It's exactly my script above :D seems that it would be a good native shortcut
Haha, than I bet yours is a bit smarter than mine. However here is my script anyway and the panel, if someone finds use for it

Code: Select all

mark[0] = 0
mark[1] = 1
mark[2] = 2
mark[3] = 3
mark[4] = 4
mark[5] = 5
mark[6] = 6
mark[7] = 7
mark[8] = 8
mark[9] = 9
mark[10] = 10

color[0] = 0
color[1] = 1
color[2] = 2
color[3] = 3
color[4] = 4
color[5] = 5
color[6] = 6
color[7] = 7
color[8] = 8
color[9] = 9
color[10] = 10

//Gets current image

tv_LayerGetImage
CPos = Result 

tv_LayerMarkGet 0 CPos
CurMarkColor = result

tv_LastImage
Lpos = Result

NextMarkPos = Cpos
PrevMarkPos = CPos

//Tests each next frame until it founds an image mark

IF (Cpos != Lpos) 
	DO
		NextMarkPos = NextMarkPos +1
		tv_LayerMarkGet 0 NextMarkPos
		NextMarkColor = result
	UNTIL (NextMarkColor != 0 || NextMarkPos == Lpos) 
ELSE 
	NextMarkColor = 0
END

//Tests each previous frame until it founds an image mark

IF (Cpos != 0) 
	DO
		PrevMarkPos = PrevMarkPos -1
		tv_LayerMarkGet 0 PrevMarkPos
		PrevMarkColor = result
	UNTIL (PrevMarkColor != 0 || PrevMarkPos == 0)
ELSE 
	PrevMarkColor = 0
END

//Which color number is smaller?

NMC = mark[NextMarkColor]
PMC = mark[PrevMarkColor]

IF (NMC == 0 || PMC == 0 )
	wert = 1
ELSE
	IF (NMC < PMC)
		wert = PMC +1
	ELSE
		wert = NMC +1
	END
END

//Set color

IF (CurMarkColor == 0)
	Ccol = color[wert]
	tv_LayerMarkSet 0 Cpos Ccol
ELSE 
	tv_LayerMarkSet 0 Cpos 0
END
Attachments
AutoColorMark.tvpx
(56 KiB) Downloaded 473 times
Windows 11 22H2 / TVP 11.7.0 PRO WIBU / Cintiq 22HD
Windows 11 22H2 / TVP 11.7.0 PRO WIBU / Mobile Studio Pro 16" (2019)
Android 13 / TVP 11.7.0 / Galaxy Tab 7 FE
INSTAGRAM
Post Reply