Page 1 of 1
toggle different image marks
Posted: 13 Oct 2021, 09:49
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 (63.17 KiB) Viewed 8657 times
Re: toggle different image marks
Posted: 24 Oct 2021, 16:02
by schwarzgrau
Since I work a lot with image marks I'm curious how you would use this?
Re: toggle different image marks
Posted: 27 Oct 2021, 11:35
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?
Re: toggle different image marks
Posted: 28 Oct 2021, 14:47
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
Re: toggle different image marks
Posted: 28 Oct 2021, 20:17
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.
Re: toggle different image marks
Posted: 29 Oct 2021, 10:25
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
seems that it would be a good native shortcut
Re: toggle different image marks
Posted: 02 Nov 2021, 18:42
by schwarzgrau
NathanOtano wrote: ↑29 Oct 2021, 10:25
It's exactly my script above
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