appwiki:illustrator

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
appwiki:illustrator [2021/07/26 17:56] yingappwiki:illustrator [2021/07/26 19:49] (current) – [Problem and Solution] ying
Line 1: Line 1:
 +
 ====== Problem and Solution ====== ====== Problem and Solution ======
 +
 +  * Problem: highlight layer vs select layer in illustrator, convert highlight to selection
 +    * ref: https://graphicdesign.stackexchange.com/questions/64788/how-do-i-bulk-select-consecutive-target-layers-in-the-layers-panel-in-illustrato
 +    * script <code text 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;
 +    }
 +
 +}
 +</code>
  
   * Problem: bring sublayer to main layer list as for AfterEffects layers   * Problem: bring sublayer to main layer list as for AfterEffects layers
  • appwiki/illustrator.1627322212.txt.gz
  • Last modified: 2021/07/26 17:56
  • by ying