Quantcast
Viewing all 53010 articles
Browse latest View live

Motion Graphics Templates API is not working

Hi, everyone

 

I tried new API(Premiere Pro 12.1 API improvements ) .

But Motion Graphics Templates API is not working.

My Premiere Pro version is 12.1.1(Build 10) and windows10 OS(Japan).

 

Could you tell me if you know anythings.

 

var activeSeq = app.project.activeSequence;
if (activeSeq) {    var filterString = "";    if (Folder.fs === 'Windows'){        filterString = "Motion Graphics Templates:*.mogrt";    }    var mogrtToImport = File.openDialog ( "Choose MoGRT", // title                                                filterString, // filter available files?                                                 false); // allow multiple?    if (mogrtToImport){        var targetTime = activeSeq.getPlayerPosition();        var vidTrackOffset  = 2;        var audTrackOffset = 1;        var newTrackItem = activeSeq.importMGT( mogrtToImport.fsName,                                                     targetTime.ticks,                                                     vidTrackOffset,                                                    audTrackOffset);        if (newTrackItem){            //var moComp = newTrackItem.getMGTComponent();  //this function return Undefined            var moComp = newTrackItem.components[2]; // Simple Web Caption.mogrt            if (moComp){                var params = moComp.properties;                var srcTextParam = params.getParamForDisplayName("Source Text");                if (srcTextParam){                    var val = srcTextParam.getValue();                    srcTextParam.setValue("New value set by PProPanel!");                }            }        }    } else {        app.setSDKEventMessage('Unable to import ' + mogrtToImport.fsName + '.', 'error');      }
} 

 

thanks


Renaming Script - Premiere Pro

Looking for a script or a better way to rename clips within adobe premiere pro.

 

I don't want to actually rename the file but the clip name inside of premiere pro. All I would need it to do is to add a number to the end of any name that repeats itself.

 

(i.e. Interview_John_Smith_) have a script find the similar clip names and just adds numbers.

 

Interview_John_Smith_01

Interview_John_Smith_02

ect.

 

If you could point me in the right direction that would be great.

 

Thanks,

JSON Undefined error in Premiere pro 13.0.2

Hi All,

 

In some system we are getting JSON is undefined message in the extendscript functions.

In two machines running in the same version premiere pro 13.0.2(Build 38) one is having this issue and the other system works fine.

We have faced this problem several times, but its not consistent and not happening in all system.

 

Thanks and Regards,

Anoop NR

Premiere Pro Scripting: Set In and Out Points of Clip

Suppose I have a 2-minute long media file and an empty timeline for the currently active sequence.  Now, suppose I want to write a Premiere Pro script that will put that media file at the beginning of the timeline, but it should start playing 45 seconds into the clip and end exactly 10 seconds later (at 55 seconds into the clip).  It would be the equivalent of this:

 

Image may be NSFW.
Clik here to view.
D0NFMRQ.png

(In this image, we see that the footage is 2 minutes long, the first 45 seconds of the footage are trimmed off, and it only plays for 10 seconds).

 

I would like to achieve this through scripting, but I'm not sure.  I tried something of this order, but it did nothing more than simply put all 2 minutes of the clip into the sequence timeline:

 

var file1 = "C:\\Path\\test.mxf"
var backsBin = app.project.rootItem.createBin("Backs")
app.project.importFiles([file1], false, backsBin);
var thisTrack = app.project.activeSequence.videoTracks[0];
var projItem = backsBin.children[0];
thisTrack.insertClip(projItem, 0); // second arg is time in seconds to insert at
thisTrack.clips[0].inPoint.seconds = 45
thisTrack.clips[0].outPoint.seconds = 55

 

What is wrong with my code, and what can be done to fix it?  It seems like there's no way to set in and out points, as those last two lines don't seem to do anything.  I am on Windows 10, PPro CC 2017.1.2 for reference.

Re: Creating a Panel to control the Plugin (C++)

hello... i want to add a custom plugin to adobe reader..

for that i have an .api file written in c/c++.

now how should i add this plugin to adobe acrobat readerDC?

ExtendScript Toolkit and Premiere Pro?

I'm just starting to dive into Premiere Pro extension development and I'm finding it difficult to get a firm grasp on the environment. I get that there are two DOMs to deal with Application/ExtendScript (jsx) and HTML (js). Cool. However, I'm having a tough time figuring out how to really examine the environment. I've configured my environment to debug HTML DOM stuff that I try but I'm not quite sure how to debug the Application/ExtendScript stuff.

 

Any pointers?

[Q] Execute menu command from Script (CEP, ExtendScript)?

Hi all,

 

Is there any API for executing menu command from CEP plugin (or ExtendScript)?

 

Illustrator has app.executeMenuCommand().

InDesign has app.menuActions.

 

I'm looking for similar API for Premiere Pro.

 

Thank you very much,

Naoki

Applying a scale change through scripting

Hi,

 

I'm trying to get to grips with JavaScripting on Premiere Pro CC 12 and my first task is to apply a scale change to a series of videos which runs for the first second scaling from 100 to 200 and then for another second scaling from 200 to 300. It seems as though everything is being correctly set when debugging the script but in the project window the keys I've made are not showing up and the final scaling is applied from time 0 so the end effect is that it's full size from the outset.

 

what am I missing?

 

TIA

Richard

 

var proj = app.project;

var seq = proj.activeSequence;

 

var time = seq.getPlayerPosition();         // CTI = Current Time Indicator.

var time2 = seq.getPlayerPosition();

var time3 = seq.getPlayerPosition();

time2.seconds += 1;

time3.seconds += 2;

 

 

var videoTracks = seq.videoTracks;

for (var i = 0; i < videoTracks.numTracks; i++) {

var track = videoTracks[i];

for (var j = 0; j < track.clips.numItems; j++) {

var clip = track.clips[j];

 

if (clip.name == "Rectangle 720 576.png") {

for (var k = 0; k < clip.components.numItems; k++) {

var component = clip.components[k];

if (component.displayName == "Trajectoire") {       // Trajectory

 

for (var l = 0; l < component.properties.numItems; l++) {

var property = component.properties[l];

if (property.displayName == "Echelle") {        // Scale

if (!property.isTimeVarying()) {

property.setTimeVarying(true);

}

property.addKey(time);

property.addKey(time2);

property.addKey(time3);

var k = property.getKeys();

if (property.areKeyframesSupported() == true) {

var result = property.getValueAtKey(time);

property.setValueAtKey(time, 100, true);

property.setValueAtKey(time2, 200, true);

property.setValueAtKey(time3, 300, true);

}

}

}

 

}

}

 

}

}

}


how does a synthetic importer recovered with the last saved private data when the Premiere Pro restart

As mentioned above, a synthetic importer written by Premiere Pro SDK, when imported into the project,  needs to store individual data before Adobe Premiere exits.And it needs to recover with the saved private data when the Premiere Pro starts again.

 

As far as I known, when Premiere Pro starts, the synthetic plugin will be loaded and imGetInfo8 will be called times if you have several synthetic importer project items.

But I found no unique things,@@ that will keep the same when restart the Pr Pro , which  I can use to distinguish between different synthetic importers in the project panel. E

 

消息编辑者为:Jason Lee

setValueAtKey and addKey on Pictures

Hello everybody,

 

Can you say me if Premiere SDK supports addKey on pictures ?

When I attempt to add addKey (on opacity) on movies, it works, but if I try on pictures (.jpg, .png...), it doesn't work : I used this script (https://forums.adobe.com/thread/2471227)

I don't understand, anyone can help me ? 2 weeks that I'm looking for, I'm going crazy. Thank you.

 

    var proj = app.project; 

    var seq = proj.activeSequence; 

    var time = seq.getPlayerPosition(); // CTI = Current Time Indicator. 

    var time2 = seq.getPlayerPosition(); 

    var time3 = seq.getPlayerPosition(); 

    time2.seconds += 1; 

    time3.seconds += 2; 

    var videoTracks = seq.videoTracks; 

    var track = videoTracks[0]; 

        for (var j = 0; j < track.clips.numItems; j++) { 

            var clip = track.clips[j]; 

                for (var k = 0; k < clip.components.numItems; k++) { 

                    var component = clip.components[k]; 

                        // Trajectory 

                        for (var l = 0; l < component.properties.numItems; l++) { 

                            var property = component.properties[l]; 

                            if (property.displayName == "Scale") { 

                                // Scale 

                                if (!property.isTimeVarying()) { 

                                    property.setTimeVarying(true); 

                                } 

                                property.addKey(time); 

                                property.addKey(time2); 

                                property.addKey(time3); 

                                var k = property.getKeys(); 

                                if (property.areKeyframesSupported() == true) { 

                                    var result = property.getValueAtKey(time); 

                                    property.setValueAtKey(time, 100, true); 

                                    property.setValueAtKey(time2, 200, true); 

                                    property.setValueAtKey(time3, 300, true); 

                                } 

                        } 

                    } 

               } 

        } 

TypeScript Enabled CEP Development

Modern Tools and ExtendScript

Earlier this week, Bruce Bullis integrated a pull request into the CEP Samples repository that included a new Sample called TypeScript. TypeScript is a language that "transpiles" into JavaScript and JavaScript-based languages (e.g. ExtendScript). It can also be configured in certain environments (e.g. Visual Studio Code) to provide normal JavaScript (and, it turns out, ExtendScript) development with helpful type checking and IntelliSense/autocompletion support. Here's an example:

Image may be NSFW.
Clik here to view.
TSExample.gif

Open the PProPanel-vscode folder in Visual Studio Code (or other TypeScript-aware IDEs?), open up the Premiere.jsx file, and simply begin typing. The environment is already set up to provide rich IntelliSense support.

 

Powered By TypeScript Declaration Files and JSDoc

The environment has to get information about the types from somewhere, right? The type information is identified by the TypeScript system in the following ways:

 

  • In the Panel JavaScript Environment:
  • In the App ExtendScript Environment:
    • Uses the TypeScript-provided ES5 type information (ES3 is coming - when available, it will be switched to use that!).
    • Uses custom Type Declaration files (included within the sample here) to help make the IDE aware of what types are available, as well as documentation!
    • Sources JSDoc comments for type information.

 

Beyond this, TypeScript is capable of type inference (set var x = 5; and the IDE will infer that x is a number). For more on how TypeScript does all of this, see this document.

 

Inline ExtendScript and PremierPro API Documentation

The declaration files included in the sample are currently incomplete, but bbb_999 has indicated interest in helping to fill in the blanks. These files are an improvement over the current documentation in that they can be [more] easily read on the web (don't need to be downloaded and opened in a browser) and also power in-line documentation and suggestions (as in the above gif)!

 

Writing in TypeScript

As configured, the sample does not actually assume that you will be writing in TypeScript and transpiling to JavaScript, but that you are simply writing JavaScript/ExtendScript. If you wish to use this feature, you will have to configure your IDE to do so (Visual Studio Code, Webstorm, Sublime Text, etc.).

 

Writing in NEW JavaScript

It should also be noted that TypeScript can transpile from new JavaScript to old JavaScript. This may not seem all that interesting except that you could use the latest ES6 features to write code for both your panel JavaScriptor your app ExtendScript. These would be transpiled into platform-compatible versions: target: "es5" for panel and target: "es3" for ExtendScript!

 

As with TypeScript, this use-case would require setting up the TypeScript compiler.

 

Debugging In Visual Studio Code

This sample also contains configuration settings to allow debugging of the panel (HTML) environment directly in Visual Studio Code, rather than through a Chrome browser. See:

Image may be NSFW.
Clik here to view.
vscode-debugging.png

 

Questions? Comments? Ask/post away!

How to check given path isFile or isDirectory in jsx?

Hello,

 

I want to check that given path is File or Directory in a jsx.

 

The 'isFileExist' function only check that path is exist or not in the file system.

I want to check it is 'folder' or 'file'

 

For example,

          path = 'd:/folder1' then isFile method should return 'false'

          path = 'd:/folder1/1.epr' then isFile method should return 'true'

 

How can I do that? I am using below code.

isFileExist : function(path) {     var file = new File(path);  return file.exists;
}




isFile : function(path) {
          //How can I check that path is 'file' or 'directory'?          
}

 

Premiere Pro version 11.0

Execute a system command in windows environment as administrator

Hi All,

 

Is there a way to execute system commands using the C:/windows/system32/cmd.exe from panels?

We tried the CEP HTML test Extension-> Create Process options, but cannot figure out how it is working

When we try to run the commands under set StdErr Handler but that is always creating ".exe Argument1" folder in the document folder.

 

How can we execute system commands in windows environment?

How can we run certain commands/ programme  as a specific user?

 

Thanks and Regards,

Anoop NR

passing vectors,maps from javascript to c++ shared library

  • Is it possible to pass vectors or maps from javascript to c++ shared library?
  • I went through the Extendscript Toolkit SDK which contains sample programs which shows how to pass data from c++ and javascript
  • I am able to pass basic data types such as integer and character etc to c++ shared library through the structure called TaggedData
  • Iam not able to send vector or maps to c++ shared library
  • If i alter the TaggedData structure(datas that are communicated between javascript and c++) then the code will fail
  • Is there any possible way to send vector and maps to c++ shared library?

Importing images as a sequence in Adobe Premiere Pro using extendscript

So I've been looking around and trying to find a way of importing image sequences in Adobe Premiere Pro using extendscript.

I can import separate single files using: app.project.importFiles(new Folder(folder_path));

But I can't give an option of importing these images as a sequence.

I tried using opts = new ImportOptions(new File("path_to_image")); opts.sequence = true; and calling this within app.project.importFiles(opts) but Premiere doesn't seem to support ImportOptions, I keep getting an error stating "Import Options does not have a constructor"....

I'm assuming Premiere Pro doesn't support ImportOptions?

Is there any other way of importing an image sequence using app.project.importFiles?

Thanks!


how to get started with premiere scripting?

Hi. I'm an experienced web developer who's working on a project which requires some scripting in Premiere Pro.

 

My needs aren't highly complicated, and at first I thought "well this looks fine" seeing the CEP samples on github. Never have I have ever seen such bad bad horrible job of creating an API since trying to work with Microsoft's Outlook. There seems to be no manual or proper documentation for Premiere, furthermore, most (if not all? I didn't check) of the links on the github page are dead. Worse, some of the links are supposed to point at a file within that project - upon finding that file (in a different place) it turns out that even the intended lines the link points to are out of date.The official ESTK install links on Adobe's website are dead too, I only finally got it through the Creative Cloud - after enabling "show older apps" of course, which hasn't been a whole lot of help because it's debugging system is so ridiculously out of date. Oh also, some of the examples on github don't even run *as is*. There's no proper guide or quick-start tool, there's not even something like a REPL system that'll allow you to mess around and learn through that.

 

I need to run some really simple operations. I'm not asking for help with figuring out how to do them - I can do that on my own, provided I have some system that allows me to actually understand and learn without banging my head against the wall. Frankly, this is embarrassing and unprofessional from a company this big, and I don't understand it, but maybe someone on this community can point me in the right direction? I just need a way to start messing with this so I can actually learn how to use it.

New UI font in CC 2018

Which font is being used now? Same or different across macOS and Windows?

Transition Items

Hi bbb_999,

 

thanks for adding some more granularity to transition items. And yet... my humble opinion is using the local language for the name is not a good choice. I suggest this be modified to either remain in english, or better, use a UUID, or use the SMPTE code if the transition is also one standardized by SMPTE (which many of the standard ones are) as an ID.

Also, these improvements have not (yet) found their way into the FCP XML export, this one is still exported as a cross dissolve no matter what the actual transition is.

 

Thoughts?

 

Best regards,

Erik

How to open closed project panel by PPro api?

Hello,

 

I want to open closed project panel by PPro API.

 

Steps:

  1. Open project.
  2. Close the panel. Right click on Project Panel >> 'Close Panel'.
  3. Try to open Project by API.

 

I have tried to open that project once again by below code but it can't open the project panel.

 

var projToOpen = new File(projectFilePath);
app.openDocument( projToOpen.fsName,  1, // suppress 'Convert Project' dialogs?  1, // suppress 'Locate Files' dialogs?  1);

 

Is there any way to open it?

 

I found below API code to open extension but I am not sure that will work for this panel.

 

CSInterface.prototype.requestOpenExtension = function(extensionId, params)
{  window.__adobe_cep__.requestOpenExtension(extensionId, params);

};

 

Could you please suggest me the proper way to open that project panel once again if end user closes project panel and I need to reopen by API?

As well What should be the extensionId for that project panel?

 

Image may be NSFW.
Clik here to view.
proapi.png

 

PPro Version: 12.0.0

How to get the list of project items which are part of the active sequence?

Viewing all 53010 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>