Quantcast
Channel: Adobe Community : Discussion List - After Effects Scripting
Viewing all articles
Browse latest Browse all 2143

Script to pull in a local image to project panel keeps forcing new project - I'd like to import to current project

$
0
0

Hey guys,

 

Script newbie here and would appreciate any help.

 

The current script - which was previously used in Photoshop by someone else - imports a downloaded image (location) to the project panel.

 

function OpenDocument(location) { return app.open(new File(location)); }

 

Right now a selected image is downloaded via a panel (Pixabay image API). It downloads fine and then is immediately seen in the project panel, but either a new untitled project has been created automatically (if current project is saved), or I get the "Save changes to 'untitled project' before closing?" prompt.

 

Any ideas would be greatly appreciated. I'll be honest, I don't completely understand what the code is doing - just hunches. I simply want the downloaded image to appear in the project panel of current project - no questions asked.


Viewing all articles
Browse latest Browse all 2143

Trending Articles



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