Quantcast
Channel: Adobe Community : Discussion List - After Effects Scripting
Viewing all articles
Browse latest Browse all 2143

Does ListBox or TreeView can store dynamic location of objects/Items??

$
0
0

//Example

//The below code just lists selected Layers and clicking on an item triggers name of item.

//The below code triggers layer/Item name undefined as it didnt store the dynamic location of the object.

//Is it possible to store the dynamic location of the object/Item in the list.???

//Any other way to do the below stuff??

function buildUI(thisObj) {

var myPanel = (thisObj instanceof Panel) ? thisObj:new Window('palette', 'Stress Reducers',undefined, {resizable: true});

 

 

myPanel.win= myPanel.add("panel", [0,0,400,300], 'list');

myPanel.win.listb=myPanel.add('ListBox',[0,0,100,200]);

myPanel.win.but=myPanel.add('button',[110,50,160,90],"listit");

 

var myProjectFolder=app.project.rootFolder;

var myLayers=app.project.activeItem.selectedLayers;

var StoreAry=[];

var myLocalLoc=myProjectFolder;

 

myPanel.win.but.onClick=function(){

 

for(i in myLayers){

 

    myPanel.win.listb.add('item',myLayers[i]);

}

}

myPanel.win.listb.onChange=function(){

 

 

alert(myPanel.win.listb.selection.name);

}

 

return myPanel;

 

}

 

var myToolsPanel = buildUI(this);


Viewing all articles
Browse latest Browse all 2143

Trending Articles