Forum Replies Created

Page 2 of 2
  • Terje Lundgren

    October 22, 2015 at 2:21 pm in reply to: Color Array on Fill effect assigned to Slider

    no luck in preventing the expression to break with the code below.

    value = colors[sliderValue];

    if (sliderValue > colors.length)
    value = [0/255,0/255,0/255,1]
    if (sliderValue < 0)
    value = [0/255,0/255,0/255,1]

    /Terje

  • Terje Lundgren

    October 22, 2015 at 1:56 pm in reply to: Color Array on Fill effect assigned to Slider

    Oh.. You are right. Thanks. There was a “)” too many in the code as well. Updated below in case someone wants to use it.

    However, this expression is very picky and breaks if the sliderValue goes out of range.

    Is there a way to prevent that?

    colors = [[0/255,0/255,0/255,255/255],[128255,128/255,129/255,255/255],[114/255,25/222,26/255,255/255],[12/255,62/255,0/255,255/255]]; //etc...
    sliderValue = Math.floor(comp("mainComp").layer("COLOR_ADJUSTMENT").effect("Slider Control")("Slider"));
    value = colors[sliderValue];

    /Terje

  • Terje Lundgren

    October 10, 2015 at 8:53 pm in reply to: Nudge frames in scripting

    Thanks Dan. Finally, I think the penny dropped on how to move about in the timeline with frame accuracy.

    var myComp = app.project.activeItem;
    var t = myComp.frameDuration;
    var myLayer = app.project.item(3).layer("Black Solid 1");
    myComp.time = myLayer.startTime;
    var goTo = parseFloat(prompt("Go to frame"));
    myComp.time = myComp.frameDuration*goTo;
    alert(myComp.time);

    /Terje

  • Terje Lundgren

    November 5, 2007 at 8:15 pm in reply to: Copy and paste keyframes from multiple layers

    Thanks for the fast replies.

    One solution I have figured out is to create all reference keyframes in ie the first 100 frames of the composition. (Render will then start at frame 101).

    If I create new keyframes on the neighbouring frame by clicking the “diamond” for all layers, I can then drag all these new keyframes to the desired position. However, if it is a lenghty composition, navigating back and forth is still time consuming. The neighbouring frame are also in most cases an inbetween.

    I will dig into the scripting solution.

Page 2 of 2

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