Adobe-CEP / Samples

Code samples for CEP extensions
MIT License
984 stars 552 forks source link

Incorrect documentation #83

Closed odgermany closed 6 years ago

odgermany commented 6 years ago

The documentation on http://ppro.aenhancers.com/ states that there's a function setStartTime for instances of the ProjectItem object, this is wrong. ProjectItem has the method setInPoint(value). Beyond that setInPoint and setOutPoint have quite some strange behaviour concerning the parameter. This parameter is the offset in seconds from the start of the item and not a timecode or a value in Ticks like it is used with sequences.

bbb999 commented 6 years ago

var first = app.project.rootItem.children[0]; var previousStart = first.startTime(); var newStartInSeconds = (previousStart.seconds / 2); first.setStartTime(newStartInSeconds); var newlySetStart = first.startTime();

The documentation on http://ppro.aenhancers.com/ states that there's a function setStartTime for instances of the ProjectItem object, this is wrong.

True; as you can see it ESTK's object browser, that method is called startTime().

var first = app.project.rootItem.children[0];
var previousStart = first.startTime();
var newStartInSeconds = (previousStart.seconds / 2);
first.setStartTime(newStartInSeconds);
var newlySetStart = first.startTime();

var inTime = first.getInPoint();

This parameter is the offset in seconds from the start of the item and not a timecode or a value in Ticks like it is used with sequences.

It's a Time value, which can be set/obtained in seconds, or ticks.