Hi everybody,
Brian Maffitt came up with a clever idea for a script that precomps selected layers with the "Move all attributes..." option and trims the precomp to the duration of the layers inside. I've got it posted (along with an explanation of how it works) here:
http://www.motionscript.com/ae-scriptin ... r-dur.html
You should be able to copy and paste it into a text editor directly from the web page. Please let me know if you have any problems with it.
Dan
Pre-comp to layer duration
Moderator: Paul Tuersley
-
- Posts: 320
- Joined: June 26th, 2004, 10:01 am
- Location: Folsom, CA
- Contact:
I use this script a lot, and one thing bugs me with it is that it doesen't give you a chance to rename your pre-comp, so you end up with standard names.
Can it be modified to give the user a dialog to pick a name?
Thanks
Alex
Can it be modified to give the user a dialog to pick a name?
Thanks
Alex
When I started using this script, I added a dialog for my own use. See if this works for you:
http://www.petertorpey.com/files/ae/scr ... ration.jsx
Peter
http://www.petertorpey.com/files/ae/scr ... ration.jsx
Peter
Hey Peter
Looks pretty cool, but isn't there an attached script?
(lib)/UILayout_13.jsx
This looks very cool though
Thanks
Alex
Looks pretty cool, but isn't there an attached script?
(lib)/UILayout_13.jsx
This looks very cool though
Thanks
Alex
I forgot to mention: the script depends on UILayout_13.jsx which is a version of the layout manager I wrote. See http://www.aenhancers.com/viewtopic.php?t=128 to download it.
I too use this script frequently. So, while I'm at it, many thanks to Brian, Keiko, and Dan for conceiving and implementing the original script.
Peter
I too use this script frequently. So, while I'm at it, many thanks to Brian, Keiko, and Dan for conceiving and implementing the original script.
Peter
Thanks Peter
However I run into an error message when I try to run to run the script :
"Unable to execture script at line 336 UILM_DISABLE_STRING_DISPLAY_WIDTH_GUESS is undefined"
Any idea of what this is?
Alex
However I run into an error message when I try to run to run the script :
"Unable to execture script at line 336 UILM_DISABLE_STRING_DISPLAY_WIDTH_GUESS is undefined"
Any idea of what this is?
Alex
That variable should be defined in UILayout_13.jsx. I'm not getting the error here. Hmm. Try downloading UILayout_13 again on the off chance that it was corrupted during transfer. If you're still having the problem, I'll keep investigating.
Peter
Peter
Hmm, still doesen't work.
I put the UILayout.13_jsx in a (lib) folder inside the scripts folder.
Anything wrong there?
Alex
I put the UILayout.13_jsx in a (lib) folder inside the scripts folder.
Anything wrong there?
Alex
I'm stumped. UILayout_13.jsx should be in the subdirectory (lib) of the directory in which PrecompToDuration.jsx is located.
The fact that you are getting an error about UILM_DISABLE_STRING_DISPLAY_WIDTH_GUESS means that it is finding and loading UILayout_13.jsx. Why it isn't defined by the time the script starts laying out the components is baffling.
You could change the dialog code in PrecompToDuration.jsx so that it doesn't use the layout manager and then remove the include.
I'll keep looking to see what the problem could be.
Peter
The fact that you are getting an error about UILM_DISABLE_STRING_DISPLAY_WIDTH_GUESS means that it is finding and loading UILayout_13.jsx. Why it isn't defined by the time the script starts laying out the components is baffling.
You could change the dialog code in PrecompToDuration.jsx so that it doesn't use the layout manager and then remove the include.
I'll keep looking to see what the problem could be.
Peter
Alex,
Have you had any luck getting PrecompToDuration to run? I've been looking through UILayout and haven't come across anything that could cause the problem.
Peter
Have you had any luck getting PrecompToDuration to run? I've been looking through UILayout and haven't come across anything that could cause the problem.
Peter
Nope. I've been on vacation since I finished the latest project I was working on, so I didn't investigate much more. I'll try on a different system hopefully this week.
Alex
Alex
Peter
Sorry for taking so long to get back to you on this. I just tried the script on another system and it works beautifully! Thanks so much for this, it is really a really perfect addition to this amazing script.
Alex
Sorry for taking so long to get back to you on this. I just tried the script on another system and it works beautifully! Thanks so much for this, it is really a really perfect addition to this amazing script.
Alex
Download the files from links above, here is what I did and I can confirm it works with vidpat:s added dialogue:
1. Install UILayout_13.jsx to your Script Directory (i.e. C:\Program Files\Adobe\Adobe After Effects CS3\Support Files\Scripts\ScriptUI Panels)
2. Install UIChooser.jsx into the same dir.
3. Install PrecompToDuration.jsx into the same dir.
4. Change line 24 in the PreCompToDuration to:
includeScripts = ["UILayout_13.jsx"];
(Or make a folder "lib" if you'd like, but I just wanted a quick fix).
/Anders
1. Install UILayout_13.jsx to your Script Directory (i.e. C:\Program Files\Adobe\Adobe After Effects CS3\Support Files\Scripts\ScriptUI Panels)
2. Install UIChooser.jsx into the same dir.
3. Install PrecompToDuration.jsx into the same dir.
4. Change line 24 in the PreCompToDuration to:
includeScripts = ["UILayout_13.jsx"];
(Or make a folder "lib" if you'd like, but I just wanted a quick fix).
/Anders
Freelance CG Artist
Website: http://www.sundstedt.se
AEScript Blog: http://aescripts.blogspot.com/
CG Blog: http://www.sundstedt.blogspot.com
Website: http://www.sundstedt.se
AEScript Blog: http://aescripts.blogspot.com/
CG Blog: http://www.sundstedt.blogspot.com
Hi,
This was the first script I ever used, and I've tweaked it slightly to suit my workflow.
I've adjusted it so that when you precomp a layer (or several), the layer begins at the start of the new precomp, and the precomp begins at the in-point of the original layer. This is different from the original script, where the layer in-point is unchanged and the precomp is trimmed to that point rather than actually being moved there.
I use this script alongside the Magnum edit detector when I am cutting up exported edits into individual compositions for effects and graphics work (one day I will get Automatic Duck...) - hence I've also tweaked the naming convention to reflect the layer number.
When an edit has been locked off and I am working on individual shots in After Effects, I prefer to have each shot in its own composition and starting at the beginning of that composition. This is especially useful if you are working with 3D artists who like working with frame numbers rather than timecode, and render out image sequences beginning with 0.
Hope you find it a useful variation, thanks again to Dan for the original!
-Chris
http://www.chriszwar.com/HostedFiles/Pr ... ration.jsx
This was the first script I ever used, and I've tweaked it slightly to suit my workflow.
I've adjusted it so that when you precomp a layer (or several), the layer begins at the start of the new precomp, and the precomp begins at the in-point of the original layer. This is different from the original script, where the layer in-point is unchanged and the precomp is trimmed to that point rather than actually being moved there.
I use this script alongside the Magnum edit detector when I am cutting up exported edits into individual compositions for effects and graphics work (one day I will get Automatic Duck...) - hence I've also tweaked the naming convention to reflect the layer number.
When an edit has been locked off and I am working on individual shots in After Effects, I prefer to have each shot in its own composition and starting at the beginning of that composition. This is especially useful if you are working with 3D artists who like working with frame numbers rather than timecode, and render out image sequences beginning with 0.
Hope you find it a useful variation, thanks again to Dan for the original!
-Chris
http://www.chriszwar.com/HostedFiles/Pr ... ration.jsx
I've just created an alternate version of this script, which is designed to speed up the process of setting up a edit-style project in AE (for example, a split timeline created using Magnum or Automatic Duck).
It's designed to be used on multiple layers, but instead of merging them into one combined comp, it precomps them individually - effectively running an individual version of the original script on every layer selected. This is really handy for setting up comps initially (and creating logically named comps like "Shot_001" etc). The new comps have a name defined by the user + a comp number (padded to 3 digits, which should be OK for most projects).
Anyway, it all seems to work OK, I'm using it on a job right now. Thought I'd share it with the community, spread the love![Wink ;)](./images/smilies/icon_wink.gif)
link: http://www.digitaldistortion.net/resour ... iLayer.jsx
ps. One caveat - the order you select your footage is important. If you just do "Select All" then run the script it will create the comps from the top downwards. So shift + select from the bottom upwards if that's the order you need!
It's designed to be used on multiple layers, but instead of merging them into one combined comp, it precomps them individually - effectively running an individual version of the original script on every layer selected. This is really handy for setting up comps initially (and creating logically named comps like "Shot_001" etc). The new comps have a name defined by the user + a comp number (padded to 3 digits, which should be OK for most projects).
Anyway, it all seems to work OK, I'm using it on a job right now. Thought I'd share it with the community, spread the love
![Wink ;)](./images/smilies/icon_wink.gif)
link: http://www.digitaldistortion.net/resour ... iLayer.jsx
ps. One caveat - the order you select your footage is important. If you just do "Select All" then run the script it will create the comps from the top downwards. So shift + select from the bottom upwards if that's the order you need!
Dan Sollis
--------------------------------------------------------
Digital Distortion : Post Production Services for Film and Television
http://www.digitaldistortion.net
--------------------------------------------------------
Digital Distortion : Post Production Services for Film and Television
http://www.digitaldistortion.net