Import files and add them as layer
  • Hi there,

    I'm relative new to AE Scripting, I think this is a simple problem but I cannot find a solution.

    Several files have to be imported in my project and added as layers.

    First a trailer (video file), than a backgroundimage and an outro image (both PSD).
    I can import them, but i dont understand how I can add it to a layer...

    My code is
    [code]
    var io = new ImportOptions( File(sProjectPath + 'border.psd') );
    io.importAs = ImportAsType.COMP;
    oCompBorder = oProject.importFile(io);

    oComp.layers.add(oCompBorder);
    [/code]

    The file is imported, but not added as a layer. How can I do this?


    Are there good examples for scripting, some guides? I read the "CS3 Scripting Guide" reference, but it is not perfect (very few realistic examples). Are there free scripts to download and read?

    I have no problems with JavaScript, but I dont know the AE specific methods.

    Is there an AE console, which will log what I do in the interface, so I can read and modify it for my script?



    Kind regards,
    Patrick
  • There is a CS6 scripting guide which might be of more help. Don't have experience with importing layered PSD files but if it's importing it are you not seeing a comp that is created as well?
  • Well, I see a comp since I've found out the ImportAsType.COMP; but I still don't now how to add it as layer (and set a layer start/end time

    Thank you for that comment
This discussion has been closed.
All Discussions