Accessing Layer Comp information in SDK

I'm trying to access information about the Layer Comps in a document. This seems to be a trivial task using scripting - one can access all the Layer Comps and their properties (including Names and Comments) according to the Javascript Reference Guide.
However, I would like to do this via the SDK as an Export plugin, and I can't seem to find any mention of layer comps in the SDK documentation. Is this possible?
Thanks!

Hi,
you can't find a matchName for maskMode because it is not a "property" (in the sense of ExtendScript) but an "attribute" (like .rotoBezier, .propertyDepth, .propertyIndex, etc).
So, as long as layer has a mask(1), layer.property("ADBE Mask Parade").property("ADBE Mask Atom").maskMode  is defined.
For .maskFeather, it is different because it is a property, not an attribute.
Apparently, all ADBE properties that are not indexable (ie .parentProperty.propertyType !== PropertyType.INDEXED_GROUP) have a compact name.
Those compact names don't appear in the reflect object so they are not so easy to identify. In Jeff Almasol's GimmePropPath, you can find a partial (but quite big) list of these compact names.
Apparently also they are language free, so for instance layer.mask(1).maskFeather works in any language, and so does shapeLayer.content("Group 1").transform.position, etc, etc.
Properties that are indexable (children of indexed groups) don't have a compact name (they are renamable).
For properties inside third party plugins, i have no idea...
Xavier

