Scripting: Layer visibility

The property 'element.visible' shows and hides the items. That's a given.
But I need to imitate the behavior of the UI to display and hiding whole layer (/ subshells).

I look something like "layer.visibility", but where is it? (and is of course not 'layer.discloser'!)

Help, please, I'm desperate!

Thanks Heathrowe,
I didn't try the command John Solo, but he spoke explicitly of 'elements' so I think that he could not manage layers (still one of his orders has been documented as not to treat the sublayers or something, so I'm being a bit presumtuous but...)
.. .but I found the answer myself!

It seems that the visibility of the layer is animatable, so the visibility indicator sound is part of her purpose of frameworks.
That is to say, this code should hide all the upper layers...

Tags: Fireworks

Similar Questions

  • How to make the layer visible on and outside

    Hi, experts

    This is my script:

    docs var = app.documents.

    for (var i = docs.length - 1; i > = 0; i--) {}

    docs [i].layers.item ("Chi") .visible = true;

    docs [i].layers.item ("Chi") .locked = false;

    docs [i].layers.item ("Eng") .visible = false;

    docs [i].layers.item ("Eng") .locked = true;

    }

    Alert ("Done.")

    But how do the layer

    1. If the 'chi' layer visible = true; everything in "eng" visible = false

    'chi' locked = false; While 'eng' locked = true

    just to put the

    layer 'chi' visible = false; everything in "eng" visible = true

    'chi' locked = true; While 'eng' locked = false

    like two switch layers;

    respect of

    John

    Try this,

    var docs = app.documents;
    for (var i = docs.length-1; i >= 0; i--) {
        if(docs[i].layers.item("Chi").visible == true && docs[i].layers.item("Chi").locked == false)
        {
            docs[i].layers.item("Chi").visible = false;
            docs[i].layers.item("Chi").locked = true;
            docs[i].layers.item("Eng").visible = true;
            docs[i].layers.item("Eng").locked = false;
        }
        else if(docs[i].layers.item("Eng").visible == true && docs[i].layers.item("Eng").locked == false)
        {
            docs[i].layers.item("Chi").visible = true;
            docs[i].layers.item("Chi").locked = false;
            docs[i].layers.item("Eng").visible = false;
            docs[i].layers.item("Eng").locked = true;
        }
    }
    alert("Done.")
    
  • make a layer visible by name

    Does anyone know how to make a visible layer using the name of the layer, with javascript?

    If the layer is called the 'evidence' for example

    app.activeDocument.layers['proof'].visible = true;
    

    You must go through the Scripting Guide and Scripting reference, you learn a lot, script guide covers the basics and the reference has a ton of excerpts, you'll love the search for knowledge, he

  • Simple skin a script layer need help

    Hello

    This will be an easy one for someone. I'm new to scripting so please be patient. All I have to do is to have a script that hide a layer named "L2_NonTranslatedParts". I tried to restore a code but I failed. Can anyone help? I'm not sure why we defineing "watermark" as a var. It's in the code, I cut upwards.

    var myDoc = app.documents.item(0);
    var L2_NonTranslatedParts = "Watermark";
    try{app.activeDocument.layers.item(L2_NonTranslatedParts).visible = false;}
    catch(_){alert("Can't find layer: " + L2_NonTranslatedParts);exit();};
    

    Yes, that is a good question. Really

    app.activeDocument.layers.item("L2_NonTranslatedParts").visible = false;
    

    should be enough.

  • Problems with layer visibility/PS CS6 Timeline

    Hello

    I've been animating with Photoshop CS6 for some time, but a new problem today and I don't know how to fix it. My current project has 112 executives and about 3 times as many layers. Everything was going well until I exported a GIF to work under test. After the fact, each image has been shortened by 0.01 seconds, and all the layers were "visible" in each image. Toggling the visibility of each layer does not allow me to see an individual layer but, and layers on that I need to remain invisible when the toggling the visibility of each layer button.

    I am able to get a new layer over an existing layer and those normally. I really have trouble understanding what is happening here. Help, please!

    Record Photoshop which layers are visible for each image.  When you change the visibility in the palette layers only change you its visibility in the frame (s) that is targeted in the frame animation palette. You must either select the image that you want to change the visibility of the layer in. Here is an animation that I have all the layer show in all frames.  I target all odd frames and turned it off of the top layer. Siena is the screenshot just before I turned off the visibility of the top layer. After that I turned off the visibility of the layer. I saved on a GIF.

    You can also make a picture at the same time.

    When the top layer is visivle in all frames it look like this

  • Linked file moves around on the change of layer visibility

    Guys I'm confused, could not understand how 'fix' file (pin down) an embedded AI in ID.

    Draw vector maps in artificial intelligence, now compose in ID, I have encountered any problems [CS6]:

    1. the card is a great vector map with layers, info, areas and roads

    2. in the ID, the same card is used in different zooms in their widows, where, the selective layers are hidden, using "Object Layer Options."... »

    OOPS!

    3. hide a layer and move the content!

    Question: y at - it no way to PIN down related content!

    BUG?

    This is so the logic I tried to imagine and invented a solution, but the fix not working, it seems a bad logic or at least there should be an option to simply pin-the-content


    The fix:

    1. ensure that all layers also spread them (or at least the ones you intend to hide) in all directions (x and y)

    2. hide a layer should not affect the "limits" of content (visible). If so it will effect a change in the content of ID

    This problem solved has worked and so I extended the object (Fortunately it was a large background rectangle) of complete line of content for. Phew!

    (answer key embedded related) edited by: Nikhil Varma

    Looks like that maybe you selected "Art" or "Bounding Box" for the harvest option when you've placed the graphic. Change the visibility of the layer would change the dimensions of those boxes of cultures.

  • The layer visibility

    Hi, I would like to use the API to find out whether a layer is visible or not, how do I do this?

    THX

    Hello!

    You must use AEGP_GetLayerFlags. One of the indicators is AEGP_LayerFlag_VIDEO_ACTIVE.

    If you want to be 100% sure, you can also see opacity of the layer via AEGP_LayerStream_OPACITY. COS' one layer can be active AND invisible is its opacity is set to 0%

    See you soon,.

    François

  • Layer visibility problems

    The layers of first three as stated have filled with information, but it seems that I must have turned off visibility in these layers, but they always display the information is still there in the layers panel. And the paper is now wired. I hope that its not deleted. Any ideas? Thanks for your time!

    layers.JPGwireframe.JPG

    Place the cursor of the mouse on the eye of a layer in the layers panel and hold it pressed until only the ToolTip is displayed. Read and see if the tip help

  • Placed PDF layer visibility options

    Screen Shot 2013-03-21 at 2.24.06 PM.png

    How can I access layers in a linked PDF document. Basically, I need to turn on some of them at a time when you place the PDF file.

    Below I believe is essentially Kasyan's (?) (Sorry if this is the wrong person, perhaps Jongware) script from another site to process the images.

    Main();

    function Main() {}

    var page, placedFile, graphics, i, j,

    doc = app.activeDocument,

    pages = doc.pages;

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

    page = page [i];

    var graphics = page.allGraphics;

    for (j = graphics.length - 1; j > = 0; j-) {}

    placedFile = page.allGraphics [j];

    If (placedFile.constructor.name == "ImportedPage" & & placedFile.itemLink.linkType == 'Name of the InDesign Format') {}

    try {}

    / /placedFile.graphicLayerOptions.graphicLayers.item("Frames").currentVisibility = false;

    Alert (placedFile.constructor.Name);

    Alert(placedFile.graphicLayerOptions.graphicLayers[0].) (Name)   This line says "Untitled - 3", but I can't seem to access or see how to make a loop through the rest of the layers.

    }

    catch (err) {}

    }

    // }

    }

    Alert ("Done");

    }

    Thank you in advance!

    Okay I got it. Don't know why, but graphicLayers of graphicLayers did the trick.

    Something like...

    placedFile.graphicLayerOptions.graphicLayers [0].graphicLayers.count)

  • Toggle layer visibility Animation in demo

    Hi, I want to do a demo with 2 images of the mouse pointer, one has the normal state, the other image has the pointer pressed state. Now in a parent layer, it would be wonderful if I could use this pointer-pre-comp and whenever I want to show a pointer in a hurry, I put a set of keyframes (PRÉE / unpress) for pointer-pre-comp in the mother-pre-comp... such a thing be done? Because rt now I'm animating on each step.

    Kind regards

    Frank

    If you know something about the expressions you could do it with a Slider control. Because the pointer and the State are of different sizes, you will need to change the opacity of the two layers. I call your pointer model 'pointerComp' (any name) and attach adding the cursor of the expression to a null value that is named PointerController (not important) in the mainComp I am naming 'Hand Comp' (and this name matter a lot). Also, I named the slider cursor opacity by selecting in ECW by pressing return in the same way you rename the layers in the timeline panel.

    Here, it is the expression of load the layer opacity:

    comp("Main Comp").layer("PointerController").effect("OpacitySlider")("Slider");
    

    for the second layer normal, we'll do something a little different. I'm going to subtract the value of the slide in 100 because the opacity can be in values from 0 to 100.

    The expression looks like this:

    100 - comp("Main Comp").layer("PointerController").effect("OpacitySlider")("Slider");
    

    Just typing that I did to create these expressions was to type in 100-

    The rest was created entirely with the pickwhip separating the two chronologies and locking window regulating effect of the null value.

    The last part of the solution is set keyframes and animate the opacity slider between 0 and 100. You can set keyframes, one pairs couple pictures outside if you want bland, or you can set keyframes to organize using Animation keyframes > toggle hold keyframes or using the hotkey Alt/Option + Cmnd / Ctrl + H.

    Here's what the project looks like. It took more time to explain what to do.

  • How do the new style layer visible?

    Hello!  I use PSE7 on Windows XP.  I just downloaded a new Style. I unzipped the file and found two files: a file of ASL and an installation file (Notepad). I moved the ASL file to my Styles folder: C:\Program Adobe Photoshop Elements 7.0\Presets\Styles

    However, now, I can not find the style in the drop down menu on the EP!  In the menu effects, I clicked on the layer style button and use the menu drop-down. I have the original files, but not the new style.  Help, please!

    I looking in the wrong place? Do I need to install an XML file (it did come with one)?

    Thanks in advance for your answer.

    -Elaine

    They moved where you install 3 party in a hidden folder layer styles. Here's a tutorial to install layer styles in Elements 7 and 8. Tutorial includes how to show the hidden folder. I would recommend hiding the file once you are done with it.

    http://www.scrappersguide.com/forums/showthread.php?t=3294

  • How to set the action to a link to "Define layer visibility" through plugin?

    Hello

    I have a few forms in a PDF that are related to some layers. I need to update the links according to the data of the object of a particular form. I am able to get the object data, but I'm not able to put the link to the action. Please guide.

    Thank you...

    The principle seems good. Let's look at what is created.

    onArray: [press BCG null] - why the null?

    onObj: < tate="" onarray=""> >-I guess that we probably inherit the necessary S entry

    I see that PDOCGCreate is supposed to create a new entry of BCG. Is this fair? And if so, where do you assign content to this group. PDOCGCreate doesn't seem to be to obtain a PDOCG for an existing BCG, if that's what you wanted to do.

  • How to set the visibility of the layer on the initial view?

    I created some shapes that have multiple layers in them. They are several pages long. Page 1 there are 3 radio shows buttons... it selects the appropriate user type and begins running the correct layer and turns off the other layers. Unfortunately, if they go to page 2, before clicking on one of the butttons, they see all layers at once, and it's a confused mess.

    Is there a way to set the default layer visibility so that when you open the PDF file, it only shows the layer I want it? I don't find it in the initial view settings.

    Thanks in advance for any help provided!

    Yes, you can use a script to document level to set the State of the OCG, Optonal content group or layer, States up-front objects.

    var nOCG = 0; number of BCG for display

    all leave OCGS

    SOWC var = this.getOCGs ();

    SOWC [0].initState.constants.states.off;

    Activ a BCG for initial view

    SOWC [nOCG].initState.constants.states.on;

  • I don't have the button 'export the layer to files. In any case to redownload the default scripts?

    Well I'm doing a flip book House in Photoshop CS5 and tries to save the images.

    I imported a video and converted into individual layers for each image.

    Now I'm trying to save it by going in "file > Scripts > layer export to files and there is no option in my Scripts tab at all."

    When I go on "file > Scripts all that are in there is just 'Browse'."

    Then when I click on 'Browse' it just takes me to the folder where I opened the PS file.

    Anyone has an idea on how I can get back the default scripts?

    I have even not all scripts to export layers, which is something I do often.

    Location depending on the version of the OS and Photoshop script must be in the Photoshop presets for example, Scripts Windows 7

    "C:\Program Files\Adobe\Adobe Photoshop CS6 (64 Bit) \Presets\Scripts\Export layers to Files.jsx"

    Do a search on your drive to "Export layers to Files.jsx" where the file has been moved.  Other wise get it back from your backup system or reinstall Photoshop on top of itself to recover the missing files.  You won't lose you Photoshop preferences and responsible actions etc. your setting is not overwritten.

  • Photoshop script that records with different active layers?

    Greetings. Long time user of Photoshop... but looking for a way to streamline some workflows. I regularly jobs where I need to create variations of what I am working on. To do this, I have basic layers that are common to all the images of finals, can have a set of layers that have sections which vary on them. Now, I heard some Scripts that can be run in Photoshop, so I was wondering if there is a way to have such a script all variants, evolution which layers "variation" is visible, as it does. Thus, if the layers were piled up like:

    Overlay shared

    Variant 6

    Variant 5

    Variant 4

    Option 3

    Variant 2

    Option 1

    Shared content

    Shared base

    All shared layers would be visible, while the script would save the Variant 1 file with the Variant 1 layer visible also... Variant 2 with Variant 2 visible (and Variant 1 tilt turn back), etc. Such a thing is possible in Photoshop with the script? And if so... How capable is he? If the file format was more like:

    Overlay shared

    Level 2 option 3

    Level 2 option 2

    Level 2 option 1

    Variation of 1 level 3

    Level 1 Variant 2

    Variation of 1 level 1

    Shared content

    Shared base

    When I needed to save the files where the script activated level 1 Variant 1, then saved on each of the 3 files with the level 2 variants (file1 would have level 1 Variant 1 + level 2 option 1 active, then File2 should have level 1 Variant 1 + level 2 option 2 active... etc)... is it possible?

    Not necessarily need someone to provide a script, I'm pretty happy to jump in and learn, if I get an indication that I wouldn't just spinning my wheels on something that is not possible. Thank you, in advance, for all the answers.

    Yes, this would be possible. If the files have different numbers of layers, which would make it more difficult, because you'd have to this script so that the script know which layers to enable or disable. It would be just a matter of creating a 'loop' and going through the layers. It would be worth something even in the name of the layer that would leave the script to know which layer must stay all the time.

Maybe you are looking for