appwiki:illustrator

Problem and Solution

  • Problem: highlight layer vs select layer in illustrator, convert highlight to selection
    • script
      renameLayers2.jsx
      // rename unlocked layers with prefix
      /*
      by ying
      v0.1: (2021.07.27)
        * build
      */
      #target "Illustrator";
      // 1. lock other first
      total_all = app.activeDocument.layers.length;
      alert(total_all); // top layers
      // 2. get unlock layer list
      highlight_list = [];
      for (i = 0; i < total_all; i++) {
          if (app.activeDocument.layers[i].locked == false) highlight_list.push(app.activeDocument.layers[i]);
      }
      total = highlight_list.length;
      alert(total);
      // 3. get prefix name
      var newName = prompt('What is the prefix? -- Shining Camera', 'New Prefix');
      if (newName) {
          // 4. rename action
          for (i = 0; i < total; i++) {
            t_layer = highlight_list[i];
            t_layer.name = newName+'_'+i;
          }
          // 5. unlock all after done
          total_all = app.activeDocument.layers.length;
          for (i = 0; i < total_all; i++) {
              if (app.activeDocument.layers[i].locked == true) app.activeDocument.layers[i].locked = false;
          }
       
      }
  • Problem: bring sublayer to main layer list as for AfterEffects layers
    • Solution: check top layer containing those sublayer, under layer panel, choose Release to Layer (sequence), so each take its own layer
    • (sequence) meas like image sequence, each sublayer as a frame of sequence
    • (build) means like image build sequence, each sublayer as a part of growing objects, so first new main layer is 1 obj, 2nd has 2 objects, and so on, the last one has all objects.
  • appwiki/illustrator.txt
  • Last modified: 2021/07/26 19:49
  • by ying