Similar Messages

  • How to access the visibility of layer comps in indesign through scripting? [JS][CS5.5]

    Hi,
    I'm pretty new to scripting in adobe, but I thought this should be a simple one (think again...):
    I wanted to go over an array of all the psd-images in a selection or on a page in indesign, and then try to set their layer comp to a specific one (like "Diffuse".
    In photoshop I could make an action that would do this for me, but it seems that there are no easy ways in Indesign to do this.
    There also seems no way to change the layer comp or layer visibility for multiple selection...
    If anyone knows if it is possible at this moment to use layer comps in scripting (and how) or some kind of action for Indesign, I'll try to tackle the rest of the problem myself (and be forever grateful).
    If it isn't possible, I how it will be in CS6.
    Thanks to anyone interested,
    Mattaias
    ps: currently trying to solve this in JavaScript for CS5.5.

    Thanks for the information so far, but I've been looking at the links you added and haven't found anything about the scripting of layer comps...
    Here is the adjusted sample of your code:
    function Main() {
        var mySelection = app.selection;
        for(var n=0;n<mySelection.length;n++){
            if(mySelection[n].graphics.length === 1 && mySelection[n].graphics[0].imageTypeName === "Photoshop"){
                //Do your stuff on the selected frame or on the individual placed PSD file:
                // Adjusted Sample code:
                mySelection[n].images[0].graphicLayerOptions.graphicLayers.itemByName("Heat").currentVisib ility = true;
                alert(mySelection[n].images[0].graphicLayerOptions.graphicLayers.itemByName("Heat").curre ntVisibility);
    but what I actually need is more like
    mySelection[n].images[0].graphicLayerOptions.graphicLayerComps.itemByName("Heat").currentVisibility = true;
    It seems a bit strange (or I am looking on the wrong places) but there is no way to access layer comps in Indesign.
    Do I have to change the file in PhotoShop and save to get the result I need? Looks a bit strange that there isn't a more logical way then...
    The reason I want to script this, is because when there are 100 PSD's on one page and they should al get the same Layer Comp... you have to do this manually for every image.
    I like to use this feature to build texture-atlasses and have a dynamic result, but at this moment it would take at least 10 seconds for every picture... for 3 pages, and that for 7 files (and even more in the future).
    If anybody has ever scripted something with LayerComps, please let me know. (and something like recording Actions in photoshop is equally usefull)
    Otherwise I guess the Adobe programmers just didn't want to share this feature yet in CS5.5.

  • As a user of Extract, I would like to have the ability to open/access assets and information contained within smart objects or linked layers. Is this possible?

    Problem:
    In Extract ( Extract for PSD ) a user is unable to access assets or information from smart objects or linked layers.
    Usage:
    Smart Objects/Linked Layers are useful for templated web workflows
    @Sectioning content allows for a holistic view with access to granular information
    Possible Solution(s):
    Could we create a link between to cloud files.
    Could a smart object or linked layer be expanded on upload
    Could we create a drop menu like the layer comps that includes related files

    Hello Martin,
    Our current support in Extract for Smart Objects includes showing them in the file, and using them on the backend when you request your layer(s) to be scaled while exporting (i.e., when scaling up, the highest quality image is used).  We also display the colors, fonts and gradients from the included Smart Objects in the Extract Styles panel.
    We have considered providing a way to open Smart Objects from within Extract, and could use some feedback from you on how this user experience would work best for you. Would you prefer option a) or b) below, and why?
    a) When opening a Smart Object, it opens in the current browser window, replacing your current view of the PSD.
    b) When opening a Smart Object, it opens in a new browser window, which receives focus (is the frontmost browser tab/window).
    Also, if you tried to open a Linked Smart Object when the linked file is not available, what would you expect to happen?
    Would you describe in more detail what you mean by: "Could a smart object or linked layer be expanded on upload?" and how you'd use this feature?
    Regards,
    brucebowman

  • Layer Comps should capture changes to a Linked Smart Object's Layer Comp

    Normally, I can move things around or change visibility, and use Layer Comps in my master doc to capture these changes.
    However, changing which Layer Comp displays from a Linked Smart Object cannot be captured by Layer Comps in my master doc.
    Slightly more information: Sorry it's a little convoluted. I have several Linked Smart Objects inside a master doc, and these Smart Objects contain different Layer Comps. It's awesome that I can easily change which Layer Comp each Smart Object displays. But when I make a change, it cascades across the Layer Comps in my master doc. So my master doc's Layer Comps cannot effectively capture a state.
    It would be awesome if Layer Comps were able to capture state changes for the display of Linked Smart Object's Layer Comps. #featurerequest

    Photoshop Feature Requests should be posted over at
    Photoshop Family Customer Community
    But before posting one look around whether one exists already on this issue and add your +1 if it does.

  • Scripting layer comp property of linked smart object

    How can I through script set the layer comp property of a linked smart object?
    More generally, how can I access a smart object and manipulate it as a document?  I know that I get smart object layers by looking at the kind property, but I don't know what to do with them once I get them.  I'd like to be able to cast the layer to a document object I guess.  Thoughts, anyone?

    Photoshop Feature Requests should be posted over at
    Photoshop Family Customer Community
    But before posting one look around whether one exists already on this issue and add your +1 if it does.

  • BUG: FatalError when exporting layer comps to pdf file in PhotoShop CS6

    I've been starting to use the File -> Scripts -> Layer Comps to... frequently--it is great for sharing files with clients.
    When I used File -> Scripts -> Layer Comps to Files (type: pdf, "selected layer comps only" with about 6 of 12 comps selected) today I got the following error:
    "FatalError: General Photoshop error occurred. This functionality may not be available in this verison of Photoshop. - <no additional information available>"
    The only other notification I get for this document is a missing font upon opening, which I do not imagine would be a problem.
    I am on the latest version of PhotoShop CS6 as confirmed by my CreativeCloud app.
    My MacBook Pro is pretty generously outfitted and updated: OS 10.9 (latest update), 16GB RAM, over 100GB free HD space, 1GB VRAM.
    I haven't had a chance to do repeated tests to get it to fail like this again as I'm on a deadline so I had it do the same process but exporting ALL layer comps and I removed the unwanted pages in Acrobat Pro.

    So I've found a bit in the script that I think might be it (below).  Can I remove that whole bit?  Or would changing the 4 to a 0 do the trick (I tried and it didn't do anything)... Sorry, but I'm not a coder so don't really know if I'm barking up the wrong tree or not.
    Thanks
    for ( compsIndex = 0; compsIndex < compsCount; compsIndex++ ) {
                    var compRef = docRef.layerComps[ compsIndex ];
                    if (exportInfo.selectionOnly && !compRef.selected) continue; // selected only
                    compRef.apply();
                    var duppedDocument = app.activeDocument.duplicate();
                    var fileNameBody = exportInfo.fileNamePrefix;
                    fileNameBody += "_" + zeroSuppress(compsIndex, 4);
                    fileNameBody += "_" + compRef.name;
                    if (null != compRef.comment)    fileNameBody += "_" + compRef.comment;
                    fileNameBody = fileNameBody.replace(/[:\/\\*\?\"\<\>\|\\\r\\\n]/g, "_");  // '/\:*?"<>|\r\n' -> '_'
                    if (fileNameBody.length > 120) fileNameBody = fileNameBody.substring(0,120);
                    saveFile(duppedDocument, fileNameBody, exportInfo);
                    duppedDocument.close(SaveOptions.DONOTSAVECHANGES);

  • Question on design of new layer comps feature

    The new layer comp feature in Photoshop CC 2014 is great. It allows you to access the layer comps within smart objects from another file.
    One very important aspect seem to have gone missing though: Imagine you have 1 master document (e.g. website mockup) with several smart objects inside it (e.g. popup menus). Each of the smart objects have layer comps (e.g. folded / unfolded states) that I can access from the master document. Great!
    Now I want to save a layer comp in the master object that reconfigures layer comps on the various sub smart objects (e.g. showing menus opened/closed). This doesn't work.
    The reason it doesn't work is that a "published" layer comp on a smart object is a property of the smart object. A layer comp can only save visibility/layer styles/position but not properties. So I am forced to manually change the layer comp of all my included smart objects in order to reach the target look of my master document. This makes the feature much less useful.
    Am I missing something? It seems like such an obvious feature to have. Have you considered this when you designed the layer comps feature? Will it be an upcoming feature?

    I have the exact same problem. I thought this was the whole point of smart objects with layer comp states. Without this feature it seems pointless. 
    Avoiding having multiple layers is the reason you would use this. Now all we achieve is having smart objects instead of folders. Pretty ridiculous I must say.
    It even seemed from the presentation of the "new and improved layer comps" that you could do this. They skip that specific functionality, but it seems implicit in the presentation.
    Other thing is that the update position, style and visibility are buggy as hell. And another obvious feature of updating text-fields is missing as well.
    So we have to find plugins to help us. BUT cc 2014 doesnt allow for flash plugins and no HTML5 plugins are available. Thank you Adobe!

  • Why do vector lines appear different in my Photoshop document compared to the PDF that was created using "Scripts Layer Comps to PDF"? And how do I get them to look the same?

    Why do vector lines appear different in my Photoshop document compared to the PDF that was created using "Scripts > Layer Comps to PDF"? And how do I get them to look the same?

    BOILERPLATE TEXT:
    If you give complete and detailed information about your setup and the issue at hand, such as your platform (Mac or Win), exact versions of your OS, of Photoshop and of Bridge, machine specs, what troubleshooting steps you have taken so far, what error message(s) you receive, if having issues opening raw files also the exact camera make and model that generated them, etc., someone may be able to help you.
    Please read this FAQ for advice on how to ask your questions correctly for quicker and better answers:
    http://forums.adobe.com/thread/419981?tstart=0
    Thanks!

  • How to get active layer comp

    Is there a way of getting the active layer comp?
    I have a script that applies a series of layer comps saving different versions of the file in between, however it seems that on a very fast machine it the script tries to move onto saving before the layer comp is fully applied, so I would like to check which layer comp is applied and only let the script continue when the value changes from the last layer comp.

    Here is an example that get the current tool.
    function getCurrentTool()}
       var ref = new ActionReference();
       ref.putEnumerated( charIDToTypeID("capp"), charIDToTypeID("Ordn"), charIDToTypeID("Trgt") );
       return = typeIDToStringID(executeActionGet(ref).getEnumerationType(stringIDToTypeID('tool')));
    But for executeActionGet to work you need to create an Action Reference to the class or property you want to get the Action Descriptor for. Here is the scriptlistener log for apply layerComp.
    var idapplyComp = stringIDToTypeID( "applyComp" );
        var desc37 = new ActionDescriptor();
        var idnull = charIDToTypeID( "null" );
            var ref36 = new ActionReference();
            var idcompsClass = stringIDToTypeID( "compsClass" );
            ref36.putName( idcompsClass, "Layer Comp 1" );
        desc37.putReference( idnull, ref36 );
    executeAction( idapplyComp, desc37, DialogModes.NO );
    It has been my experence that when null is used in the reference you can not access that class with Action Manager.

  • Bandwidth from Access Layer to Distribution Layer

    Folks:
    I am currently on Chapter 12 of “CCNP Switching 642-813, Official Certification Guide” ISBN: 978-1-58720-243-8. I am currently not grasping the three layers entirely, and I was hoping someone could offer insight in a different way.
    I believe I understand, that switches in the Access-Layer can be layer2 devices (2950, etc), and devices in the Distribution Layer should be Multilayer devices such as Layer-3 switches (3750) and inter-vlan routing takes place at the Distribution layer. But what I do not understand – how does one account for bandwidth and traffic from the Access Layer switches to the Distribution Switches?
    Let use a 24 port 2950 switch located at the Access-Layer. If everyone was online and communicating, the total traffic for the switch would be 4.8 Gbps. The latter is due to each port providing 100 Mbps but in Full-Duplex, so (100*2)*24. So, how does an engineer spec out the required uplink ports from the Access Layer to the Distribution?
    I am sure this is easy; however, I am not getting the concepts. Any insight is great.

    Disclaimer
    The Author of this posting offers the information contained within this posting without consideration and with the reader's understanding that there's no implied or expressed suitability or fitness for any purpose. Information provided is for informational purposes only and should not be construed as rendering professional advice of any kind. Usage of this posting's information is solely at reader's own risk.
    Liability Disclaimer
    In no event shall Author be liable for any damages whatsoever (including, without limitation, damages for loss of use, data or profit) arising out of the use or inability to use the posting's information even if Author has been advised of the possibility of such damage.
    Posting
    As noted by Peter, edge hosts don't generally all concurrently push/pull their full port bandwidth for substained periods.  However, host bandwidth usage often varies much by "kind" of host.  For example, many server hosts are "busier" than most user hosts, so when designing networks you normally design for lower oversubscription ratios for server hosts than for user hosts.  Old rule-of-thumbs ratios suggest oversubscription ratios of about 8:1 to 4:1 for servers, and about 48:1 to 24:1 for users.
    Keep in mind that oversubscription ratios can be "skewed" by what the host is doing, i.e. not all server or user hosts have similar bandwidth demands.  For example, your primary mail server or primary file server might be much "busier" than other server hosts.  Likewise, some user hosts might be much "busier", for example, years ago I supported a LAN segment of CADD (20) workstations which had more traffic on their local LAN than the (2,000 user) corporate backbone.

  • Object services - manual implementation of database access layer

    Hello,
    this is my first time with object services. I read a lot but can't find the information which I really need to implement my requirements.
    I have build a persistent class, clicked to "persistence", mapped my persistent attributes. I want to use a table-like attribute in my class, which contains references to another class. I added this attribute manually to the attribute list in the class builder. Consequently, GET and SET methods were generated automatically. Then I changed the generator settings by activating "manual implementation of database access layer".
    So, my first notice is - If I choose manual implementation a call of create_persistent-method will not work. Nothing will be inserted into the mapped data base table.
    Can anybody give me a example which shows how I can implement the database access layer manually? What do I have to do to write object attributes into data base table?
    Which methods do I have to enhance?
    Thanks a lot for any help in advance!
    Anne

    Thanks for your answer, but I would not be sure if you really got my problem.
    I really really read much stuff (including SAP help, sappress "object services in ABAP" by Assig, Fobbe, Niemitz, sappress "abap objects" by keller), I googled a lot. But I couldn't find detailed information about this manual implementation of database access which you can activate in persistence settings.
    This is the only extract out of SAP Help regarding this topic:
    "If you prefer to carry out a manual implementation of the database access layer, select  to change the generator settings and select the field of the same name. In this case you can implement your own database read routines, through which you can redefine the generated SET and GET methods for access to the database. This is particularly recommended if you want to improve performance by providing these routines with their own buffer mechanism. "
    And some information about so calles Structure mapping which means the same idea in my opinion
    "Structure Mapping
    In this case, you map ABAP Dictionary structures, rather than database tables or database views to persistent objects. The application developer must therefore program the type of persistent data storage in the appropriate methods of the class actor.
    You will need to map a structure (or structures) if you want a persistent object to contain table-like attributes. Database tables can only have flat structures, which prevents your mapping the object to a table in this case. You must still use structure mapping, even if you want to store the data in a different form u2013 such as in a file on the application server."
    I used the debugger to get the idea of the SAVE method. But I couldn't find the difference between manual and automatic implementation in the code.
    I tried to use implicit enhancement, but was not successful. Right now I am trying to redefine the SAVE method of the interface IF_OS_CA_SERVICE. But I can't believe that I have to implement the whole attribute-table-mapping on my own now. That can't be the idea of object service and their manual implementation. In my opinion it must be possible to use predefined algorithm to map business key etc. to corresponding table fields and to implement own ideas just for those table-like attributes..
    Or am I totally wrong with this thoughts?
    Thanks in advance!!
    Anne

  • Trying to figure out Layer Comps

    I recently found out about Layer Comps, and I'm trying to use them.  Does anyone have a pointer to documentation that'll tell me what they can and CAN'T do?
    Here's my situation...  Normal image, go into PS from LR and do my "normal" editing.  When I'm done I have my have dozen layers.  I do a Merge Visible, then
    realize I want a Layer Comp of the image without the Merge Visible.  So, I create one with the Merge Visible layer turned off. 
    Then, I go back and turn on that layer, then do a free Transform and shorten the image so it'll fit an 11x14 the way I want...  It started 4288 pixels high and I shortened it about 3-400 pixels.
    Create ANOTHER Layer Comp.
    Then, I look at it and decide I'd like a black & white version so I put a B&W layer on the image.  Adjust and when I'm done, create a third layer comp.....
    Looking at the image I realize I'm gong to need a small version for the website, so I turn off the b&w layer, crop again to 1024x768 and create a final layer comp.....
    But, once I think about it, I realize I should do my crop to 1024x768 from the image PRIOR to the shortening to fit the 11x14, so I go back and activate the first layer comp I
    created, that SHOULD just have my original, basic layers...  Which is appears to, BUT the image is shortened.  It appears that my cropping or using the Free Transform
    to alter the image IS NOT undone when I go back to the earlier Layer Comp...
    All the stuff I've read so far just tells me how to create one, copy it, and delete it.  But I haven't found the information the enables me to use the Layer Comp to move back in time
    so I can crop in multiple shapes and things like that...  Am I expecting something from the Layer Comp that it can't do, or am I doing something incorrectly?
    I'll keep playing to see if I stumble on the answer, but I figured I'd ask the experts in here.

    davepinminn wrote:
    Are the snapshots in History persistent across sessions?
    No...
    There are useful tutorials on how to use Layers Comps out there...but the bottom line is Layer Comps store the state of visibility of a certain set of layers/groups. Ig you change the layers or groups by adding/deleting layers/groups, you'll need to update the saved layer comps you made. Try right-clicking on the layer comp to update a saved comp based on changes made to the various layers/groups that existed when you made the comp. Yes, it's a brain teaser…none of this stuff is "easy" until you leaner how they are supposed to behave (and then learn how to take advantage of the functionality provided).

  • Does Photoshop CS5, 6, or CC allow slicing with layer comps?

    I love the layer comps feature. It's a huge time saver and allows me to keep my files sizes smaller.
    One thing I just noticed since I normal hand off my PSDs to a developer is that the slices don't save with each layer comp. Is there any way to make this possible with CS5, 6, or CC even? It'd be a huge time saver and really helpful. I currently use CS5 at work, but I have CC at home.
    Thanks for your help!
    -Joe

    Personally, if I were in your shoes I would subscribe to the CC photographer bundle. It sounds like you're really ready to jump into it with a great new camera so why learn and work in an outdated application?
    Don't get me wrong . . . I have CS5 also, but I got the photographer bundle because it's such a great deal and I love always having the very latest version of PS. I should also emphasize that the bundle includes Lightroom, which will be invaluable to you as a photographer.
    In summary, PS CS5 is still a great app but it's reached "end of life." Photoshop CC on the other hand is always being updated . . . at no extra cost. Camera Raw for PS CC, for example, is currently at v. 8.7.1. Whenever you might read about some great new feature in PS you can check it out at lynda.com and rest assured that you will have access to it when you update. There is one caveat: you don't say what you have for a computer and OS but you want to be sure to check system requirements for PS CC: System requirements | Photoshop

  • Best way to import layer comps as states in Catalyst?

    Is there a native way in Catalyst to break the layer comps into separate states?
    Right now it seems my only recourse is to manually export layer comps to separate images from photoshop and then arrange them as states in Catalyst. Of Course this way I lose my layers and other psd information. Having a proliferation of psds will become unwieldy very quickly.

    Automatically converting Photoshop layer comps to States in Catalyst is not within the scope of version 1.0. However support for individually identifying layer comps and importing them is. In Beta 1, there's a bug that keeps this latter functionality from working correctly. So be on the lookout for a fix in the next beta build. You can spot this feature in the Advanced Photoshop import dialog (click the Adv. button at lower left of the basic Import dialog). In the Advanced settings, you'll see a drop down menu of available comps is presented. But due to the bug, Beta 1 doesn't pay attention to what you choose in this menu.
    Once we fix the above bug, for 1.0 the suggested workflow is: Import the initial application state's layer comp using the Advanced dialog; then generate a new blank state in Catalyst and import the next layer comp/appearance state there. Currently, hidden artwork is always ignored via the Advanced dialog, so you won't end up with duplicate objects after importing multiple comps.
    A couple of additions that should be helpful in future builds: a) Rather than always ignoring hidden layers in the Advanced dialog you'll be presented with a choice to either preserve or ignore them, b) when importing, we'd like to compare the artboard's dimensions to the dimensions of an incoming file and subsequently align the two if they match. This function coupled with Catalyst's pixel snapping should ensure that artwork in each layer comp is properly aligned with that which exists in another application state.
    -Eric
    Catalyst QE

  • Layer Comps New Text option!

    Hi,
    I am using layer comps so much in my work flow.
    Can you please add a feature of having the text option same as we have the visibility, position, fx.
    Then say if I have the button i can create the different text options with the layer comps.
    Thanks
    Muhammad Jamal

    Can you please add a feature of having the text option same as we have the visibility, position, fx.
    This is a user to user Forum, so you are not really addressing Adobe here, even though some Adobe employees thankfully have been dropping by.

Maybe you are looking for

  • Problems with printing from SQL Developer Data Modeler 2.0

    Hi, I am not able to print my Relational Model (SubView) from Data Modeler 2.0 Build 584. Only an empty page comes out. If I don't reduce the Print Scale (usually to 10-30%) I get something but then it is lots of pages. I have tried A4 and A3 format.

  • Problem with displaying key figures in report

    Does anyone have experience with SAP Report Designer for Release 7.0. I want to display key figures in the following manner: 1'500 (Which means 1.500.000) For a billion the value displaye should be 1''000 (1.000.000.000). 1000 =     1.000 0'010 =    

  • Java.lang.NullPointerException errors when creating an object in Int.Build.

    We are on XI 7.0 AIX 64bit When we try to create an object in Integration Builder we get following errors: Internal Problem Occured (Internal Problem) java.lang.NullPointerException I have seen similar topics reported. They pointed to problems with S

  • Get bounds of document using applescript

    I am after getting the bounds of the document in Pages.  I am aware one can use the window object to get the bounds of the window but I am after the bounds of the document  itself.  This can obviously vary when the 'Notes' pane is open etc so I can't

  • Error #1009 in as3 code to install an Air application from an embedded swf.

    Hi, I am getting error #1009 in my code when i try to install the application. I am new to action script and below is the code for my installer. var airSWF:Object; // This is the reference to the main class of air.swf var airSWFLoader:Loader = new Lo