Forum Replies Created

  • Nevermind, I managed to get this syntax to work. Feel free to close.

  • Worked like a charm, you’re a king among men Dan.
    If you don’t mind me asking, what was the problem? It just needed to be assigned to a variable?

  • Sorry, it’s actually a script. On button click I create a solid, add particle world to it, then import a png file, add it to the composition, and then I’d like to hide it. I believe the reference to the .png by the time it reaches the composition is myComp. But I’m unable to disable it.

  • Hey Dan, I’m currently having a problem and I can’t get this expression to work. My syntax is:


    var path = "~/Desktop/fireball.png";

    var io = new ImportOptions(File(path));

    if (io.canImportAs(ImportAsType.FOOTAGE)){
    io.importAs = ImportAsType.FOOTAGE;
    io.sequence = false;
    io.forceAlphabetical = true;

    var sequence = app.project.importFile(io);
    sequence.name = "importA";
    }

    var myComp = null; // assume the worst
    for (var i = 1; i <= app.project.numItems; i++){
    if ((app.project.item(i).name == "importA")){
    myComp = app.project.item(i);
    break;
    }
    }
    if (myComp != null){
    app.project.activeItem.layers.add(myComp);

    }

    no matter where I put the expression to disable the layer, it doesn’t seem to do it’s job. Any ideas? Thanks.

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