Script: rename layers?
Hi, is there a quick way how to renumber or batch rename all layers in a file so they would be named in consequent numbers? Doesn't have to start from exact number, I was wondering if maybe there is some sort of script that would help me with that? Thanks Pavel
Thank you for the script. It is very useful.
Could you help me with one thing? If I want to add letters "ca" in front of the number, where should I add "ca" and how to do that?
The present script is 1, 2, 3, 4... on each layer.
I want the script to be ca1, ca2, ca3, ca4... on each layer.
Please help me out.
Similar Messages
-
Latest PS CC, generator bug when renaming layers
OS: Win7 64bit
Problem:
I can't rename layers while photshop is generating assets. I have a big web layout PSD file with hundrets of layers, 74 of them are named so PS generates them as assets. When "Generate Assets" is checked, photoshop aborts every attempt to rename any layer by itself and writes a "color change" to the protocol.
I uploaded a gif file to illustrate what is happening: https://i.imgur.com/u3vBFje.gif
On the left is my layers pallet, on the right is the protocol panel. Everytime I double click to rename a layer, the edit is aborted and the protocol shows "color change".
This bug is immensely frustrating, since the only workaround is to wait some time until photoshop has finished generating the assets. When I uncheck "Generate Assets", the bug appears as well, since photoshop deletes all the assets in the folder.
I noticed that the same bug appears when you use the "Remote connection" feature, everytime photoshop sends an update to a remotely connected device, the layer naming is aborted. Maybe these bugs are related, you guys should check for that.
Thanks and kind regardssystem info dump:
Adobe Photoshop Version: 14.2.1 (14.2.1 20140207.r.570 2014/02/07:23:00:00) x64
Operating System: Windows 7 64-bit
Version: 6.1 Service Pack 1
System architecture: Intel CPU Family:6, Model:10, Stepping:7 with MMX, SSE Integer, SSE FP, SSE2, SSE3, SSE4.1, SSE4.2, HyperThreading
Physical processor count: 4
Logical processor count: 8
Processor speed: 3411 MHz
Built-in memory: 16288 MB
Free memory: 1935 MB
Memory available to Photoshop: 14614 MB
Memory used by Photoshop: 70 %
Image tile size: 1024K
Image cache levels: 4
Font Preview: Medium
TextComposer: Latin
Display: 1
Display Bounds: top=0, left=0, bottom=1080, right=1920
Display: 2
Display Bounds: top=-136, left=3840, bottom=944, right=5760
Display: 3
Display Bounds: top=0, left=1920, bottom=1200, right=3840
OpenGL Drawing: Enabled.
OpenGL Allow Old GPUs: Not Detected.
OpenGL Drawing Mode: Advanced
OpenGL Allow Normal Mode: True.
OpenGL Allow Advanced Mode: True.
AIFCoreInitialized=1
AIFOGLInitialized=1
OGLContextCreated=1
NumGPUs=1
gpu[0].OGLVersion="3.0"
gpu[0].MemoryMB=2048
gpu[0].RectTextureSize=16384
gpu[0].Renderer="GeForce GTX 660/PCIe/SSE2"
gpu[0].RendererID=4544
gpu[0].Vendor="NVIDIA Corporation"
gpu[0].VendorID=4318
gpu[0].HasNPOTSupport=1
gpu[0].DriverVersion="9.18.13.4475"
gpu[0].Driver="nvd3dumx.dll,nvwgf2umx.dll,nvwgf2umx.dll,nvd3dum,nvwgf2um,nvwgf2um"
gpu[0].DriverDate="20141112000000.000000-000"
gpu[0].CompileProgramGLSL=1
gpu[0].TestFrameBuffer=1
gpu[0].OCLPresent=1
gpu[0].OCLVersion="1.1"
gpu[0].CUDASupported=1
gpu[0].CUDAVersion="6.5.30"
gpu[0].OCLBandwidth=1.1598e+011
gpu[0].glGetString[GL_SHADING_LANGUAGE_VERSION]="4.40 NVIDIA via Cg compiler"
gpu[0].glGetProgramivARB[GL_FRAGMENT_PROGRAM_ARB][GL_MAX_PROGRAM_INSTRUCTIONS_ARB]=[16384]
gpu[0].glGetIntegerv[GL_MAX_TEXTURE_UNITS]=[4]
gpu[0].glGetIntegerv[GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS]=[192]
gpu[0].glGetIntegerv[GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS]=[32]
gpu[0].glGetIntegerv[GL_MAX_TEXTURE_IMAGE_UNITS]=[32]
gpu[0].glGetIntegerv[GL_MAX_DRAW_BUFFERS]=[8]
gpu[0].glGetIntegerv[GL_MAX_VERTEX_UNIFORM_COMPONENTS]=[4096]
gpu[0].glGetIntegerv[GL_MAX_FRAGMENT_UNIFORM_COMPONENTS]=[2048]
gpu[0].glGetIntegerv[GL_MAX_VARYING_FLOATS]=[124]
gpu[0].glGetIntegerv[GL_MAX_VERTEX_ATTRIBS]=[16]
gpu[0].extension[AIF::OGL::GL_ARB_VERTEX_PROGRAM]=1
gpu[0].extension[AIF::OGL::GL_ARB_FRAGMENT_PROGRAM]=1
gpu[0].extension[AIF::OGL::GL_ARB_VERTEX_SHADER]=1
gpu[0].extension[AIF::OGL::GL_ARB_FRAGMENT_SHADER]=1
gpu[0].extension[AIF::OGL::GL_EXT_FRAMEBUFFER_OBJECT]=1
gpu[0].extension[AIF::OGL::GL_ARB_TEXTURE_RECTANGLE]=1
gpu[0].extension[AIF::OGL::GL_ARB_TEXTURE_FLOAT]=1
gpu[0].extension[AIF::OGL::GL_ARB_OCCLUSION_QUERY]=1
gpu[0].extension[AIF::OGL::GL_ARB_VERTEX_BUFFER_OBJECT]=1
gpu[0].extension[AIF::OGL::GL_ARB_SHADER_TEXTURE_LOD]=1
License Type: Subscription
Serial number: 90970333779109124069
Application folder: C:\Program Files\Adobe\Adobe Photoshop CC (64 Bit)\
Temporary file path: C:\Users\LWIECZ~1\AppData\Local\Temp\
Photoshop scratch has async I/O enabled
Scratch volume(s):
Startup, 931.4G, 17.9G free
Required Plug-ins folder: C:\Program Files\Adobe\Adobe Photoshop CC (64 Bit)\Required\Plug-Ins\
Primary Plug-ins folder: C:\Program Files\Adobe\Adobe Photoshop CC (64 Bit)\Plug-ins\
Installed components:
ACE.dll ACE 2013/10/29-11:47:16 79.548223 79.548223
adbeape.dll Adobe APE 2013/02/04-09:52:32 0.1160850 0.1160850
AdobeLinguistic.dll Adobe Linguisitc Library 7.0.0
AdobeOwl.dll Adobe Owl 2013/10/25-12:15:59 5.0.24 79.547804
AdobePDFL.dll PDFL 2013/10/29-11:47:16 79.508720 79.508720
AdobePIP.dll Adobe Product Improvement Program 7.0.0.1786
AdobeXMP.dll Adobe XMP Core 2013/10/29-11:47:16 79.154911 79.154911
AdobeXMPFiles.dll Adobe XMP Files 2013/10/29-11:47:16 79.154911 79.154911
AdobeXMPScript.dll Adobe XMP Script 2013/10/29-11:47:16 79.154911 79.154911
adobe_caps.dll Adobe CAPS 7,0,0,21
AGM.dll AGM 2013/10/29-11:47:16 79.548223 79.548223
ahclient.dll AdobeHelp Dynamic Link Library 1,8,0,31
aif_core.dll AIF 5.0 79.534508
aif_ocl.dll AIF 5.0 79.534508
aif_ogl.dll AIF 5.0 79.534508
amtlib.dll AMTLib (64 Bit) 7.0.0.249 BuildVersion: 7.0; BuildDate: Thu Nov 14 2013 15:55:50) 1.000000
ARE.dll ARE 2013/10/29-11:47:16 79.548223 79.548223
AXE8SharedExpat.dll AXE8SharedExpat 2011/12/16-15:10:49 66.26830 66.26830
AXEDOMCore.dll AXEDOMCore 2011/12/16-15:10:49 66.26830 66.26830
Bib.dll BIB 2013/10/29-11:47:16 79.548223 79.548223
BIBUtils.dll BIBUtils 2013/10/29-11:47:16 79.548223 79.548223
boost_date_time.dll DVA Product 7.0.0
boost_signals.dll DVA Product 7.0.0
boost_system.dll DVA Product 7.0.0
boost_threads.dll DVA Product 7.0.0
cg.dll NVIDIA Cg Runtime 3.0.00007
cgGL.dll NVIDIA Cg Runtime 3.0.00007
CIT.dll Adobe CIT 2.1.6.30929 2.1.6.30929
CITThreading.dll Adobe CITThreading 2.1.6.30929 2.1.6.30929
CoolType.dll CoolType 2013/10/29-11:47:16 79.548223 79.548223
dvaaudiodevice.dll DVA Product 7.0.0
dvacore.dll DVA Product 7.0.0
dvamarshal.dll DVA Product 7.0.0
dvamediatypes.dll DVA Product 7.0.0
dvaplayer.dll DVA Product 7.0.0
dvatransport.dll DVA Product 7.0.0
dvaunittesting.dll DVA Product 7.0.0
dynamiclink.dll DVA Product 7.0.0
ExtendScript.dll ExtendScript 2013/10/30-13:12:12 79.546835 79.546835
FileInfo.dll Adobe XMP FileInfo 2013/10/25-03:51:33 79.154511 79.154511
filter_graph.dll AIF 5.0 79.534508
icucnv40.dll International Components for Unicode 2011/11/15-16:30:22 Build gtlib_3.0.16615
icudt40.dll International Components for Unicode 2011/11/15-16:30:22 Build gtlib_3.0.16615
imslib.dll IMSLib DLL 7.0.0.145
JP2KLib.dll JP2KLib 2013/10/29-11:47:16 79.248139 79.248139
libifcoremd.dll Intel(r) Visual Fortran Compiler 10.0 (Update A)
libiomp5md.dll Intel(R) OMP Runtime Library 5.0
libmmd.dll Intel(r) C Compiler, Intel(r) C++ Compiler, Intel(r) Fortran Compiler 12.0
LogSession.dll LogSession 2.1.2.1785
mediacoreif.dll DVA Product 7.0.0
MPS.dll MPS 2013/10/29-11:47:16 79.535029 79.535029
msvcm80.dll Microsoft® Visual Studio® 2005 8.00.50727.6195
msvcm90.dll Microsoft® Visual Studio® 2008 9.00.30729.1
msvcp100.dll Microsoft® Visual Studio® 2010 10.00.40219.1
msvcp80.dll Microsoft® Visual Studio® 2005 8.00.50727.6195
msvcp90.dll Microsoft® Visual Studio® 2008 9.00.30729.1
msvcr100.dll Microsoft® Visual Studio® 2010 10.00.40219.1
msvcr80.dll Microsoft® Visual Studio® 2005 8.00.50727.6195
msvcr90.dll Microsoft® Visual Studio® 2008 9.00.30729.1
PatchMatch.dll PatchMatch 2013/10/29-11:47:16 79.542390 79.542390
pdfsettings.dll Adobe PDFSettings 1.04
Photoshop.dll Adobe Photoshop CC CC
Plugin.dll Adobe Photoshop CC CC
PlugPlugOwl.dll Adobe(R) CSXS PlugPlugOwl Standard Dll (64 bit) 4.2.0.36
PSArt.dll Adobe Photoshop CC CC
PSViews.dll Adobe Photoshop CC CC
SCCore.dll ScCore 2013/10/30-13:12:12 79.546835 79.546835
ScriptUIFlex.dll ScriptUIFlex 2013/10/30-13:12:12 79.546835 79.546835
svml_dispmd.dll Intel(r) C Compiler, Intel(r) C++ Compiler, Intel(r) Fortran Compiler 12.0
tbb.dll Intel(R) Threading Building Blocks for Windows 4, 1, 2012, 1003
tbbmalloc.dll Intel(R) Threading Building Blocks for Windows 4, 1, 2012, 1003
updaternotifications.dll Adobe Updater Notifications Library 7.0.1.102 (BuildVersion: 1.0; BuildDate: BUILDDATETIME) 7.0.1.102
WRServices.dll WRServices Mon Feb 25 2013 16:09:10 Build 0.19078 0.19078
Required plug-ins:
3D Studio 14.2.1 (14.2.1 x001)
Accented Edges 14.2.1
Adaptive Wide Angle 14.2.1
Angled Strokes 14.2.1
Average 14.2.1 (14.2.1 x001)
Bas Relief 14.2.1
BMP 14.2.1
Camera Raw 8.7
Camera Raw Filter 8.7
Chalk & Charcoal 14.2.1
Charcoal 14.2.1
Chrome 14.2.1
Cineon 14.2.1 (14.2.1 x001)
Clouds 14.2.1 (14.2.1 x001)
Collada 14.2.1 (14.2.1 x001)
Color Halftone 14.2.1
Colored Pencil 14.2.1
CompuServe GIF 14.2.1
Conté Crayon 14.2.1
Craquelure 14.2.1
Crop and Straighten Photos 14.2.1 (14.2.1 x001)
Crop and Straighten Photos Filter 14.2.1
Crosshatch 14.2.1
Crystallize 14.2.1
Cutout 14.2.1
D3D/DDS 8, 55, 0109, 1800
Dark Strokes 14.2.1
De-Interlace 14.2.1
Dicom 14.2.1
Difference Clouds 14.2.1 (14.2.1 x001)
Diffuse Glow 14.2.1
Displace 14.2.1
Dry Brush 14.2.1
Eazel Acquire 14.2.1 (14.2.1 x001)
Embed Watermark 4.0
Entropy 14.2.1 (14.2.1 x001)
Extrude 14.2.1
FastCore Routines 14.2.1 (14.2.1 x001)
Fibers 14.2.1
Film Grain 14.2.1
Filter Gallery 14.2.1
Flash 3D 14.2.1 (14.2.1 x001)
Fresco 14.2.1
Glass 14.2.1
Glowing Edges 14.2.1
Google Earth 4 14.2.1 (14.2.1 x001)
Grain 14.2.1
Graphic Pen 14.2.1
Halftone Pattern 14.2.1
HDRMergeUI 14.2.1
IFF Format 14.2.1
Ink Outlines 14.2.1
JPEG 2000 14.2.1
Kurtosis 14.2.1 (14.2.1 x001)
Lens Blur 14.2.1
Lens Correction 14.2.1
Lens Flare 14.2.1
Liquify 14.2.1
Matlab Operation 14.2.1 (14.2.1 x001)
Maximum 14.2.1 (14.2.1 x001)
Mean 14.2.1 (14.2.1 x001)
Measurement Core 14.2.1 (14.2.1 x001)
Median 14.2.1 (14.2.1 x001)
Mezzotint 14.2.1
Minimum 14.2.1 (14.2.1 x001)
MMXCore Routines 14.2.1 (14.2.1 x001)
Mosaic Tiles 14.2.1
Multiprocessor Support 14.2.1 (14.2.1 x001)
Neon Glow 14.2.1
Note Paper 14.2.1
NTSC Colors 14.2.1 (14.2.1 x001)
Ocean Ripple 14.2.1
Oil Paint 14.2.1
OpenEXR 14.2.1
Paint Daubs 14.2.1
Palette Knife 14.2.1
Patchwork 14.2.1
Paths to Illustrator 14.2.1
PCX 14.2.1 (14.2.1 x001)
Photocopy 14.2.1
Photoshop 3D Engine 14.2.1 (14.2.1 x001)
Photoshop Touch 14.0
Picture Package Filter 14.2.1 (14.2.1 x001)
Pinch 14.2.1
Pixar 14.2.1 (14.2.1 x001)
Plaster 14.2.1
Plastic Wrap 14.2.1
PNG 14.2.1
Pointillize 14.2.1
Polar Coordinates 14.2.1
Portable Bit Map 14.2.1 (14.2.1 x001)
Poster Edges 14.2.1
Radial Blur 14.2.1
Radiance 14.2.1 (14.2.1 x001)
Range 14.2.1 (14.2.1 x001)
Read Watermark 4.0
Reticulation 14.2.1
Ripple 14.2.1
Rough Pastels 14.2.1
Save for Web 14.2.1
ScriptingSupport 14.2.1
Shake Reduction 14.2.1
Shear 14.2.1
Skewness 14.2.1 (14.2.1 x001)
Smart Blur 14.2.1
Smudge Stick 14.2.1
Solarize 14.2.1 (14.2.1 x001)
Spatter 14.2.1
Spherize 14.2.1
Sponge 14.2.1
Sprayed Strokes 14.2.1
Stained Glass 14.2.1
Stamp 14.2.1
Standard Deviation 14.2.1 (14.2.1 x001)
STL 14.2.1 (14.2.1 x001)
Sumi-e 14.2.1
Summation 14.2.1 (14.2.1 x001)
Targa 14.2.1
Texturizer 14.2.1
Tiles 14.2.1
Torn Edges 14.2.1
Twirl 14.2.1
Underpainting 14.2.1
Vanishing Point 14.2.1
Variance 14.2.1 (14.2.1 x001)
Variations 14.2.1 (14.2.1 x001)
Water Paper 14.2.1
Watercolor 14.2.1
Wave 14.2.1
Wavefront|OBJ 14.2.1 (14.2.1 x001)
WIA Support 14.2.1 (14.2.1 x001)
Wind 14.2.1
Wireless Bitmap 14.2.1 (14.2.1 x001)
ZigZag 14.2.1
Optional and third party plug-ins:
NormalMapFilter 8.55.0109.1800
Plug-ins that failed to load: NONE
Flash:
Renamy
GuideGuide
Kuler
Adobe Exchange
Installed TWAIN devices: NONE -
Is There An Extension that Renames Layers Based on Movie Clip Names of Files
Hi all,
I was wondering if anyone knew of an extension that could
rename layers on the main time line based on the movie clip names
that are found on the time line. I have a client file that is
absolutely huge but all the layers are just named Layer followed by
random numbers.
I have seen extensions that clean up the library but never
one that cleans layer names.fcastro75,
> Sounds great! I was actually thinking about this over
the
> weekend and asking a few fellow flashers what they
though.
> I think instance names should have the highest
importance. [...]
If you're still watching this thread, I have a few more
questions for
you. :) I finally have some time to play with this script,
and there's a
twist I didn't think of earlier.
Here's how JSFL works in regard to your particular aim:
a) Get the current timeline.
b) Get the layers of that timeline.
c) Get the *frames* inside each layer.
d) Get the elements inside each frame.
The twist is C, and it adds considerable complexity to this
script. You
might have a layer with 100 frames on it, and each frame has
a different mc
(or graphic, or text field, etc.) on it. What on earth should
this layer be
named? In your previous post, you suggested this:
> Layers that have multiple instances should read
multi-item.
That may well mean that feasibly half of your layers say
"multi-item" in
then, even if a given layer only has two separate items on it
(one graphic
symbol spanned from frames 50 to 80, and another graphic
symbol spanned from
frames 200 to 550).
Even if we were to increment the names of these, you could
easily get 30
layers in a row named "multi-item (1)", "multi-item (2)",
"multi-item (3)",
and so on. Seems to me like that wouldn't be any more helpful
than what you
have now.
One approach -- much easier to program, as it happens --
would be to
simply stop at the first frame in a layer that has content at
all, and name
the layer after that.
e.g.
"instanceName" (moveiclip) [1]
... where "instanceName" is the element's instance name,
(movieclip) is the
element's type, and [1] is the occurence of that element. If
that layer
contains any additional content -- either on that frame, or
subsequent
frames, we could add that "multi-item" phrase, like this:
"instanceName" (moveiclip) [1] multi-item
This way, in cases where the designer only used on element
in a layer,
you'd get a meaningful indication of that. In cases where the
designer used
several, you'd at least get an indication of the first one,
with a hint that
others exist.
Whatcha think?
David Stiller
Adobe Community Expert
Dev blog,
http://www.quip.net/blog/
"Luck is the residue of good design." -
Rename layers with layer 1, layer 2 till and layer N
My Name is Sathya Murthy
I have psd files with many layers each with different names
I want to rename the layer which i have selected using right click with name Layer 1
Next layer which I right click with layer 2 and so on till layer N
and layers with are left out without renaming should be put in a new layer set or group in layers separately in the same file.
which i have opened
and layers should be arranged like this
till Layer N
Layer 4
Layer 3
Layer 2
Layer 1
Group or Layer Set
Background
I hope you understand what i am saying
I want scripting for that action as I have more files to rename layers so by using scripts i can work little bit faster
anyone knowing please help
Thanks In Advance
Sathya MurthyI don’t think one can select Layers in the Layers Panel or on the Canvas while a Script is running.
One could select the Layers via a dialog, but that would take focus and need to present a list of the Layers.
Alternatively it might be possible to set up a work-around by selecting a Layer, invoking a Script (either by Keyboard Shortcut or from a Configurator Panel) that stores data (the activeLayer in this case), repeating that as often as needed and at the end of the selection process trigger another Script (or possibly the same with the shift-key pressed) that then processes that stored information.
But maybe someone else has more insightr or a better idea. -
Can't rename Layers in Flash CS4
When I double click on a layer name the editable text field appears for a fraction of a second, then disappears.
The only way around this is to right click and change the name in Properties... which isn't very convenient esp. since "Properties" is at the bottom of the list and the timeline is also at the bottom of the screen.
At one point, this problem resolved itself. Not sure what I did to fix it. But recently I had to trash my preferences and now the problem is back.
Can anyone help?Using CS4 on Visat Ultimate.
I closed Behaviors and Actions in the Classic workspace and still couldn't rename layers.
I switched to Essentials workspace and then could rename layers.
Then switched back to Classic and could still rename layers.
Haven't reopened Behaviors or Actions, though.
Why doesn't Adobe fix this stuff?
And add Type on a Path at the same time!
G -
Hi,
Does the report script Rename function also work for an attribute dimension member?
Thanks,
Ram
Edited by: user8774295 on Jun 1, 2012 8:26 AMi guess Yes
{desired name"} "actualname" -
Scripts / Export Layers to Files / Include Background Layer
Running the script Export Layers to files.
Need to keep one layer on that is applied to all the layers (I have a stroke on the top layer I would like applied to all the images that are saved out.)
How do I modify the script for this?
Thanks!
KenAdapting that Script might be somewhat difficult as it is pretty bulky.
But if its always the topmost layer thats supposed to stay visible and You know which format You want to save the resulting files to beforehand something much smaller may suffice.
You might try this, but I havent tested it extensively:
#target photoshop;
var myDocument = app.activeDocument;
// get the name and location;
var docName = myDocument.name;
var basename = docName.match(/(.*)\.[^\.]+$/)[1];
var docPath = myDocument.path;
// get the artlayers and remove the topmost;
var allArtLayers = collectLayers(myDocument);
var theTopmost = allArtLayers.pop();
// hide all but the topmost layer;
for (var n = 0; n < allArtLayers.length; n++ ) {
allArtLayers[n].visible = false
for (var m = 0; m < allArtLayers.length; m++ ) {
// show the layer;
allArtLayers[m].visible = true;
// tiff options;
tifOpts = new TiffSaveOptions();
tifOpts.embedColorProfile = true;
tifOpts.imageCompression = TIFFEncoding.TIFFLZW;
tifOpts.alphaChannels = false;
tifOpts.byteOrder = ByteOrder.MACOS ;
tifOpts.layers = true;
// duplicate the image;
var thecopy = myDocument.duplicate (thecopy, true);
// save copy;
thecopy.saveAs((new File(docPath+"/"+basename+" "+allArtLayers[m].name+".tif")),tifOpts,true);
thecopy.close(SaveOptions.DONOTSAVECHANGES);
// hide the layer again;
allArtLayers[m].visible = false
//thats it; thanks to xbytor;
////// collect all artlayers //////
function collectLayers (theParent) {
if (!allArtLayers) {
var allArtLayers = new Array}
else {};
for (var m = theParent.layers.length - 1; m >= 0;m--) {
var theLayer = theParent.layers[m];
// apply the funtion to layersets;
if (theLayer.constructor == ArtLayer) {
allArtLayers = allArtLayers.concat(theLayer)
else {
allArtLayers = allArtLayers.concat(collectLayers(theLayer))
return allArtLayers -
How can I get the script Export Layers to Files to export compressed pngs?
I would love to be able to take advantage of Photoshop's compressed png when using the script Export Layers to Files. I there a way I could modify the script to do this?
TIA!!!
========================
I found it ... I needed to add a line to the pngSaveOptions (around line #886) ...
var saveFile = new File(exportInfo.destination + "/" + fileNameBody + ".png");
pngSaveOptions = new PNGSaveOptions();
pngSaveOptions.interlaced = false;
// trying to compress png files
pngSaveOptions.compression = 9;
docRef.saveAs(saveFile, pngSaveOptions, true, Extension.LOWERCASE);
break;
=========================It does. The standalone XML Export was only offered by itself
in the
registration incentives. Sorry.
Nancy Gill
Adobe Community Expert
Author: Dreamweaver 8 e-book for the DMX Zone
Co-Author: Dreamweaver MX: Instant Troubleshooter (August,
2003)
Technical Editor: DMX 2004: The Complete Reference, DMX 2004:
A Beginner''s
Guide, Mastering Macromedia Contribute
Technical Reviewer: Dynamic Dreamweaver MX/DMX: Advanced PHP
Web Development
"neilcreagh" <[email protected]> wrote in
message
news:f4rsrt$ptf$[email protected]..
> I've just purchased Dreamweaver CS3 and, after
registering, the email sent
> offered me a free gift. I chose the free font. Another
option is the
> Dreamweaver XML Export Extension for Spry and I would
like to purchase
> this (it
> stated the value at ?15) but I can't find it anywhere?
>
> The interaktonline website says that its functionality
has been included
> in
> the Dreamweaver Developer Toolbox - but does this mean
that I have to
> purchase
> the entire toolbox?
> -
Is there a script for renaming layers in ID CS5?
Hello,
I am new to scripting (I just started today) so far I have found some very useful existing scripts to help automate my workflow. I am wondering if anyone knows of the existence of a layer renaming script for InDesign.
I have seen similar scripts for PS. I want to learn how to script but I am in need of this one for Monday...
Thanks in advance!Antonio:
Please remember that we're all volunteers here. If you can ask your question so we can understand it, we can probably help you. But if you cannot, it would take quite a lot of effort on our part to even determine what you asking.
Jongware wrote in the other thread:
This is quite a specialized case so it's unlikely there "is" a script. But there "could be" one. Ask in the scripting forum, as there are some people in there sharpening their skills with such requests. Make sure to detail what you need it to do: which layers? rename to what? Et cetera.
You're not doing a good job on detail. How would the script know what to change your first, 3rd, 4th, and 5th "atoms" to?
You have given us no information that I can see. -
Script to rename layers comps batch?
Does anyone know any script to rename batch comps layers in a sequential numbering? For example: layerComps01, layerComps02, layerComps03 ...
// 2014, use it at your own risk;
#target photoshop
if (app.documents.length > 0) {
var myDocument = app.activeDocument;
for (var m = 0; m < myDocument.layerComps.length; m++) {
myDocument.layerComps[m].name = "comp"+bufferNumberWithZeros(m+1, 2)
////// buffer number with zeros //////
function bufferNumberWithZeros (number, places) {
var theNumberString = String(number);
for (var o = 0; o < (places - String(number).length); o++) {
theNumberString = String("0" + theNumberString)
return theNumberString -
PS3 script to batch rename layers
Sometimes, I make copies of layers (for example: copy little diamonds to align into a shape of the letter M). Each time I "alt+drag" the content in that layer (to make a copy of it), PS makes a copy and then appends the name of the layer to something like "diamond copy 3". After making a ton of copies (and because I'm anal about having actual names for each layer), I want each layer to read "diamond". Instead of manually renaming all these layers, is there a way to highlight the affected layers and choose to rename all layers according to what you want?
Try this. Just select the layers you want 'copy' removed from and run this script.
if( app.documents.length > 0 ){
app.activeDocument.suspendHistory('Rename selected layers','removeCopyFromSelectedLayersNames()');
function removeCopyFromLayerName(){
if( getSelectedLayersIdx().length > 1 ){
var selectedLayers = getSelectedLayersIdx();
makeActiveByIndex( selectedLayers[0], false );
var startLoop = Number( !hasBackground() );
var endLoop = getNumberOfLayer() + 1;
for( var l = startLoop;l < endLoop; l++){
while( !isValidActiveLayer( l ) ) {
l++;
var oldName = getLayerNameByIndex( l );
var newName = oldName.replace(/\scopy\s?\d*$/i,'');
putLayerNameByIndex( l, newName )
if( selectedLayers != undefined ) makeActiveByIndex( selectedLayers, false );
function removeCopyFromSelectedLayersNames(){
var selectedLayers = getSelectedLayersIdx();
for( var l = 0;l < selectedLayers.length; l++){
var oldName = getLayerNameByIndex( selectedLayers[ l ] );
var newName = oldName.replace(/\scopy.*$/i,'');
makeActiveByIndex( selectedLayers[ l ], false );
putLayerNameByIndex( selectedLayers[ l ], newName )
makeActiveByIndex( selectedLayers, false );
function getNumberOfLayer(){
var ref = new ActionReference();
ref.putEnumerated( charIDToTypeID('Dcmn'), charIDToTypeID('Ordn'), charIDToTypeID('Trgt') );
var desc = executeActionGet(ref);
var numberOfLayer = desc.getInteger(charIDToTypeID('NmbL'));
return numberOfLayer;
function getLayerNameByIndex( idx ) {
var ref = new ActionReference();
ref.putProperty( charIDToTypeID('Prpr') , charIDToTypeID( 'Nm ' ));
ref.putIndex( charIDToTypeID( 'Lyr ' ), idx );
return executeActionGet(ref).getString(charIDToTypeID( 'Nm ' ));;
function putLayerNameByIndex( idx, name ) {
if( idx == 0 ) return;
var desc = new ActionDescriptor();
var ref = new ActionReference();
ref.putIndex( charIDToTypeID( 'Lyr ' ), idx );
desc.putReference( charIDToTypeID('null'), ref );
var nameDesc = new ActionDescriptor();
nameDesc.putString( charIDToTypeID('Nm '), name );
desc.putObject( charIDToTypeID('T '), charIDToTypeID('Lyr '), nameDesc );
executeAction( charIDToTypeID('setd'), desc, DialogModes.NO );
function getActiveLayerIndex() {
var ref = new ActionReference();
ref.putProperty( 1349677170 , 1232366921 );
ref.putEnumerated( 1283027488, 1332896878, 1416783732 );
var res = executeActionGet(ref).getInteger( 1232366921 )
- Number( hasBackground() );
return res;
function isValidActiveLayer( idx ) {
var propName = stringIDToTypeID( 'layerSection' );
var ref = new ActionReference();
ref.putProperty( 1349677170 , propName);
ref.putIndex( 1283027488, idx );
var desc = executeActionGet( ref );
var type = desc.getEnumerationValue( propName );
var res = typeIDToStringID( type );
return res == 'layerSectionEnd' ? false:true;
function hasBackground(){
var res = undefined;
try{
var ref = new ActionReference();
ref.putProperty( 1349677170 , 1315774496);
ref.putIndex( 1283027488, 0 );
executeActionGet(ref).getString(1315774496 );;
res = true;
}catch(e){ res = false}
return res;
function getSelectedLayersIdx(){
var selectedLayers = new Array;
var ref = new ActionReference();
ref.putEnumerated( charIDToTypeID('Dcmn'), charIDToTypeID('Ordn'), charIDToTypeID('Trgt') );
var desc = executeActionGet(ref);
if( desc.hasKey( stringIDToTypeID( 'targetLayers' ) ) ){
desc = desc.getList( stringIDToTypeID( 'targetLayers' ));
var c = desc.count
var selectedLayers = new Array();
for(var i=0;i<c;i++){
selectedLayers.push( desc.getReference( i ).getIndex());
}else{
var ref = new ActionReference();
ref.putProperty( charIDToTypeID('Prpr') , charIDToTypeID( 'ItmI' ));
ref.putEnumerated( charIDToTypeID('Lyr '), charIDToTypeID('Ordn'), charIDToTypeID('Trgt') );
selectedLayers.push( executeActionGet(ref).getInteger(charIDToTypeID( 'ItmI' )));
return selectedLayers;
function makeActiveByIndex( idx, visible ){
if( idx.constructor != Array ) idx = [ idx ];
for( var i = 0; i < idx.length; i++ ){
var desc = new ActionDescriptor();
var ref = new ActionReference();
ref.putIndex(charIDToTypeID( 'Lyr ' ), idx[i])
desc.putReference( charIDToTypeID( 'null' ), ref );
if( i > 0 ) {
var idselectionModifier = stringIDToTypeID( 'selectionModifier' );
var idselectionModifierType = stringIDToTypeID( 'selectionModifierType' );
var idaddToSelection = stringIDToTypeID( 'addToSelection' );
desc.putEnumerated( idselectionModifier, idselectionModifierType, idaddToSelection );
desc.putBoolean( charIDToTypeID( 'MkVs' ), visible );
executeAction( charIDToTypeID( 'slct' ), desc, DialogModes.NO ); -
HELP! Need a script for renaming layers
Hi-
I've got an Illustrator CS6 document that has 500+ layers with individual words on them (a word cloud). I'm needing to animate this in AE. When I "Release to Layers (Sequence)", all of the layers become Layer 1, Layer 2, etc. Is there a script that will rename all of those layers to be the text inside them?
i.e. Layer 1 has the word "Pencil" as a sub-layer, editable text.. I need to rename the Top-Layer Layer 1 to "Pencil". I'm hoping there is a script that can do this so I don't have to manually rename all of the layers.
I have found this script:
var idoc = app.activeDocument;
var ilayer = idoc.activeLayer;
for (i=0; i<ilayer.layers.length; i++) {
var isublayer = ilayer.layers[i];
isublayer.name = isublayer.pageItems[0].name;
But is doesn't seem to do what I need.
Any help would be greatly appreciated!
Thanks,
-MarkHi Carlos-
Here is part of my layers pannel before Releasing to Layers:
Here is part of my layers pannel after Releasing to Layers:
So I want Layer 6 to be "Hideaway Backpack Straps" without having to rename it manually.
Any help would be great!
Thanks
Mark -
Renumber/Batch rename layers
Hi, is there a quick way how to renumber or batch rename all layers in a file so they would be named in consequent numbers? Doesn't have to start from exact number, I was wondering if maybe there is some sort of script that would help me with that? Thanks a lot
This thread is kind of old, but I found JET's script to be extremely useful, and like Steven, I also needed it to start from the bottom layer. So I updated it a little.
Set "fromTop" to "true" if you want it to name the top-most layer #1.
Set "fromTop" to "false" if you want the bottom-most layer to be #1.
////START SCRIPT////
#target Illustrator
var docRef = app.activeDocument;
var fromTop = true;
// if true, the top layer will be #1
// if false, the bottom layer will #1
renumberLayers(fromTop);
function renumberLayers(fromTop){
var topLayers = docRef.layers;
for(i=0; i<topLayers.length; i++){
var currLayer = topLayers[i];
if(fromTop) var newNum = i + 1;
else var newNum = topLayers.length - i;
currLayer.name="Layer "+newNum;
subLayers= topLayers[i].layers;
for(j=0; j<subLayers.length; j++){
var currSubLayer = subLayers[j];
var newSubNum = subLayers.length - j;
currSubLayer.name="Layer "+ newNum+"."+newSubNum;
subSubLayers=subLayers[j].layers;
for(k=0; k<subSubLayers.length; k++){
var currSubSubLayer = subSubLayers[k];
var newSubSubNum = subSubLayers.length - k;
currSubSubLayer.name="Layer "+ newNum+"."+newSubNum+"."+newSubSubNum;
////END SCRIPT//// -
Script renaming many styles in 5.5
Hi,
I'm a total newbie on this, and I have tried searching the web and this forum ...
I have a ton of documents with hundreds of styles (char, para, cell and object), swatches and layers.
At least the styles need to be renamed when documents are converted from CS3 to CS5.5.
The styles are grouped and also the groups need renaming.
When the new naming structure is in place I want to use a delimited file with oldStyle and newStyle, as well as oldGroup and newGroup as a source. Styles or groups not present should just be skipped, but it would be great if styles not in the replace list could be listed in a separate text file ...
It is not necessary to perform the action on batches of documents, only the open active would be great enough.
Javascript is preferred as I have to cater for both platforms.
I'm not good at any scripting language, so please don't be cryptic.
So if someone is sitting on a readymade solution ... of course I understand I ask for a lot
Cheers
deSkilledThis doesn't sound too difficult, but the solution will depend completely on the structure of your delimited file and of your style groups. Do any of the groups share names with any of the styles? Do any character styles, for instance, share names with any paragraph, cell or object styles, and, if so, will they get the same new name? Are there groups within groups? Will old style "header" in group "A" get a different new name than old style "header" in group "B"? These are the kinds of things you'll have to know before you can begin designing a solution.
Jeff -
Can't rename layers in Muse CC
I used to be able to. What gives? I have rebooted my mac and still nothing. No other programs running. Double clicking does not open the text for renaming.
I totally agree with the frustration of not being able to rename all layers. I have submitted it as an idea for a feature request here: Rename child layers (e.g: Rectangle to banner_fill or whatever!)
Do vote for it and mention it to others who use Muse and get them to vote, even if it is a down vote as would be good to get a better idea of where this lies in terms of user "want", for us and the Muse team.
Maybe you are looking for
-
JSAPI: How can I edit a button symbol?
Hi, I have written an export script for Flash CS3 using the Javascript API, and now I want to port it to Fireworks CS3. The first problem I ran into was that I could not access a button symbol's state frames via script - the closest I get is up to th
-
Hi, I made an iphoto journal and put it on the cloud. I can send myself the link and can view in Safari and on ios. I can email the link to a friend with ios, and they can see the journal. When I email the link to my work, IE8 will not open it. The I
-
Does the Nokia C6-00 have the same Conversational ...
Why Nokia still using the old fashion way for sms??? Sms by Using Chat Conversational should be more clear and fun~~
-
New Toy, FCP won't launch, moderately ticked off
I feel like a total dope, cannot figure this out. You can believe me when I say I've run through ALL of the obvious and much of not so obvious debugging routines. However, I'm not going to list what I've done because I want you to waste your time and
-
WLC 4404 - Clearing the Load Balancing Statistics?
Does anyone know of a way to clear the load balancing statistics from a WLC 4404? I've looked through the gui and CLI and can't seem to find a way to do it. Thanks, Rob