ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

script: split selected layer at current time indicator

COW Forums : Adobe After Effects

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Hamid Rohi-Bilverdy
script: split selected layer at current time indicator
on Jun 13, 2015 at 10:38:32 pm

Hi

Please guide me towards a tutorial or a thread on how to split selected layer at current time indicator from script.

I can't seem to figure this out.
/HRB


Return to posts index


Walter Soyka
Re: script: split selected layer at current time indicator
on Jun 13, 2015 at 11:35:20 pm

With the layer(s) to split selected:

app.executeCommand(app.findMenuCommandId("Split Layer"));

Alternately, you could duplicate the layer, then adjust the out point of the original and the in point of the duplicate, which is what the split layer command does itself anyway.

Walter Soyka
Designer & Mad Scientist at Keen Live [link]
Motion Graphics, Widescreen Events, Presentation Design, and Consulting
@keenlive [twitter]   |   RenderBreak [blog]   |   Profile [LinkedIn]


Return to posts index

Hamid Rohi-Bilverdy
Re: script: split selected layer at current time indicator
on Jun 14, 2015 at 8:17:29 am

Thank you so much Walter.
Exactly what I was looking for. Where do I find something about executeCommand and findMenuCommandId??

Can the word Split Layer be changed with another command word??


Return to posts index


Hamid Rohi-Bilverdy
Re: script: split selected layer at current time indicator
on Jun 14, 2015 at 8:22:47 am

I am trying to make it split as it is now at current time indicator, but I also want to create a function that splits the layer at time markers.


Return to posts index

Walter Soyka
Re: script: split selected layer at current time indicator
on Jun 15, 2015 at 2:16:05 pm

[Hamid Rohi-Bilverdy] "I am trying to make it split as it is now at current time indicator, but I also want to create a function that splits the layer at time markers."

You can either programmatically alter the current time, or as I suggested above, duplicate the layers you want to split and adjust their in/out points independently.

Walter Soyka
Designer & Mad Scientist at Keen Live [link]
Motion Graphics, Widescreen Events, Presentation Design, and Consulting
@keenlive [twitter]   |   RenderBreak [blog]   |   Profile [LinkedIn]


Return to posts index


Walter Soyka
Re: script: split selected layer at current time indicator
on Jun 15, 2015 at 2:15:01 pm

[Hamid Rohi-Bilverdy] "Where do I find something about executeCommand and findMenuCommandId??"

There are features of ExtendScript which work across scriptable Adobe apps that are not documented in the After Effects-specific documentation:

http://www.adobe.com/devnet/scripting.html




[Hamid Rohi-Bilverdy] "Can the word Split Layer be changed with another command word??"

Yes. The line I showed above looks for a command in the menu system, then executes it.

Walter Soyka
Designer & Mad Scientist at Keen Live [link]
Motion Graphics, Widescreen Events, Presentation Design, and Consulting
@keenlive [twitter]   |   RenderBreak [blog]   |   Profile [LinkedIn]


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]