Duplicate Comp Hierarchy Script

All things .jsx

Moderator: Paul Tuersley

Post Reply
bchapman
Posts: 2
Joined: September 30th, 2008, 5:56 pm

February 3rd, 2010, 6:16 pm

Hi,

Here's a script I wrote that creates a duplicate of a comp and it's complete hierarchy.
It recursively searches through the comp hierarchy and creates duplicates.
Then, it replaces the source of the layers with those new duplicates.
It also checks to make sure that the subcomps are duplicated only once, despite being used in multiple subcomps.

UPDATE: I've added some error checking to prevent a couple of problems.
Attachments
DuplicateHierarchy.jsx.zip
(1.53 KiB) Downloaded 1210 times
Last edited by bchapman on February 4th, 2010, 3:02 pm, edited 1 time in total.
pdeb
Posts: 21
Joined: November 7th, 2006, 2:07 pm

February 4th, 2010, 9:35 am

Thanks for your work on this script.

I ran the script and it returned this error:
"Unable to execute script at line 21. undefined is not an object"

pdeb
bchapman
Posts: 2
Joined: September 30th, 2008, 5:56 pm

February 4th, 2010, 3:04 pm

pdeb wrote:Thanks for your work on this script.

I ran the script and it returned this error:
"Unable to execute script at line 21. undefined is not an object"

pdeb
Thanks for the response. I updated to the script to hopefully fix this problem. If you still have trouble with it let me know.
Post Reply