// (c) Copyright 2008. Adobe Systems, Incorporated. All rights reserved. /* @@@BUILDINFO@@@ OpenAsLayer.jsx 1.0.0.0 */ var begDesc = "$$$/JavaScripts/OpenAsLayer/Description=Assign this to the open document event. This will promote a document with only a background layer to a layer with the document name." // endDesc // on localized builds we pull the $$$/Strings from a .dat file, see documentation for more details $.localize = true; if ( app.documents.length > 0 ) { var doc = activeDocument; if ( doc.layers.length == 1 && doc.activeLayer.isBackgroundLayer ) { doc.activeLayer.isBackgroundLayer = false; doc.activeLayer.name = doc.name; } }