Skip to main content
Inspiring
August 6, 2024
Answered

selected clip .start.seconds always returns 3600

  • August 6, 2024
  • 1 reply
  • 340 views

Hi there, building a script that returns the start time of a selected clip, always seems to return 3600 (1 hour) even when the clip is at 0

 

var selectedClips = sequence.getSelection();
var targetClip = selectedClips[0];
alert(targetClip.start.seconds);

 

Any clues as to why this is? I've tried it on multiple assets, adjustments layers, color mate, bars & tone..... 

This topic has been closed for replies.
Correct answer Bruce Bullis

It sounds like the start time of the sequence containing those trackItems, is set to something other than zero. 

This snippet produces correct results:

var seq = app.project.activeSequence;

if (seq){
	var selectedClips = seq.getSelection();
	if (selectedClips){
		var targetClip = selectedClips[0];
		if (targetClip){
			alert(targetClip.start.seconds.toString());
		}
	}
}

 

1 reply

Bruce Bullis
Bruce BullisCorrect answer
Legend
August 6, 2024

It sounds like the start time of the sequence containing those trackItems, is set to something other than zero. 

This snippet produces correct results:

var seq = app.project.activeSequence;

if (seq){
	var selectedClips = seq.getSelection();
	if (selectedClips){
		var targetClip = selectedClips[0];
		if (targetClip){
			alert(targetClip.start.seconds.toString());
		}
	}
}

 

Inspiring
August 6, 2024

Thanks, I think I realised the issue was that Graphics (png, jpg), Adjustment layers, Color Mattes and even Bars & Tone are given a inPoint of 3600 (1 hour)

 

Assume this is a buffer for extending the footage, but confusing