Locked layer

Quick question: a layer must be visible to be locked? Oddly enough, I can get a layer to be unlocked, but not the other way around, but I might have something wrong.

Using CS2

var thisLayer = activeDocument.activeLayer.name;

lockCheck();

function lockCheck()
{
If (App.activeDocument.activeLayer.allLocked)
{
unlockLayer();
Alert ("layer" + thisLayer + "is now unlocked!");
}
on the other
{
unlockLayer();
}
};


function unlockLayer()
{
app.activeDocument.activeLayer.allLocked = false;
};


function lockLayer()
{
app.activeDocument.activeLayer.allLocked = true;
};

I can lock and unlock layers that are not visible in CS2. In the code you have posted, you never call lockLayer().

4 types of locking are also independent. Is that a layer can have the allLock and the pixelLock value. A point does not affect others. So if a layer has a pixellock and an alllock remove the alllock you do not move the layer.

Tags: Photoshop

Similar Questions

  • Partially locked layer

    I use CS4. I have a partially locked layer. It is not the background layer. I partially locked myself but I forgot how I did it. How to unlock it?

    http://help.Adobe.com/en_US/Photoshop/CS/using/WS1375CE44-C305-4d39-8CAF-7CF770557E6Ea.htm l

  • Use the adjustment options on all objects of a locked layer

    This will be easy for some of you.  But I'm just a kid in it.

    I have a locked layer called AD.

    Not all ads get their boxes.  So, I'd love to run a script that would be looked at the locked by the layer name layer and make all the content of image proportionally fill.

    I tried to restore the other code I found here, but I failed miserably.  I appeal to the gods!

    Hello

    Try this:

    myDoc = app.activeDocument;

    myLayer = myDoc.layers.item ("AD");

    myLayer.locked = false;

    for (k = 0; k

    If (myDoc.allPageItems [k] .itemLayer is myLayer)

    {

    currPItem = myDoc.allPageItems [k];

    currPItem.fit (FitOptions.PROPORTIONALLY); or another option you choose

    }

    myLayer.locked = true;

    Enjoy

  • Set effectsActive on a locked layer

    I have a script that activates / deactivates the fx power switch for layers in my computer, I wrote.  It is really convenient and speeds up a bit of my workflow.  The only problem is when I have my locked layers, it won't let me set the effectsActive attribute.  I can switch the fx power switch in the user interface when the layer is locked without any problem.  Why I can't do this via a script.  Is there a work around for the purpose intended?

    Thanks for the tips!

    -Justin

    This should work:

    myLayer = app.project.activeItem.layer var (1);

    myLock var = myLayer.locked;

    myLayer.locked = false;

    myLayer.effectsActive =! myLayer.effectsActive;

    myLayer.locked = myLock;

    Dan

  • Cursor locked layer appears when no layers are locked

    When I open Illustrator and create a new work plan, I can't edit or interact with the artboard.  No matter what I select the tool, the cursor indicates that the plan of work/layer is not editable, but certainly, the layer is not locked.

    Illustrator CS6

    Windows 7

    It turns out that my graphics tablet is interfering somehow.  I unplugged the Tablet and everything is back to normal.

  • Locked layer in Photoshop CS4

    Hello

    I have a layer in photoshop which refuses to unlock. No matter how many times I click on the lock, it just continues to tell me it can not change the layer because it is locked.

    The file is in RGB, and I just don't understand. So frustrating = []

    Very well! I thought about it. Our lead designer has been out of the Office until a moment ago.

  • Find/replace preference - include locked, locked layer the objects (Find only)

    Hi all

    I was wondering if anyone can help, I'm trying to make sure that the option "Include Locked layers and objects locked (research only)" on the box search/replace is active when the script below is executed because when it is disabled the text find/replace does not check locked layers and objects.

    In InDesign this icon located in the Find/Replace dialog box, a little less the "search:" drop down menu, icon of the left hand.

    Replace the text "Page Type"

    app.findTextPreferences = app.changeTextPreferences = NothingEnum.NOTHING;

    app.findTextPreferences.findWhat = "Page Type";

    {found = app.activeDocument.findText () [i] = "STET".silence ;}

    Any help would be great thanks, Brendan

    app.findTextPreferences = app.changeTextPreferences = NothingEnum.NOTHING;

    app.findChangeTextOptions.includeLockedLayersForFind = true;

    app.findTextPreferences.findWhat = "Page Type";

    {found = app.activeDocument.findText () [i] = "STET".silence ;}

  • Help of Newby - Lock layer or Image

    Hello

    I'm new on AW and using a demo of v7.02.

    Can someone please tell me if there is a way for each load a background picture in an icon screen or if not, how do you lock a picture?

    I want to use a picture as a background covering the entire area of display, but when I play the slightest error of appreciation repositioning other images results in the background moving image. This means that reset AW the location of the background image, not wanted, new position.

    I tried many combinations of the properties of image - positioning and mobile, but they seem to have no effect when reading.

    There must be a way to prevent the movement of the image, but I'm totally lost how do.

    I found the system DisplayTop, DisplayLeft etc. variables and thought that this may be a way to go, but I don't know how to set the values of these variables for the icon or Image. I tried to use the DisplayTop: = 0 but get an error 'Misallocation' on the ': ='. Unfortunately there is no example provided in help for DisplayTop variable

    Any help would be appreciated.

    Thank you

    Kevin

    "kje777" wrote in message
    News:e56hga$qui$1@forums. Macromedia.com...
    > Can get it someone please tell me if there is a way to load either a background
    > image in icon view, or if not, how to lock a picture?

    Try attaching a calc for your display icon containing:

    Mobile: = FALSE

    Chris Forecast

  • Move tool > layer is locked error

    I have an image open in Photoshop CC (latest Version). I exported (command + E) another image from LR to Photoshop so now I have two files open in PSCC mode tabs. Last night I was able to drag with the tool move and put my mouse on the file header and drag it out of sight by tabs. Then I would move the mouse pointer in the body of the image (by the way, the two images are the same just different treatment and my goal here was to make a layer mask and paint in or on certain parts of the image). So I've done it a thousand times and today cannot.

    So when I got take my mouse in the body (not on the head) of the image, hold down the SHIFT key and drag, I get the coordinates instead of being able to move the image on the first photo where she would have two layers on the right and I get the message

    I also noticed today that my move tool is a + with the arrows in all four extremities. Maybe this has changed recently, and I have not noticed. I reset all the tools and brushes. Short of reinstalling CC, I'm puzzled.  Also in the upper part of my toolbar I disabled, Auto-selection and the selected group. It worked a zillion times before. Help it sucks! I get an error for locked layer. I've never had to play with layers of unlocking.

    I could always have to files side by side, I could simply drag one photo to another by using the SHIFT key, which makes 1 layer (new image slide) and another background image.

    Help!

    Hello

    I have not noticed the problems of synchronization during this operation. I just tried and held the mouse for a few seconds without a problem.

    You have not by chance a mouse without a wire with the battery, or a questionable left mouse switch?

    Dave

  • Why my locked background layer turned into 'layer 0 '?

    Hello

    I have been using Photoshop for a while and I think that as this is a pretty basic question, but I can't find the answer anywhere, so I hope that you will be able to help me.

    I've noticed that sometimes when you are working on an image that after editing, saving and reopening of what the original locked "Background layer" somehow transformed into a unlocked layer called the "Layer 0". I don't know how and why this happens, and now what I do to protect the original background layer is simply locking "layer 0" so it is not be changed.

    Can you tell me why this is happening, what is layer 0, and how can I avoid this in the future (I like to keep just the original layer as the locked background layer)?

    Thank you very much for your time and expertise. Greatly appreciated!

    best,

    Rick

    Nice day!

    In layers background completely lockable Photoshop, then maybe that is anyway better to your needs.

    But how you got to unlock the layer of original background in the first place is probably not for someone else to know but you.

    The change would be part of an Action or Script you use (maybe one that is called by the Script event handler) or you do alt-double-click on the background layer?

    To change a layer to a background layer (if the document has not), you can use

    Layer > new > layer background

    Kind regards

    Pfaffenbichler

  • Layer duplicated to the new publication?  Weird problem with the duplicate() command.

    So, I'm writing a script that grabs the selected layers and throws them in a new document that corresponds to the original.

    But something strange that happens when I use duplicate several times in a row.  It duplicates my duplicate layers.

    I start with this selection:

    origional selection.PNG

    But an end to this result in my new doc:

    resulting problem.PNG

    This has me very confused.  I would appreciate someone looking at what I have.

    Thanks for the research.

    Here is the code:

    var FSTdoc = app.activeDocument;

    var curPATH = app.activeDocument.path+'/';

    fullNAME = app.activeDocument.fullName var;

    var ABSOfull = fullNAME.absoluteURI;

    var curPATHstr = String (curPATH);

    var fullNAMEstr = String (fullNAME);

    var theLayers = GetSelectedLayers();

    var HLDRdoc = app.documents.add (FSTdoc.width, FSTdoc.height, FSTdoc.resolution, FSTdoc.name, NewDocumentMode.RGB, FSTdoc.initialFill, FSTdoc.pixelAspectRatio, FSTdoc.bitsPerChannel, FSTdoc.colorProfileName);

    app.activeDocument = FSTdoc;

    LAY1 = theLayers [0] .duplicate (HLDRdoc, ElementPlacement. PLACEATBEGINNING);

    LAY2 = theLayers [1] .duplicate (HLDRdoc, ElementPlacement. PLACEATBEGINNING);

    lay3 = theLayers [2] .duplicate (HLDRdoc, ElementPlacement. PLACEATBEGINNING);

    function to get layers selected by paul m.;

    function GetSelectedLayers() {}

    var A = [];

    var desc11 = new ActionDescriptor();

    var ref9 = new ActionReference();

    Ref9.putClass (stringIDToTypeID ('layerSection'));

    desc11.putReference (charIDToTypeID ('null'), ref9);

    ref10 var = new ActionReference();

    Ref10.putEnumerated (charIDToTypeID ('Lyr'), charIDToTypeID ('Ordn'), charIDToTypeID ('Trgt'));

    desc11.putReference (charIDToTypeID ('From'), ref10);

    Try the lock to stop the script

    try {}

    executeAction (charIDToTypeID ('Mk'), desc11, DialogModes.NO);

    } catch (err) {}

    Alert ("Script will not work on locked layers.");

    throw new Error ("locked layer");

    }

    var gL = activeDocument.activeLayer.layers;

    for (var i = 0; i < gL.length; i ++) {}

    A.push (GL [i]);

    }

    executeAction (charIDToTypeID ('undo'), undefined, DialogModes.NO);

    return A;

    };

    What version of Photoshop are you using? I think the problem is that you have multiple selected layers when you perform step duplicate. With the new version that will be fooled all selected layers. By three not fooled, you are indeed fool all the layers selected three times.

    I think you should do that one step of dupe or change the layer selection to a single layer after layer selected and before step of dupe.

  • How can I find all locked layers (visible or not) and then unlock all at once?

    OK, for anyone who cares here is the scenario.

    I was on a tight schedule. I got a massive records in layers, - nested all - .psd

    I use Photoshop CS 5.5

    I need only the visible layers.  So, I'm going to 'Delete hidden layers' right? Oops it is grey, I couldn't use it - Ahhh, that was because of the locked layers...

    No problem. Ugh wait.

    Then I realized - in the structure of the complicated layer that I had to go through every single folder, open it, look for a locked layer and unlock it (folders nested inside the files nested etc..). If the layer was not visible and it was locked, I had to start by putting visible, then unlock it and turn it off, then turn it back on.

    Aaaarrggghhh I was on a deadline and I didn't just have the time - but I had to do it anyway.

    It was a painful experience... I tell you right now, designers on SEND me A PSD WITH LOCKED LAYERS MORE EVER

    It would have been so much easier if I could just get 'locked in layers' and "unlock everything."

    Does anyone know of a solution? Probably something I should have known years, or perhaps a feature request?

    Thank you!!!

    7.

    This feature is now available in Photoshop CS6. Layers Panel has a filter option to layer that simplifies the workflow and do designers dream come true! Please see the screenshots below:

  • Delete the layer

    Hello

    is it possible to remove a layer in Acrobat X (by the script)?
    I need to remove it because it is hidden and locked it still appears in Safari on a Mac.

    It takes many hours to return to InDesign and Acrobat, so it's no choice.

    I noticed that export my pdf to pdf/a deletes the locked layer but I'm not sure if nothing else is changed (scripts, actions etc.)

    Thanks for any idea pointing me in the direction of th eright.

    Leendert

    You cannot delete a BCG (layer), but you can merge it into another. Of course the content of the layer will not be removed by merging, you have to do it manually.

  • Workflow problem - how to stop Illustrator by selecting the top layer after each record?

    Hello

    One of the great things about diapers is the ability to have items in a locked layer above the layer you are using. However, when Illustrator finishes savings, he selects the layer and if the layer that is locked and then you travel constantly in the layers palette to select the layer that you worked prior to backup - I need to that 50 - 100 times per hour.

    Is there a way to force Illustrator to remember you were working before the backup - and bring him back to this layer after layer save him?

    Any pointers in the right direction would be much apprciated.

    See you soon

    Ben

    Yo know what - I think this may have something to do with having "Create a PDF compatible" off in la - like preferences.

    It seems that when this option is enabled, the problem does not occur, but turn it off makes it - I just tried this on a whole new file with text and boxes.

    It's the same for you guys?

  • How to unlock the layer "index"?

    I scanned a piece of writing as a PNG document. I then opened in Photoshop CS4 and, under save for Web and devices, optimized the image (which includes the removal of some ugly red lines that were on the original article). Then, I saved the document as a gif file.

    Receive opened the new gif file, however, I discovered that the image is now on a locked layer named "index". How can I unlock this layer - or what I can?

    As I mentioned above, I removed some red in the original image when I optimized. I would like to create a new background layer in the gif that will fill the transparent lines that have been created when I removed the colors. If I can't unlock layer "index" the new gif, can someone advise me on how to create a new layer/background color?

    Thank you.

    Image > Mode > RGB

Maybe you are looking for

  • Qosmio F10 does not start

    Hello my partner has a laptop qosmio who appears to be dead. He used it apparently pink lines appears across the screen, and it was cut. He tested food that looks very good. He gets the lights coming but they do nothing and the computer shows nothing

  • Introducing a Dell RAM 4 years a new T530

    Hello So I bought in a T530 and may consider retiring from my old Dell in 2009. I think to insert the 4 GB memory (2 DIMMs) DDR3 in the T530 (currently with 8 GB of RAM 1DIMM), otherwise I can also choose to buy a new RAM so that I can use my old Del

  • I downloaded sp1, but it does not install, what should I do... of w.up. same problem

    I have the same problem for sp2 on my other laptop, I have sp1 system

  • Change the drive letter 'C' to something different for security?

    I have Windows 7 pro loaded on my SSD already, but have heard (not sure if it is true) that if I change my 'C' default drive letter to something other than C that will greatly enhance the security of my computer (because many viruses target the C dri

  • EncodedImage does not work

    I'm trying to load the image of the envoirnment multithreading server:. I have 200. ResponseCode and receive the byte array. No.: but my I am unable to create EncodedImage HttpConnection httpConnection = null; InputStream httpInput = null;int respons