Forum Replies Created

Page 11 of 24
  • Unless I’m really not understanding it, it is simply.

    thisComp.layer(“Speed Dial”).rotation + 10;

    If it’s suppose to do a percentage thing, then.

    r = thisComp.layer(“Speed Dial”).rotation;

    r + percentage of r

  • Apologies as I don’t quite understand what you are trying to do.

    But I can tell you that

    this_comp.layer should be written as thisComp.layer

  • I am an idiot. I thought I had done it the way you had suggested and realised my

    myComp.layers.add(imp);

    was sat under the shape layer. So no matter how many times I was moving the other half up and under the add shape. It was never going to fix it.

    Plus it didn’t help in my head that it adds it too the top, which makes absolute sense.

    layer 1

    layer1
    layer2(previously layer1)

    Thank you

  • Not the way I want to do it, but if anyone has a better idea. This is how I’ve gotten around it.

    myComp.layers[2].moveBefore(myComp.layer(1));

  • Scott Mcgee

    August 3, 2018 at 10:27 am in reply to: Png problem in script GUI on Mac computer

    Hey Andrei,

    I’m on Mac and use .png’s on my most recent scripts. They work fine.

  • Scott Mcgee

    August 2, 2018 at 3:47 pm in reply to: selectLayers script

    That is much tidier than what I have and makes a lot more sense.

    Mine still works, but I’ll adapt it to be more like yours as it looks less clunky. I think I’ve just gone an arse uppard way of doing it haha.

    cheers for the help

  • Scott Mcgee

    August 2, 2018 at 12:13 pm in reply to: selectLayers script

    Ignore everything I said. I can’t have deleted one little something. That’s all working. Thank you very much.

    🙂

  • Scott Mcgee

    August 2, 2018 at 12:07 pm in reply to: selectLayers script

    I say my first loop. I mean my only loop.

    But I know I need to add a second loop and that’s where I’m struggling.

  • Scott Mcgee

    August 2, 2018 at 12:06 pm in reply to: selectLayers script

    Nearly there.

    I can highlight multiple layers, but the first one I selected. Is the only one getting the fill added.

    my first loop

    for(var i = 0; i <= 3 ; i++ ){
    b[i].onClick = (function(i){

    I have 25 buttons, I couldn’t be bothered to have 25 buttons written individually. So I created a loop (Test above I did on four) which in the above case has four buttons . So that part of the loop is to recognise which button I pushed.

    I’ve assigned each button to an array. Button1 is [0] button2[1] …etc

    The issue was without (i) at the bottom of the expression, it would add the fill but would reference the array to button and add that colour.

    What I want to do now is upgrade it to select several layers. Hit the button and [i] then gets added to all. If that helps make a bit more sense.

  • I noticed an issue with your json, which was it flagging issues for me when importing it? But it was the Zone: “One” and Zone: “Two”. It appeared to not like the “”, but after deleting and retyping it let me import it.

    otherwise this worked fine for me. Also I included the part that uses the layers name to reference it so you would only need to reference the array you want [0] or [1], based on your json layer.

    txt = footage(“pitchmap.json”).sourceData;
    a = thisLayer.name;
    input = txt[0][a];

    if ( input <= 5 && input >= 0 ){
    ([0,255,210,255]/255)}
    else if ( input <= 10 && input >= 6 ){
    ([0,255,190,255]/255)}
    else if ( input <= 15 && input >= 11 ){
    ([0,255,170,255]/255)}
    else if ( input <= 20 && input >= 16 ){
    ([0,255,150,255]/255)}
    else if ( input <= 25 && input >= 21 ){
    ([232,255,0,255]/255)}
    else if ( input <= 30 && input >= 26 ){
    ([252,210,0,255]/255)
    }else{
    ([255,255,255,255]/255)};

    Don’t forget when exporting you also need to put it onto the timeline otherwise the export will come out wrong.

Page 11 of 24

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