Copy link to clipboard
Copied
Hi all.
Practice using the BridgeTalk class.
I want to transfer masks from Illustrator to After Effects layers, c
using the functions of this class.
Here is a description of the sequence of actions of the script.
Export an Illustrator file to a PSD file.
Opening a PSD file in After Effects.
Copy the layers of the Illustrator file.
Place the copied Illustrator file layer on the After Effects project layer.
Why is only one copied to all the layers in an After Effects file, the last layer mask from the Illustrator file?
----------------------------------------------------------------------------------------------------------------------------------
I wanted to attach a file Draw.ai, but the form does not let it through.
The file contains one layer, inside of which there are 5 layers.
Each of which contains one free-form pathItems.
-----------------------------------------------------------------------------------------------------------------------------------
Copy link to clipboard
Copied
The problem is likely that the loop is too fast to copy items, or something - my suggestion is to use BridgeTalk's onResult method where another method can be used to do the operation. This way it should wait until the BT process is done with the entire copy/paste operation.
Copy link to clipboard
Copied
I attached to what I wrote last time, the function..
------------------------------------------------------------------------
------------------------------------------------------------------------.
I have a question about the behavior of the "bt.onResult" method, and in general, about the results obtained.
When you run this script, there are processes that are not clear to me. On the one hand, for all sublayers of the layer, in the AE project, the same mask from the layer of the AI document is added.
On the other hand, after working out the scipt, I see such a chain of events. I'm running a script from AI, where I should receive messages from the "bt.onResult" method. The application freezes. The AE application logo flashes at the bottom of the screen. I switch to the AE application, there really appear sublayers, with the same mask. Then I switch to AI, I get a bunch of number messages " var f = carentComp.layer(' + stringJ + ').mask.numProperties; " and I press the Enter key dozens of times, .... confirming the received message, about number of vertices of the copied mask.....
it seems that the "bt.onResult" method works, but it works somehow crookedly, or I don't understand something .....
One more question.
I work with applications through Microsoft VS Code. Can I pause the execution of the script on the AI side, and during this pause, look at the data on the AE side?
On the third hand, you can also pass an array of data about the vertices of the mask...
------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------
Advise, as in my case it is correct, to use the clipboard with the app.copy command, or to pass an array of vertex parameters? In my opinion, both methods are equivalent.