For an animated movie production I have to prepare 200+ Animate-projects. I want to do this automatically by using python
to process a list of scenes and then passing all the arguments to a function (with "fl.runScript(functionname, arguments etc...))
So far this all works, but what I cannot figure out is how to use the fljs-scriptlanguage to import a moviefile and place it on the timeline,
So that an animator can use this storyboard-moviefile as a reference.
I was thinking that something like this should work:
var doc = fl.getDocumentDOM();
var libIndex = doc.library.library.findItemIndex("Sq080_sc210_sh020_animatic_v001");
var myLibItem = doc.library.items[libIndex];
fl.getDocumentDOM().getTimeline().layers.frames.element.libraryItem = myLibItem;
.. but i gives the error: "fl.getDocumentDOM().getTimeline().layers.frames.element is undefined", which sounds logical.
..because the stage is empty(contains no elements)
How can I add an element to a frame(scriptwise) for linking it to my LibraryItem?
I searched all the contents of:
But couldn't find anything.
Does anyone have the answer?
So you want to use "JSFL" to "add" something to the current document? Googling for those two words gives a link to Adobe's documentation for addItemToDocument as the very first link.
Try document.addItem() to get an item from any open document or library to the specified Document object
Try fl.copyLibraryItem() to silently copy a library item from a document without exposing the item in the Animate user interface.
Try the document.clipPaste() method to paste the item into the new document.