• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
1

selected clip .start.seconds always returns 3600

Explorer ,
Aug 06, 2024 Aug 06, 2024

Copy link to clipboard

Copied

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..... 

TOPICS
SDK

Views

91

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Adobe Employee , Aug 06, 2024 Aug 06, 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());
		}
	}
}

 

Votes

Translate

Translate
Adobe Employee ,
Aug 06, 2024 Aug 06, 2024

Copy link to clipboard

Copied

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());
		}
	}
}

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Aug 06, 2024 Aug 06, 2024

Copy link to clipboard

Copied

LATEST

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 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines