Search found 705 matches

by Paul Tuersley
May 10th, 2013, 10:03 am
Forum: Script requests
Topic: Create 50% grey solid
Replies: 2
Views: 4083

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....
by Paul Tuersley
May 8th, 2013, 12:11 pm
Forum: Scripts Discussion
Topic: TextDocument object's "Leading" Property?
Replies: 2
Views: 3530

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...
by Paul Tuersley
May 8th, 2013, 11:45 am
Forum: Expressions Tutorials
Topic: effect>text>numbers (how to step the numbers over 9 frames)
Replies: 1
Views: 7623

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...
by Paul Tuersley
April 29th, 2013, 10:51 am
Forum: Scripts Discussion
Topic: Window/Panel/Palette drawing confusion
Replies: 3
Views: 5416

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 "palette" and make it work in ...
by Paul Tuersley
April 29th, 2013, 8:59 am
Forum: Scripts Discussion
Topic: Window/Panel/Palette drawing confusion
Replies: 3
Views: 5416

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...
by Paul Tuersley
April 20th, 2013, 10:58 am
Forum: Scripts Discussion
Topic: check footage item as sequence
Replies: 4
Views: 4185

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
by Paul Tuersley
April 9th, 2013, 3:53 am
Forum: Scripts Discussion
Topic: saving animation presets
Replies: 2
Views: 3426

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...
by Paul Tuersley
April 9th, 2013, 3:42 am
Forum: Scripts Discussion
Topic: check footage item as sequence
Replies: 4
Views: 4185

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...
by Paul Tuersley
March 29th, 2013, 8:21 am
Forum: Scripts Discussion
Topic: PreserveRGB
Replies: 3
Views: 3964

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,...
by Paul Tuersley
March 24th, 2013, 12:37 pm
Forum: Scripts Discussion
Topic: app.project.activeItem index
Replies: 5
Views: 7202

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...
by Paul Tuersley
March 22nd, 2013, 7:22 am
Forum: Scripts Discussion
Topic: app.project.activeItem index
Replies: 5
Views: 7202

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...
by Paul Tuersley
March 12th, 2013, 1:11 pm
Forum: Scripts Discussion
Topic: linked expression
Replies: 2
Views: 3108

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...
by Paul Tuersley
March 6th, 2013, 6:33 am
Forum: Script requests
Topic: Expression from expression?
Replies: 5
Views: 4684

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 is only nec...
by Paul Tuersley
March 4th, 2013, 4:53 pm
Forum: Script requests
Topic: Expression from expression?
Replies: 5
Views: 4684

Re: Expression from expression?

You could parseInt() the split piece of text.

parseInt(thisComp.layer("Main Text Layer").text.sourceText.split(";")[0]);
by Paul Tuersley
March 4th, 2013, 2:54 pm
Forum: Script requests
Topic: Expression from expression?
Replies: 5
Views: 4684

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...