ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Treeview reference

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Scott McGee
Treeview reference
on Jun 13, 2017 at 3:46:35 pm

Hey Guys,

I'm having to rewrite some script to change my listbox into a treeview... I would have thought that the script should have been relatively similar, but I can't seem to get it to work. Anyone dealt with treeviews and how to pull the selected item?

Here's a cobbled together version I redone from my listbox script.

var myBtn = w.add ("button", undefined, "Apply");

myBtn.onClick = function(){

var sel = myTree.selection;
var myComp = app.project.activeItem;
if(!myComp || myComp.typeName !== "Composition") return;
var n;

for (n=0; n var Text1 = "Text1";
var Text2 = sel[n].text;

var textValue = myComp.layer(""+Text1+"").property("ADBE Text Properties").property("ADBE Text Document").value;
textValue.text = Text2;
};

myComp.layer(""+Text1+"").property("ADBE Text Properties").property("ADBE Text Document").setValue(textValue);
};


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]