Forum Replies Created

Page 1 of 2
  • Billy Sides

    January 3, 2018 at 6:15 pm in reply to: Extendscript – Adding a vector shape to a group.

    I figured out how to add the paths to the groups, but now I’m stuck on how to access the correct group.
    I can’t figure out where to put the name or index of the group I’m trying to access. The way the code is now the first group is the one being modified. Any help or direction would greatly be appreciated.

    var sVerts= [[-4.66796875,-4.614013671875],[-4.66796875,-1.584716796875],[4.701171875,-1.584716796875],[8.44921875,1.823486328125],[8.44921875,3.798095703125],[4.701171875,7.206298828125],[-4.66796875,7.206298828125],[-8.44921875,3.798095703125],[-8.44921875,3.387939453125],[-5.3125,2.809814453125],[-5.3125,4.512939453125],[5.283203125,4.512939453125],[5.283203125,1.208251953125],[-4.048828125,1.208251953125],[-7.833984375,-2.199462890625],[-7.833984375,-3.797607421875],[-4.048828125,-7.206298828125],[4.498046875,-7.206298828125],[8.283203125,-4.072998046875],[8.283203125,-3.729248046875],[5.248046875,-3.082275390625],[5.248046875,-4.614013671875]];
    var sITans= [[0,0],[0,0],[0,0],[0,-2.7265625],[0,0],[2.86328125,0],[0,0],[0,2.693359375],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,2.728515625],[0,0],[-2.83203125,0],[0,0],[0,-2.51806640625],[0,0],[0,0],[0,0]];
    var sOTans = [[0,0],[0,0],[2.86328125,0],[0,0],[0,2.693359375],[0,0],[-2.859375,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[-2.83203125,0],[0,0],[0,-2.73095703125],[0,0],[2.658203125,0],[0,0],[0,0],[0,0],[0,0]];
    logoShapeLayer = activeItem.layers.addShape();
    logoShapeLayer.name="Logo";

    var sShape = new Shape();
    sShape.vertices = sVerts;
    sShape.inTangents = sITans;
    sShape.outTangents = sOTans;
    sShape.closed = true;

    var sShapeGroup = logoShapeLayer.property("Contents").addProperty("ADBE Vector Group").property("Contents").addProperty("ADBE Vector Shape - Group");
    //var sSapeGroupIndex = sShapeGroup.propertyIndex;
    sShapeGroup.name="S";
    sShapeGroup.property("ADBE Vector Shape").setValue(sShape);
    sShapeGroup = logoShapeLayer.property("Contents").property("ADBE Vector Group");
    sShapeGroup.name="S";
    sShapeGroup.property("ADBE Vector Transform Group").property("ADBE Vector Position").expression = "[178.6709,7.2063]";

    var cVerts= [[-4.7529296875,-4.545166015625],[-4.7529296875,4.444580078125],[4.7158203125,4.444580078125],[4.7158203125,1.382080078125],[8.2646484375,2.094970703125],[8.2646484375,3.798095703125],[4.4755859375,7.206298828125],[-4.5146484375,7.206298828125],[-8.2646484375,3.798095703125],[-8.2646484375,-3.797607421875],[-4.5146484375,-7.206298828125],[4.4755859375,-7.206298828125],[8.2646484375,-3.797607421875],[8.2646484375,-2.401611328125],[4.7158203125,-1.893798828125],[4.7158203125,-4.545166015625]];
    var cITans= [[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[2.8671875,0],[0,0],[0,2.66015625],[0,0],[-2.86328125,0],[0,0],[0,-2.73095703125],[0,0],[0,0],[0,0]];
    var cOTans = [[0,0],[0,0],[0,0],[0,0],[0,0],[0,2.693359375],[0,0],[-2.896484375,0],[0,0],[0,-2.693359375],[0,0],[2.8671875,0],[0,0],[0,0],[0,0],[0,0]];

    var cShape = new Shape();
    cShape.vertices = cVerts;
    cShape.inTangents = cITans;
    cShape.outTangents = cOTans;
    cShape.closed = true;

    var cShapeGroup = logoShapeLayer.property("Contents").addProperty("ADBE Vector Group").property("Contents").addProperty("ADBE Vector Shape - Group");
    //var cSapeGroupIndex = cShapeGroup.propertyIndex;
    cShapeGroup.name="C";
    cShapeGroup.property("ADBE Vector Shape").setValue(cShape);
    cShapeGroup = logoShapeLayer.property("Contents").property("ADBE Vector Group");
    cShapeGroup.name="C";
    cShapeGroup.property("ADBE Vector Transform Group").property("ADBE Vector Position").expression = "[158.6709,7.2063]";

    -bsides

  • Billy Sides

    December 13, 2017 at 7:38 pm in reply to: Shape layer property customization via ExtendScript

    Does anyone know how to put this path in a group object so I can transform it with the group transforms. I’m trying to set the position of it.

    var sVerts= [[-4.66796875,-4.614013671875],[-4.66796875,-1.584716796875],[4.701171875,-1.584716796875],[8.44921875,1.823486328125],[8.44921875,3.798095703125],[4.701171875,7.206298828125],[-4.66796875,7.206298828125],[-8.44921875,3.798095703125],[-8.44921875,3.387939453125],[-5.3125,2.809814453125],[-5.3125,4.512939453125],[5.283203125,4.512939453125],[5.283203125,1.208251953125],[-4.048828125,1.208251953125],[-7.833984375,-2.199462890625],[-7.833984375,-3.797607421875],[-4.048828125,-7.206298828125],[4.498046875,-7.206298828125],[8.283203125,-4.072998046875],[8.283203125,-3.729248046875],[5.248046875,-3.082275390625],[5.248046875,-4.614013671875]];
    var sITans= [[0,0],[0,0],[0,0],[0,-2.7265625],[0,0],[2.86328125,0],[0,0],[0,2.693359375],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,2.728515625],[0,0],[-2.83203125,0],[0,0],[0,-2.51806640625],[0,0],[0,0],[0,0]];
    var sOTans = [];
    logoShapeLayer = activeItem.layers.addShape();
    logoShapeLayer.name="S Path";
    sShapeGroup = logoShapeLayer.property("ADBE Root Vectors Group");
    sShapeGroup.addProperty("ADBE Vector Shape - Group");
    logoShapeGroup.addProperty("ADBE Vector Graphic - Fill");

    var sShape = new Shape();
    sShape.vertices = sVerts;
    sShape.inTangents = sITans;
    sShape.outTangents = sOTans;
    sShape.closed = true;

    sShapeGroup.property(1).property("ADBE Vector Shape").setValue(sShape);

    -bsides

  • Billy Sides

    November 18, 2016 at 9:20 pm in reply to: Creating a Dropdown Menu Expression Control Plugin.

    The Layer Control effect works correctly if you add .name to the end like so:
    thisComp.layer("ColorCTRL").effect("Layer Control")("Layer").name
    But doing it this way you have to have a layer in your composition, and the layer control can’t be key framed.

    Unfortunately, when you do the exact same thing with the Popup menu, you get the name of the menu.
    thisComp.layer("ColorCTRL").effect("Cusotm Effect")("Popup").name
    This returns “Popup” – not sure why anyone would ever want the name of the menu.

    -bsides

  • Billy Sides

    November 16, 2016 at 11:52 pm in reply to: Creating a Dropdown Menu Expression Control Plugin.

    I found a clean way to script it for now, but still hoping there is a way to pull the actual value instead of redefining what is in the drop down.

    Here’s a one line example.
    textColor = ( {1: "RED",2: "YELLOW",3: "GREEN",4: "BLUE"} )[thisComp.layer("ColorCTRL").effect("Cusotm Effect")("Popup").value];

    -bsides

  • Billy Sides

    November 16, 2016 at 7:09 pm in reply to: Creating a Dropdown Menu Expression Control Plugin.

    Using the batchframe method works great, I just have one small question.

    How do I access the actual value of the dropdown instead of the currently selected index?
    ie… the dropdown reads: RED,YELLOW,BLUE,GREEN

    But when pickwiped to a text layers source it returns. 1,2,3,4 instead of the value. I have tried adding .name .value etc… with no luck. Any ideas how to pull out the actual value?

    Pseudo Effect Code: 10802_dropdowntest.txt.zip

    Just add the code in the text file to your PressetEffects.xml file found here: C:\Program Files\Adobe\Adobe After Effects CS6\Support Files

    Then create a comp in AE and add a null and select it. Then in the File menu select Scripts/Open Script Editor and paste in this code and press the green play button:
    app.project.activeItem.layer(1).effect.addProperty("ColorSwap")

    You can close that window without saving, and the Pseudo Effect should be added to your selected layer.

    Try it out, and let me know if you can find a solution to pull out the actual value instead of the index value.

    Thanks,

    -bsides

  • Billy Sides

    August 3, 2015 at 5:35 pm in reply to: 3d Point Control

    On a side note, do you happen to know the xml entry for a 3d Point Control?

    A 2d Point Control looks like this:
    Point name="$$$/AE/Preset/Point1=Point 1" default_x="0" default_y="0"
    Also where you were able to find that information would be helpful too.

    -bsides

  • Billy Sides

    May 2, 2014 at 8:13 am in reply to: Extendscript How Tos

    Yup it is, this is just the function called when I click a button.

    Basically what I’m trying to accomplish is setting the text layers base value as 0, but each time it has to have a unique variable so I can change it later. Or I can just call to get the texts value, but from what I’ve read it doesn’t just return the string. Thought maybe there was an easier way.

    -bsides

  • Billy Sides

    May 2, 2014 at 5:51 am in reply to: Extendscript How Tos

    Thanks Dan!

    Ok here’s my next issue:

    I want to increment a variable each time a button is clicked and set its value to 0. My brain says this will work…but nope.


    function onButtonClick()
    {
    i++;
    var newVariable[i] = 0;
    }

    I’ve tried several variants of this with no luck.
    Any help is appreciated.

    Thanks!

    -bsides

  • Billy Sides

    April 30, 2014 at 4:29 pm in reply to: Selecting a layer using Extendscript

    Thank you for the quick response Xavier, that worked perfectly.
    What document were you able to pull that from if any? I have the scripting guide and it doesn’t include that.

    Thanks again for the help.

    -bsides

  • Billy Sides

    April 30, 2014 at 3:39 pm in reply to: Selecting a layer using Extendscript

    On a side note, how do you make sure there is nothing selected?
    I’m trying this, but it’s not deselecting anything.

    app.project.activeItem.selectedLayers.selected = false;

    -bsides

Page 1 of 2

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