1 Reply Latest reply on Mar 8, 2018 10:19 AM by Kukurykus

    [ActionManager] Move layer - what's the 'version' integer?

    DBarranca Level 4

      Hi,

      the (cleaned) ScriptingListener output for a moved layer is:

       

      function s2t(s) { return app.stringIDToTypeID(s); };
      
      var d1 = new ActionDescriptor();
      var r1 = new ActionReference();
      var r2 = new ActionReference();
      
      r1.putEnumerated( s2t('layer'), s2t('ordinal'), s2t('targetEnum') );
      d1.putReference( s2t('target'), r1 );
      r2.putIndex( s2t('layer'), 4 );
      d1.putReference( s2t('to'), r2 );
      d1.putBoolean( s2t('adjustment'), false );
      d1.putInteger( s2t('version'), 5 );
      executeAction( s2t('move'), d1, DialogModes.NO );
      

       

      Frankly I've never bothered with AM for moving layers before - a couple of things jump to my eyes:

      - the adjustment boolean (it was a bitmap layer so it's false)

      - the version integer

       

      Just a curiosity, but what could "version" possibly mean?

      Thanks!

       

      Davide Barranca

      ---

      www.davidebarranca.com

      www.cs-extensions.com