Forum Replies Created

Page 61 of 1278
  • You need to loop through each of the selected project items. This should do it:

    // prompt the user for input
    var Start = prompt ("Enter start time (in frames)",0);
    var Length = prompt ("How long should the work area be?", 1);

    // set an undo group so the user can revert the change if they make a mistake
    app.beginUndoGroup("Change work area in selected comps");

    // let's keep track of how many comps we modify, so we can report back at the end
    var modifiedCompCounter = 0;

    // step through each selected item in the project panel
    for (var i = 0; i < app.project.selection.length; i++) {

    // we only want to work on comps
    if (app.project.selection[i] instanceof CompItem) {
    var myComp = app.project.selection[i];
    myComp.workAreaStart = Start/myComp.frameRate;
    myComp.workAreaDuration = Length/myComp.frameRate;
    myComp.time = myComp.workAreaDuration + myComp.workAreaStart; // note the "+ myComp.workAreaStart" here -- without this, the script only sets the correct CTI position if the work area begins at 0
    modifiedCompCounter++; // increase our changed comp counter
    }
    }
    // write the number of comps we changed to the Info panel
    writeLn("Modified work area in " + modifiedCompCounter + " comp(s).");
    // close the undo group
    app.endUndoGroup();

    I’ve added a few good practices: some comments so it’s easy to tell what’s going on, a check to make sure we only try to modify comps, an Undo group so the user can change their minds after they use the script, and a little Info panel notification about the change.

    Please do ask questions on anything that isn’t clear. I’d be happy to help.

    Walter Soyka
    Designer & Mad Scientist at Keen Live [link]
    Motion Graphics, Widescreen Events, Presentation Design, and Consulting
    @keenlive   |   RenderBreak [blog]   |   Profile [LinkedIn]

  • You could use sampleImage() in an expression to drive the Fill color.

    As always, Dan Ebberts illuminates:
    https://www.motionscript.com/design-guide/sample-image.html

    Walter Soyka
    Designer & Mad Scientist at Keen Live [link]
    Motion Graphics, Widescreen Events, Presentation Design, and Consulting
    @keenlive   |   RenderBreak [blog]   |   Profile [LinkedIn]

  • Walter Soyka

    September 26, 2019 at 7:54 pm in reply to: adobe won’t launch

    I doubt anyone is testing CS5 (from 2011) with Mojave. If resetting your preferences or logging out and logging in via the Creative Cloud application doesn’t work, I do think staying on an older OS to run older software would be advisable.

    Walter Soyka
    Designer & Mad Scientist at Keen Live [link]
    Motion Graphics, Widescreen Events, Presentation Design, and Consulting
    @keenlive   |   RenderBreak [blog]   |   Profile [LinkedIn]

  • Walter Soyka

    September 26, 2019 at 5:00 pm in reply to: Create a 3D line that travels on the z space

    There’s not a great built-in way to do this, but there’s a good third-party plugin:
    https://www.redgiant.com/products/trapcode-3d-stroke/

    Walter Soyka
    Designer & Mad Scientist at Keen Live [link]
    Motion Graphics, Widescreen Events, Presentation Design, and Consulting
    @keenlive   |   RenderBreak [blog]   |   Profile [LinkedIn]

  • Walter Soyka

    September 25, 2019 at 7:42 pm in reply to: A MOGRT of infinite duration?

    Maybe you could do it with a Media Encoder preset that adds an image overlay as an effect?

    I do think that providing a still and instructions — even a quickie 15-second tutorial on the process — would be the most fool-proof in the long run, though.

    Walter Soyka
    Designer & Mad Scientist at Keen Live [link]
    Motion Graphics, Widescreen Events, Presentation Design, and Consulting
    @keenlive   |   RenderBreak [blog]   |   Profile [LinkedIn]

  • Walter Soyka

    September 25, 2019 at 4:50 pm in reply to: 3D renderer issues in CC19

    Looks like z-fighting:
    https://en.wikipedia.org/wiki/Z-fighting

    Do you have several layers that are all overlapping at the same depth?

    Walter Soyka
    Designer & Mad Scientist at Keen Live [link]
    Motion Graphics, Widescreen Events, Presentation Design, and Consulting
    @keenlive   |   RenderBreak [blog]   |   Profile [LinkedIn]

  • Walter Soyka

    September 20, 2019 at 9:04 pm in reply to: Duplicate layer without changing name

    You could do this with a script.

    Save this code as “01-duplicateLayerPreserveName.jsx” in your Scripts folder. (The number is important to force it to the top of the list, alphabetically, so we can assign a keyboard shortcut to it later.)

    // duplicate selected layers and rename dupes to match originals exactly

    app.beginUndoGroup("Duplicate selected layers and preserve exact names");

    if (app.project.activeItem instanceof CompItem) {
    var renamedLayerCount = 0;
    for (var i = 0; i < app.project.activeItem.selectedLayers.length; i++) {
    try {
    var originalLayer = app.project.activeItem.selectedLayers[i];
    var newLayer = originalLayer.duplicate();
    newLayer.name = originalLayer.name;
    renamedLayerCount++;
    } catch (err) {};
    }
    writeLn("Renamed " + renamedLayerCount + " layer(s).");
    }

    app.endUndoGroup();

    Reload Ae, then Edit > Keyboard Shortcuts. Search the command list for “script” and find the “01-duplicateLayerPreserveName” entry. Assign it a keyboard shortcut, and then you can easily rename layers without incrementing their names. (Note that this can cause unexpected results if you’re using expressions that refer to layers by name!)

    Walter Soyka
    Designer & Mad Scientist at Keen Live [link]
    Motion Graphics, Widescreen Events, Presentation Design, and Consulting
    @keenlive   |   RenderBreak [blog]   |   Profile [LinkedIn]

  • It might be “z-fighting.”

    https://en.wikipedia.org/wiki/Z-fighting

    Do you have multiple 3D layers at the same depth?

    Walter Soyka
    Designer & Mad Scientist at Keen Live [link]
    Motion Graphics, Widescreen Events, Presentation Design, and Consulting
    @keenlive   |   RenderBreak [blog]   |   Profile [LinkedIn]

  • Walter Soyka

    September 20, 2019 at 6:19 pm in reply to: Using the layer name within an expression

    You don’t need the quotes at all. They just tell JavaScript that you’re passing a string literal. When you create your txt1 and txt2 variables, they’re already strings as far as the expression engine is concerned.

    txt1 = thisLayer.name;
    txt2 = thisLayer.name + " 0";
    thisComp.layer("csv test - Sheet1.csv")("Data")("Outline")(txt1)(txt2)

    Walter Soyka
    Designer & Mad Scientist at Keen Live [link]
    Motion Graphics, Widescreen Events, Presentation Design, and Consulting
    @keenlive   |   RenderBreak [blog]   |   Profile [LinkedIn]

  • Walter Soyka

    September 20, 2019 at 10:42 am in reply to: scripting: looking for a few hidden command IDs

    I’ve used app.findMenuCommandId(), too, but it has a couple of important limitations:
    1) It only works on menu commands.
    2) It is dependent on your localized language.

    Your feature request has my vote!

    Walter Soyka
    Designer & Mad Scientist at Keen Live [link]
    Motion Graphics, Widescreen Events, Presentation Design, and Consulting
    @keenlive   |   RenderBreak [blog]   |   Profile [LinkedIn]

Page 61 of 1278

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy