Skip to main content
The_Kitty
Inspiring
October 12, 2022
Answered

Changer at marker

  • October 12, 2022
  • 1 reply
  • 346 views

Hi
Opacity value to be 100 when the time is equal to the time of the marker
I want it to show 3 frames instead of just 1 frame
Can someone help me fix the expression? Thank

var nMarker=thisLayer.marker;
var timeMarkers=nMarker.nearestKey(time).time;
if(timeMarkers==time){
	100
}
else{
	0
}

This topic has been closed for replies.
Correct answer Dan Ebberts

Like this maybe:

var nMarker=thisLayer.marker;
var timeMarkers=nMarker.nearestKey(time).time;
var f = timeToFrames(time - timeMarkers);
f >= 0 && f < 3 ? 100 : 0

1 reply

Dan Ebberts
Community Expert
Dan EbbertsCommunity ExpertCorrect answer
Community Expert
October 12, 2022

Like this maybe:

var nMarker=thisLayer.marker;
var timeMarkers=nMarker.nearestKey(time).time;
var f = timeToFrames(time - timeMarkers);
f >= 0 && f < 3 ? 100 : 0
The_Kitty
The_KittyAuthor
Inspiring
October 12, 2022

Thank you!! It works as expected