Forum Replies Created

  • Dinesh Salunke

    October 19, 2014 at 7:02 pm in reply to: Custom language parse, compiler

    Hello Dan,

    I am talking on the similar lines, currently I am also doing pretty much the same way you do, but its really dirty way, and i am still learning the whole coding thing.

    currently, I am using a string.contains to find keywords, then using a switch statement I am calculating and substituting the keyswords with calculated values

    this works but is surely not the best way to do it. also I want to be able to write keywords for functions for example


    /*
    Key Object which represents each keyframe in property
    */
    function Key ( args )
    {

    }

    //This functions takes care of setting the key and assigning the values
    Key.prototype.setAt = function ( property, time )
    {
    var _layer = property.propertyGroup( property.propertyDepth );
    var _comp = _layer.containingComp;

    if ( this.ValueType == undefined || this.ValueType !== property.propertyValueType )
    return 0;
    if ( this.nTimeOffset == undefined )
    return 0;

    var keyIndex = property.addKey ( time + this.nTimeOffset );
    if ( this.nValue !== undefined )
    property.setValueAtKey ( keyIndex, this.nValue );

    if ( this.Expression !== undefined || this.Expression !== "" )
    {
    var val = eval( this.Expression );
    if ( val !== undefined )
    property.setValueAtKey ( keyIndex, val );
    }
    }

    //helper function which can be called from the script to get the value of certain key frame
    function _KeyValueAt ( index )
    {

    }

    Sample Expression :

    "_keyValueAt ( -2 );"

    this expression will be evaluated in the setAt function,

    this works but I want the function to know the 3 variables
    1. property
    2. _layer
    3. _comp

    so that it can use these to calculate the values

    hope I was right to the point this time

  • Dinesh Salunke

    July 15, 2014 at 3:55 am in reply to: Disco floor with Patterns

    Its one of your expressions, from the Expressioneer’s Design Guide page on your site. I have posted it below

    target = thisComp.layer("Alpha");
    alpha = target.sampleImage(transform.position,[1,1])[3];
    linear(alpha, 0, 1, 0, 100);

  • Dinesh Salunke

    June 4, 2014 at 5:13 am in reply to: Simple Spin expression

    One way to do this would be to
    1. Attach both the comps to Null
    2. Rotate the null 360 deg, for x numbers of secs.
    3. Precomp both comps and the null, and trim it to the x secs
    4. Add Time remap with loopOut() expression to precomp and use Timewarp effect to speed up and slow down the animation.

    hope it helps.

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