Is this what you mean?
L = thisComp.layer("Null 1");
L.toComp(L.effect("3D Point Control")("3D Point"))
To get the z position correctly, it appears that the null has to be a 3D layer.
Dan
Search found 320 matches
- November 30th, 2012, 9:17 am
- Forum: Expression Discussion
- Topic: 3d Point Control toComp
- Replies: 4
- Views: 14507
- September 3rd, 2012, 12:23 pm
- Forum: Scripts Discussion
- Topic: XML parsing
- Replies: 4
- Views: 12800
Re: XML parsing
I think it would be .languages.language[0] etc.
Also, sometimes you have to add .toString() to get things to work right.
Dan
Also, sometimes you have to add .toString() to get things to work right.
Dan
- September 2nd, 2012, 11:19 pm
- Forum: Scripts Discussion
- Topic: XML parsing
- Replies: 4
- Views: 12800
Re: XML parsing
It's pretty straightforward once you have the file object:
myXmlFile.open("r");
var myXmlString = myXmlFile.read();
var myRoot = new XML (myXmlString);
myXmlFile.close();
There's a chapter on it in the JavaScript Tools Guide.
Dan
myXmlFile.open("r");
var myXmlString = myXmlFile.read();
var myRoot = new XML (myXmlString);
myXmlFile.close();
There's a chapter on it in the JavaScript Tools Guide.
Dan
- July 23rd, 2012, 4:12 pm
- Forum: Expression Discussion
- Topic: Is there a way to create masks using expression?
- Replies: 2
- Views: 10342
Re: Is there a way to create masks using expression?
Expressions can't create masks or access their control points, but you could create a bunch of masks and apply an expression like this to randomly control each mask's Mask Opacity property: minDelay = 0; maxDelay = 5; seedRandom(index,true); myDelay = random(minDelay,maxDelay); time < myDelay ? 0 : ...
- June 27th, 2012, 2:03 pm
- Forum: Scripts Discussion
- Topic: Trouble linking Slider to a Shape layer parameter
- Replies: 2
- Views: 8213
Re: Trouble linking Slider to a Shape layer parameter
You need to create the link by setting an expression for the Roundness property that points to the slider. I'd create the expression by hand first, copy it, and paste it into a variable in your script: var myExpr = "(expression goes here); So instead of using .setValue(roundCtrl) you would use ...
- June 25th, 2012, 1:04 pm
- Forum: Script Tutorials
- Topic: FootageItem replace() method
- Replies: 10
- Views: 58933
Re: FootageItem replace() method
Glad I could help.
I'm still dying to know why you would want to use the item's index rather than its name.
Dan
I'm still dying to know why you would want to use the item's index rather than its name.
Dan
- June 25th, 2012, 12:12 pm
- Forum: Script Tutorials
- Topic: FootageItem replace() method
- Replies: 10
- Views: 58933
Re: FootageItem replace() method
This should give you the item numbers of any selected items.
Dan
Code: Select all
{
for (var i = 1; i <= app.project.numItems; i++){
if (app.project.item(i).selected){
alert("Item " + i + " is selected.");
}
}
}
Dan
- June 25th, 2012, 11:35 am
- Forum: Script Tutorials
- Topic: FootageItem replace() method
- Replies: 10
- Views: 58933
Re: FootageItem replace() method
Unless you have a really good reason for referencing it by number, I wouldn't do it that way. If you can look it up by name, that seems like it would less subject to getting messed up if you add anything to the project. Just go through the project bin looking for a FootageItem with the correct name....
- June 25th, 2012, 6:22 am
- Forum: Script Tutorials
- Topic: FootageItem replace() method
- Replies: 10
- Views: 58933
Re: FootageItem replace() method
I just tried it (with different paths of course) and it works for me. You'll get that error though, if item 70 isn't a Footage Item.
Dan
Dan
- June 24th, 2012, 10:54 am
- Forum: Script Tutorials
- Topic: FootageItem replace() method
- Replies: 10
- Views: 58933
Re: FootageItem replace() method
If "/C/AE cs5 working/Styles/Basic 1.aep" is the project, you have to open it first:
var projFile = new File ("/C/AE cs5 working/Styles/Basic 1.aep");
var myProject = app.open(projFile);
Dan
var projFile = new File ("/C/AE cs5 working/Styles/Basic 1.aep");
var myProject = app.open(projFile);
Dan
- June 19th, 2012, 10:41 pm
- Forum: Expression Discussion
- Topic: reationship between numbers. tring to find solution...
- Replies: 1
- Views: 9254
Re: reationship between numbers. tring to find solution...
Inverse scaling would be:
s2 = 10000/s1
Dan
s2 = 10000/s1
Dan
- May 15th, 2012, 10:52 pm
- Forum: General Scripts Library
- Topic: sort to individual folder 1.0b
- Replies: 4
- Views: 23142
Re: sort to individual folder 1.0b
>Does this mean I do not have to loop through to find the selected items, but can merely summon them and their value? That's correct. >Why does this not matter here? It's pretty much equivalent to your loop. mySelectedItems is an array of items selected at the time the script launched. Dan
- May 14th, 2012, 4:41 pm
- Forum: General Scripts Library
- Topic: sort to individual folder 1.0b
- Replies: 4
- Views: 23142
Re: sort to individual folder 1.0b
I'd do it like this: { var mySelectedItems = app.project.selection; if (mySelectedItems.length > 0){ app.beginUndoGroup("Sort To Individual Folders"); for (var i = 0; i < mySelectedItems.length; i++){ var mySelection = mySelectedItems[i]; var compFolder = app.project.items.addFolder(mySele...
- May 13th, 2012, 12:53 pm
- Forum: Expression Discussion
- Topic: Move layer based on final position
- Replies: 2
- Views: 9736
Re: Move layer based on final position
This should work:
tStart = inPoint; // time to start (seconds)
tDur = .5; // time to move
yOffset = 30; // amount to move
ease(time,tStart,tStart+tDur,value+[0,yOffset],value)
Dan
tStart = inPoint; // time to start (seconds)
tDur = .5; // time to move
yOffset = 30; // amount to move
ease(time,tStart,tStart+tDur,value+[0,yOffset],value)
Dan
- May 9th, 2012, 10:33 am
- Forum: Script requests
- Topic: How to set a reference to compositions name instead of index
- Replies: 1
- Views: 8101
Re: How to set a reference to compositions name instead of i
If you want to find a comp by name, you have to loop through the project items, like this: var theComp = null; var theName = "Put 1st video here"; for (var i = 1; i <= app.project.numItems; i++){ if (app.project.item(i) instanceof CompItem && app.project.item(i).name == theName){ t...