Forum Replies Created

Page 10 of 33
  • Coincidentally, I was wracking my brain with a very similar problem yesterday…and hoping to find a solution to it today.

    (continuing a discussion from over a year ago….!!)
    …but, is there a way to get the number of “this group”?

    I want to do this so I can access the previous group (in the same way I’d use “index-1” to access the previous layer).

    So to get the previous group’s rectangle 1’s position, it would be something like:

    TargetGroup = thisGroup-1;
    content(TargetGroup).content("Rectangle Path 1").position

    ….thisGroup being a magical made-up function that gets the current group’s number or name.

    Any thoughts or suggestions? I’ve created an expression to get a group’s name and increase its last digit by 1:

    theOne="Group "+2;
    thisGroup=thisComp.layer("Shape Layer 1").content(theOne).name;
    thisNumber=parseInt(thisGroup.substr(-1));
    theOne=thisGroup.substr(0,thisGroup.length-1)+(thisNumber+2)

    but without being able to get the current group’s number, it’s not much use. I’m going round in circles!

    – Paul

  • Paul Roper

    November 5, 2013 at 2:19 pm in reply to: Switching Effects on & off by a Checkbox controller

    And if you also want a shade controller (I’m guessing it’s to control the lightness of the colour) you could simply add a slider whose values go from 1 to 6, call it “Lightness” and add a bit to the end of the script:

    Change the .1 and the 1 in the “linear” statement to reflect how bright/dark you want it. The “.value.toFixed(0)” ensures that only 6 levels of brightness can be selected, by rounding the value to 0 decimal places.

    idx=0;
    if (effect("reddish")("Checkbox") ==1) { idx = 1};
    if (effect("dark orange")("Checkbox") ==1) { idx = 2};
    if (effect("light orange")("Checkbox") ==1) { idx = 3};
    if (effect("yellow")("Checkbox") ==1) { idx = 4};
    if (effect("pale yellow")("Checkbox") ==1) { idx = 5};

    colors = [[255,255,255],
    [179,32,52],
    [232,73,27],
    [239,125,0],
    [252,192,67],
    [255,229,150]];
    c = colors[idx]/255;

    lightness=effect("Lightness")("Slider").value.toFixed(0);
    lightnessMultiplier= linear(lightness,1,6,.1,1);
    [c[0],c[1],c[2],1]*lightnessMultiplier

  • Paul Roper

    November 5, 2013 at 2:13 pm in reply to: Switching Effects on & off by a Checkbox controller

    A potential problem with checkboxes is that they are not mutually exclusive – what happens if more than one checkbox is on? Or if no checkboxes are on? That’s why ‘radio buttons’ were invented for interfaces.

    But having said that, here’s an adaptation of your expression using checkboxes. The first line makes sure that if none of the “if” conditions are satisfied, it will default to 0, white. The colour will be whatever the last “on” checkbox is (AE evaluates all the “if” statements, so whatever’s last will be the result).

    idx=0;
    if (effect("reddish")("Checkbox") ==1) { idx = 1};
    if (effect("dark orange")("Checkbox") ==1) { idx = 2};
    if (effect("light orange")("Checkbox") ==1) { idx = 3};
    if (effect("yellow")("Checkbox") ==1) { idx = 4};
    if (effect("pale yellow")("Checkbox") ==1) { idx = 5};

    colors = [[255,255,255],
    [179,32,52],
    [232,73,27],
    [239,125,0],
    [252,192,67],
    [255,229,150]];
    c = colors[idx]/255;
    [c[0],c[1],c[2],1]

  • Paul Roper

    November 4, 2013 at 9:44 am in reply to: Switching Effects on & off by a Checkbox controller

    Instead of a checkbox, you could add an “if it’s a text layer, then do this, if it’s a fill layer, then do that” kind of expression. This page talks about getting the type of layer:

    https://www.redefinery.com/ae/fundamentals/layers/#layers_checkiftype

    – Paul

  • Paul Roper

    November 4, 2013 at 9:31 am in reply to: Switching Effects on & off by a Checkbox controller

    You could add a Checkbox Control (I’ve called it “Script on”) to each layer, and change your script to this (this sets the colour to black [0,0,0,0] if the checkbox is off. The alpha control does nothing in the fill effect):

    if (effect("Script on")("Checkbox") == 1)
    {
    s = thisComp.layer("Colour Controls").effect("NAME Colour")("Slider");
    colors = [[255,255,255], [179,32,52], [232,73,27], [239,125,0], [252,192,67], [255,229,150]];
    idx = Math.max(Math.min(colors.length-1,Math.round(s)-1),0);
    c = colors[idx]/255;
    [c[0],c[1],c[2],1]
    }
    else
    {
    [0,0,0,0]
    }

  • Paul Roper

    November 4, 2013 at 9:07 am in reply to: After Effects ONLY USES 1 CORE for on fly render

    …and to continue on Ridley’s post, could you try converting the JPEG to an uncompressed format, such as a native Photoshop document or an uncompressed TIFF and replacing it in the AE project? That way, AE wouldn’t have to load the image from disk and decompress it for each frame. Maybe it only does this once and stores the decompressed image – I’m not sure.

    Maybe you just don’t have enough RAM per processor – AE must decompress whatever image you have, and according to Photoshop, a 20,000 x 20,000 pixel RGB image is 1.12GB. I don’t know how AE’s memory internals work, but I wouldn’t be surprised if it would need 1.12GB to store the original image, another 1.12GB to process the frame, and another 1.12GB to store the finished frame. Working with that size image, I’d be tempted to set the memory per processor up to 6GB…or turn multiprocessing off.

    – Paul

  • Paul Roper

    November 4, 2013 at 9:00 am in reply to: Easter egg(s) in After Effects CC?

    Yeah, I’d already found that one…not as cool as the 20th anniversary CS6 one with the TV at the end. I’m sure there must be some others somewhere!

    – Paul

  • Paul Roper

    October 3, 2013 at 2:11 pm in reply to: If I drag anything off-screen, it accelerates wildly

    I think my Mac is just uniquely flaky and unreliable. Lucky me!

    Maybe C4D 15 will fix it when I upgrade.

    – Paul

  • Paul Roper

    October 3, 2013 at 1:55 pm in reply to: If I drag anything off-screen, it accelerates wildly

    I sent a bug report, but heard nothing back.

    – Paul

  • Paul Roper

    October 3, 2013 at 11:05 am in reply to: If I drag anything off-screen, it accelerates wildly

    …in fact, the dragging of numbers thing happens even if I don’t drag the pointer off-screen – I can scrub a value up, then drag the mouse back down, but the value will continue to go up, regardless of the direction I drag the mouse. Very odd.

Page 10 of 33

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