Forum Replies Created

Page 52 of 55
  • Tomas Bumbulevičius

    March 14, 2019 at 8:32 pm in reply to: Comp And Layer Replacement Script

    Thomas,

    thanks for your input. Are you working with the same structured .aep as in attached screenshots? If more complex, what layers are inside ‘REPLACED_X’ comps? I assume, there are either texts or shapes, and they do not have that ‘source’ attribute we are accessing now. Is this is correct assumption?

    Find out more:
    After Effects Tutorials: motion design, expressions, scripting.

  • Tomas Bumbulevičius

    March 14, 2019 at 5:42 pm in reply to: Comp And Layer Replacement Script

    Thomas,

    I might have great news for you – the code you were using was only a single line incorrect ! Try below. Added few extra variables just to make this more debuggable to troubleshoot.

    Anyways, the reason why it did not behaved properly at first, is because layer inside the comp is no longer ‘CompItem’ type. I solved this by checking its source type instead as curLayer.source.typeName == “Composition”.

    See if it works as expected or any other adjustments might be needed.

    Cheers!

    function getComp(theName){
    for (var i = 1; i <= app.project.numItems; i++){
    if ((app.project.item(i) instanceof CompItem) && (app.project.item(i).name == theName)){
    return app.project.item(i);
    }
    }
    return null;
    }

    function main(){

    var newComp;
    var newCompName;

    for (var i = 1; i<= app.project.numItems; i++) {
    var curItem = app.project.item(i);
    if (curItem instanceof CompItem) {
    for (var l = 1; l <= app.project.item(i).numLayers; l++){
    var curLayer = app.project.item(i).layer(l);
    if (curLayer.source.typeName == "Composition") {
    newCompName = app.project.item(i).layer(l).name.split("OLD")[0] + "NEW";
    newComp = getComp(newCompName);
    if (newComp == null){
    alert ("Can't find comp '" + newCompName + "'");
    return;
    }
    curLayer.replaceSource(newComp,false);
    }
    }
    }
    }

    }

    app.beginUndoGroup("Replace")

    main();

    app.endUndoGroup();

    Find out more:
    After Effects Tutorials: motion design, expressions, scripting.

  • Tomas Bumbulevičius

    March 14, 2019 at 5:34 pm in reply to: Expression that recognises 2 lines of text

    This solution should solve your issue 100%. Apply your text to the layer visible at the center and make corrections in the ‘control’ null effects. This will place text from the bottom center and will grow upwards.

    There is also a delay applied, so just remove it from shape layers if not needed.

    If any questions occurs – just let me know, haven’t used it for a while, but its solely my developed solution for such purposes. A bit too complex and slow, but it helped me a lot.

    13203_textboxes1to4lines.aep.zip

    Find out more:
    After Effects Tutorials: motion design, expressions, scripting.

  • Tomas Bumbulevičius

    March 14, 2019 at 5:10 pm in reply to: Comp And Layer Replacement Script

    Hey Thomas,

    in a real life scenario – would it be known which folder contains OLD comps and which – NEW ones? Can those names be set as default and both of them stay constant? If yes, I think it would make sense to do it this way:

    1. Retrieve OLD folder content;
    2. Retrieve NEW folder content;
    3. Then go through COMPS folders and check for specific layers (comp type), and search are both versions of them exists in folders. If yes – initiate replacement.

    If this sounds like a plan, I could look into it further. Cheers!

    Find out more:
    After Effects Tutorials: motion design, expressions, scripting.

  • Thats more clearer – but:
    1. What do you plan to do if one text exceed the length of the other?
    2. Is it possible (not against the brand guidelines) to scale the text down?

    Let say, main title is 10chars long, all caps, while subject at the bottom – 40 chars. With original logic – its a strong ‘no’ through my perspective. Based on answers to questions above, we could nail down a solution 🙂

    Find out more:
    After Effects Tutorials: motion design, expressions, scripting.

  • Do you really want to limit/control one’s string characters amount by the other? Seems like situation, where text will be cut down, possibly, without a proper meaning.

    Not sure what your ultimate goal is, but scaling one text towards the other’s width might be another option to consider.

    Find out more:
    After Effects Tutorials: motion design, expressions, scripting.

  • Try appending your replace part with \x03. It should help to finalise all breaks scenarios.

    Find out more:
    After Effects Tutorials: motion design, expressions, scripting.

  • Maybe other guys can say something more about the GPU – but I haven’t experienced major differences about it (in the end, you can inspect how much GPU load is during any GUI tasks – its close to none utilisation).

    As for the Preview Panel – once you set ‘Skip’ value to (5), you should get such ‘Preview bar’ in the timeline, where greens are every 5th frame processed. Meaning, you can have better performance (of course, a bit of jerkyness will appear), but at least preview moves! This is helpful for extreme situations, to get things going.

    In case you can’t see Preview panel, just reach in the top bar to ‘Window > Preview’ and select it. Preview panel will appear in the dock somewhere top right, most likely.

    P.S. CPU you have is great.

    Find out more:
    After Effects Tutorials: motion design, expressions, scripting.

  • Tomas Bumbulevičius

    March 3, 2019 at 7:37 pm in reply to: Hardware upgrades for increased speed?

    Dave,

    I can’t comment on this too much whether it fails or not, but 4 years ago I had i5 2500k, overclocked to 4.2Ghz. Didn’t faced any issues, haven’t troubleshooted anything in particular on this topic.

    Its like with everything – you must know the boundaries from which point the risk is not worth coping with. While there are guides which allows clocking speed to 4.7-5Ghz for 2500k – haven’t tried it myself.

    Find out more:
    After Effects Tutorials: motion design, expressions, scripting.

  • Tomas Bumbulevičius

    March 3, 2019 at 10:37 am in reply to: How to Speed Up After Effects (and scripts)

    Hey Nick,

    knowing more of your setup would help. However, considering that you currently have only 16GB, I have a guess that the motherboard most likely won’t support anything more than 32GB. Which nowadays, is probably the smallest amount you should ever consider.

    Anyways, please clarify what else do you have under the hood – full specs.

    Lastly, when working with any expression-driven 3rd party scripts, try to set ‘Preview’ panel, to ‘Skip’ 5 frames when previewing. During intermediate steps of animation, you will be able to get a bigger picture without clogging your preview instantly. Thats a workaround for previewing in some cases.

    Find out more:
    After Effects Tutorials: motion design, expressions, scripting.

Page 52 of 55

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