-
Scripting: The default Solids Folder
Hi all,
i hope the subforum is correct for my question.
I am tinkering around with scripting and already managed to create some nice stuff. However, there is one thing that currently puzzles me: The Solids folder that after effects automatically creates when a solid is added and it realizes that there is no Solids folder in the root of the project.
This folder is sort of problematic for what i am trying to achieve. All new solids that are created are supposed to be moved into a sub folder in the project. Here is a bit of the code:
app.beginUndoGroup("solidtest1");var myItemCollection = app.project.items;
var compN = "MasterName";
var compBG = [0/255,0/255,0/255];
var compL = 12;
var packtemplate_show01 = myItemCollection.addComp(compN,1920,1080,1,compL,25);
packtemplate_show01.bgColor = compBG;
packtemplate_show01.hideShyLayers = true;var TitleBottomLines = packtemplate_show01.layers.addSolid([255/255, 255/255, 255/255], "TitleBottomLines", 1920, 1080, 1, 12);
footageFolder = app.project.items.addFolder("Footage");
footageSubFolder1 = app.project.items.addFolder("Images");
footageSubFolder2 = app.project.items.addFolder("Master");
compFolder = app.project.items.addFolder("compFolder");
footageSubFolder1.parentFolder = footageFolder;
footageSubFolder2.parentFolder = footageFolder;
footageFolder.parentFolder = compFolder;for (var i = 1; i<=app.project.numItems; i++) {
if(app.project.item(i) instanceof CompItem)
app.project.item(i).parentFolder = compFolder}var SolidsFolder = app.project.item(6);
TitleBottomLines.parentFolder = footageSubFolder1;
alert(TitleBottomLines.parentFolder.name + " " + SolidsFolder.index);
app.endUndoGroup();
The line that defines the subfolder for the previously created solid “TitleBottomLines” is not working. The solid remains in the default Solids folder though when i alert the .name property of the solids parent folder at the end of the script, it will alert the name of the subfolder “images”. Why is it not being moved into this folder then?
I found some other weird things about the default Solids folder. The alert for the index of this folder returns undefined even though the index was identified as 6.
Is there some magic involved to move solids out of this folder or did i just misunderstood something? Not sure if you guys can help me with this. I might also ask this at the enhancers forum once my account there is activated.