Search found 705 matches
- May 10th, 2013, 10:03 am
- Forum: Script requests
- Topic: Create 50% grey solid
- Replies: 2
- Views: 9618
Re: Create 50% grey solid
If you mean when adding a new solid: LayerCollection addSolid() method (page 98 of CS6 scripting guide) app.project.item(index).layers.addSolid(color, name, width, height, pixelAspect, duration) color - The color of the solid, an array of three floating-point values, [R, G, B], in the range [0.0..1....
- May 8th, 2013, 12:11 pm
- Forum: Scripts Discussion
- Topic: TextDocument object's "Leading" Property?
- Replies: 2
- Views: 8523
Re: TextDocument object's "Leading" Property?
Leading isn't mentioned in the scripting guide because it isn't accessible through scripting, along with the text properties in the lower part of the Character panel. The reason you can apparently set the leading value without an error is that TextDocument is an object, and in javascript you can eas...
- May 8th, 2013, 11:45 am
- Forum: Expressions Tutorials
- Topic: effect>text>numbers (how to step the numbers over 9 frames)
- Replies: 1
- Views: 31139
Re: effect>text>numbers (how to step the numbers over 9 fram
You can do this with an expression on the Numbers effect's Value property or the Source Text property of a text layer. time returns the current comp time in seconds, so time divided by the duration of one frame (in seconds) gives you the time in frames: time / thisComp.frameDuration; you want each t...
- April 29th, 2013, 10:51 am
- Forum: Scripts Discussion
- Topic: Window/Panel/Palette drawing confusion
- Replies: 3
- Views: 12008
Re: Window/Panel/Palette drawing confusion
Something like this: { function BeamBuilder(thisObj) { function BeamBuilder_buildUI(thisObj) { var scriptWindow = (thisObj instanceof Panel) ? thisObj : new Window("dialog", 'Beam Connection Builder', undefined, {resizeable:true}); // you may want to change "dialog" to "pale...
- April 29th, 2013, 8:59 am
- Forum: Scripts Discussion
- Topic: Window/Panel/Palette drawing confusion
- Replies: 3
- Views: 12008
Re: Window/Panel/Palette drawing confusion
Are you trying to launch it as a dockable panel by installing it in the ScriptUI Panels folder and launching it from the Window menu? This will always create a panel, regardless of whether your script uses it. For scripts to work as dockable panels they need to be coded in a particular way to receiv...
- April 20th, 2013, 10:58 am
- Forum: Scripts Discussion
- Topic: check footage item as sequence
- Replies: 4
- Views: 11832
Re: check footage item as sequence
You could check for [0001-00xx] type sequence naming in the project item although the user could have renamed it. You could check the extension against a known list of still/seq file formats.
Paul
Paul
- April 9th, 2013, 3:53 am
- Forum: Scripts Discussion
- Topic: saving animation presets
- Replies: 2
- Views: 9915
Re: saving animation presets
I'm not aware of a way to have a script save an animation preset. But you could create your own kind of preset system by saving all the information you need into a presets.txt text file, which you could read and reapply later. It sounds like maybe you want to save information that's not handled by a...
- April 9th, 2013, 3:42 am
- Forum: Scripts Discussion
- Topic: check footage item as sequence
- Replies: 4
- Views: 11832
Re: check footage item as sequence
Did you find a solution for this? The way I ended up doing it in my pt_OpenSesame script was to try importing it again. item.mainSource.file gives you the first file in a sequence if it's an image sequence, so if you import it again and it's a still (and you already know it isn't a still in your pro...
- March 29th, 2013, 8:21 am
- Forum: Scripts Discussion
- Topic: PreserveRGB
- Replies: 3
- Views: 10757
Re: PreserveRGB
There's nothing in the FootageSource object section of the CS6 scripting guide, which is where I'd expect to find it if it had been implemented. Depending on what you're trying to do, you may be able to come up with a workaround by saving a project with placeholders set to the two different options,...
- March 24th, 2013, 12:37 pm
- Forum: Scripts Discussion
- Topic: app.project.activeItem index
- Replies: 5
- Views: 17769
Re: app.project.activeItem index
You can get the id from app.project.activeItem.id but a possible problem with this is, if the project panel is active it will return the item selected in the project panel which may not be the currently open comp. If multiple items are selected in an active project panel, activeItem will return null...
- March 22nd, 2013, 7:22 am
- Forum: Scripts Discussion
- Topic: app.project.activeItem index
- Replies: 5
- Views: 17769
Re: app.project.activeItem index
You mean you want the index as it would be in app.project.items? I think that's the only way in which a CompItem has an index. You could loop through app.project.items comparing it to the CompItem you already have to find a match. CompItems do also have an .id which is a number unique to that item a...
- March 12th, 2013, 1:11 pm
- Forum: Scripts Discussion
- Topic: linked expression
- Replies: 2
- Views: 8103
Re: linked expression
You would have to get the script to look through all the layers in the relevant comp/comps looking for any properties that contain expressions. Depending on what you're doing, this could just be looking at effect properties. If you have expressions linked to different color values you'll have to ana...
- March 6th, 2013, 6:33 am
- Forum: Script requests
- Topic: Expression from expression?
- Replies: 5
- Views: 13020
Re: Expression from expression?
parseInt() converts a string into a whole number (parseFloat() for fractional/decimals) If you're including the name of the comp to reference in the text line you wouldn't parseInt() it, you'd do something like: shotComp = comp(thisComp.layer("NAME").text.sourceText); The .split() method i...
- March 4th, 2013, 4:53 pm
- Forum: Script requests
- Topic: Expression from expression?
- Replies: 5
- Views: 13020
Re: Expression from expression?
You could parseInt() the split piece of text.
parseInt(thisComp.layer("Main Text Layer").text.sourceText.split(";")[0]);
parseInt(thisComp.layer("Main Text Layer").text.sourceText.split(";")[0]);
- March 4th, 2013, 2:54 pm
- Forum: Script requests
- Topic: Expression from expression?
- Replies: 5
- Views: 13020
Re: Expression from expression?
I presume you mean text layers? In theory you could assemble all the data into a single string on a text layer, then have other layers retrieve that string. Have the main text layer set with a built in text string with default values to ensure the others don't fail even when the expression is disabl...