Forum Replies Created

Page 11 of 11
  • Miguel De mendoza

    September 4, 2015 at 11:00 am in reply to: Mutual recursion: this.function is undefined. error.

    I try to explain:
    All my projects start with the same configuration: lots of scenes, vectors and images that need to be precomposed, organized and linked to their own controllers on the top level comps. The footage is organized in their respective folders on my system, so I want to automatically import the project structure from footage folder and create the comps and controls I need, based on that structure and a code system in the footage names (ie: 1.1-Plane_One-Planes.eps, 2.3-Building_B-City_One.png,…), and put all comps in the correct folder on the project.

    That said, one of the common tasks I have to do is to walk over several tree structures: folders, Project ítems, layers and properties, and my idea was to make a prototype of recurisive function to do the walk, and adapt it for each access type.

    I hope it is understandable XD

  • I see. Thanks for help again Xavier!. I changed ‘this’ for ‘Spider’ and don’t give me the error, but now seems that the crawl function overwrites itself on the stack on each new call, and don’t return to the ‘upper level’. I come from C++ and I don’t understand how a function can loose his scope inside an object, so I think I need to review scopes in JavaScript :/

  • Miguel De mendoza

    September 3, 2015 at 8:43 am in reply to: animate between keyframes using marker

    if you isolate the animation components: text, photos, cards on diferent comps you can make separated animations for each one and the mix animations in the main comp.

  • Miguel De mendoza

    September 3, 2015 at 8:38 am in reply to: Remove all fills in a shape layer?

    For acomplish that you need to edit removeFill() function to be recursive, in pseudo pseudo-code something like this:

    function removeFill(node):
    if node[i].numProperties > 0 do->
    for nodes in node do->
    if node[i] is shape do-> remove fill
    else if do -> removeFill(node[i])

    removeFill(contents)

    For sure you will need to work on it, because accesing properties on shape layer can be tricky. I recomend you to make a “prototype layer” with saveral shapes on diferent levels(as messy as you can to check the “worst case”) and start accesing manualy to each property by index to see the structure .

  • Miguel De mendoza

    September 2, 2015 at 8:41 pm in reply to: Remove all fills in a shape layer?

    Try this:

    var proj = app.project;
    var layer = proj.activeItem.selectedLayers[0];
    var contents = layer.property("ADBE Root Vectors Group");

    function removeFill(){
    if(!layer || !(layer instanceof ShapeLayer)){
    alert("Select a shape layer");
    return;
    }
    for(i = 1; i <= contents.numProperties ; i++){
    var shape = contents.property(i).property("Contents");
    if(shape.property("ADBE Vector Graphic - Fill")){
    shape.property("ADBE Vector Graphic - Fill").remove();
    }
    }
    }

    removeFill();

  • Miguel De mendoza

    September 2, 2015 at 7:46 pm in reply to: animate between keyframes using marker

    Check this: https://motionscript.com/design-guide/marker-sync.html. You will have to set each forward/back animation inside de animation comp.

  • It works perfect, very very usefull for the complex camera rigging I’m trying to achieve. Lots of thanks!

    I had to make an edit on the first if/else statment on k value assignement:

    k = marker.nearestKey(time).index;
    //Instead of:
    k = marker.nearestkeyIndex(time);

  • This is what I was looking for. It Works perfect for me. Thanks!

Page 11 of 11

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