Skip to main content
Known Participant
June 15, 2007
Question

how can I pre-compose layers via AEGP?

  • June 15, 2007
  • 5 replies
  • 2584 views
Hello,

I would like my AEGP to put some of the layers of the active composition into a pre-composition. Well, the far way I can think of would be to create a new composition, add it to the existing composition, add the footage items of all layers I want to have in my nested comp in there and copy every one of the god knows how many streams, flags and effects to the layers inside the comp.

My question: isn't there an easier way to create nested compositions or at least copy layers with all their effects and so on to another place inside my project?
This topic has been closed for replies.

5 replies

Known Participant
August 8, 2007
Thank you. But still, nothing works. I have no idea why.
I try to open a pre-composition I have just built and added to my main composition.
===============================================================
Here's my source code:

AEGP_Collection2H collection = NULL;
AEGP_CollectionItemV2 coll_item;
coll_item.u.layer.layerH = temp_layerH;
ERR(suites.CollectionSuite2()->AEGP_NewCollection(globP->my_id, &collection));
ERR(suites.CollectionSuite2()->AEGP_CollectionPushBack(collection, &coll_item));
ERR(suites.CompSuite5()->AEGP_SetSelection(main_compH, collection));
ERR(suites.CommandSuite1()->AEGP_DoCommand(3061)); //3061 = open selection
ERR(suites.CollectionSuite2()->AEGP_DisposeCollection(collection));
=============================================================

Where am I wrong? When I debug, every single line of code is done, but nothing seems to happen.
Bruce Bullis
Legend
August 1, 2007
Call AEGP_SetSelection() to alert AE of the change.
Known Participant
July 24, 2007
How do I use these Collections?

I build a new collection, I build a collection item, I set item.u.layer.layerH at a layer I want to select and do collectionPushBack, then doCommand and after that disposeCollection. Nothing happens, and I don't even see how to tell the command which layer(s) it is referring to. Help!
Bruce Bullis
Legend
June 22, 2007
Oh yeah...set the selection using AEGP_CollectionSuite.
Bruce Bullis
Legend
June 22, 2007
You could set the current selection to the comps & layers to be pre-comped, then use AEGP_DoCommand (2071). 2071 == pre-compose.