How to add metadata to a linked smart object?

Hello

I would like to add metadata custom linked smart objects. This metadata should not be visible in the Photoshop application but should only be accessed from javascript in extensions CEP. Also it must be registered with the PSD file so that when it is reopened I've always read. How can I do? Thank you!

This is my adaptation of the Adobe settings Generator plugin methods. Either it is intended for generator plugins store settings in the PSD, but should work even if there is no plugin because it is just a json string and IDs payload

Generator Adobe of base (see get/setGeneratorSettings.jsx) at Github: generator-core/lib/jsx to the master of adobe-photoshop/generator-core · GitHub

setPluginSettings: function(layer, settings) {
  if (layer && settings) {
  var settings_desc = new ActionDescriptor()
  settings_desc.putString(stringIDToTypeID("json"), Globals.encodeJson(settings))

  var ref = new ActionReference()
  ref.putProperty(charIDToTypeID("Prpr"), stringIDToTypeID("generatorSettings"))
  if (layer.typename == "Document") {
  ref.putIdentifier(charIDToTypeID("Dcmn"), layer.id)
  } else {
  ref.putIdentifier(charIDToTypeID("Lyr "), layer.id)
  }    

  var action_desc = new ActionDescriptor()
  action_desc.putReference(charIDToTypeID("null"), ref)
  action_desc.putObject(charIDToTypeID("T   "), charIDToTypeID("null"), settings_desc)
  action_desc.putString(stringIDToTypeID("property"), "YOUR_PLUGIN_ID")
  executeAction(charIDToTypeID("setd"), action_desc, DialogModes.NO)
  }
},
getPluginSettings: function(layer) {
  if (layer) {
  var ref = new ActionReference()
  ref.putProperty(charIDToTypeID("Prpr"), stringIDToTypeID("generatorSettings"))
  if (layer.typename == "Document") {
  ref.putIdentifier(charIDToTypeID("Dcmn"), layer.id)
  } else {
  ref.putIdentifier(charIDToTypeID("Lyr "), layer.id)
  }    

  var action_desc = new ActionDescriptor()
  action_desc.putReference(charIDToTypeID("null"), ref)
  action_desc.putString(stringIDToTypeID("property"), "YOUR_PLUGIN_ID")

  var desc = executeAction(charIDToTypeID("getd"), action_desc, DialogModes.NO)
  // var result = Photoshop._parseActionDescriptor(desc)
  if (desc) {
  var generator_id = stringIDToTypeID("generatorSettings")
  if (desc.hasKey(generator_id)) {
  var generator_data = desc.getObjectValue(generator_id)
  var json_id = stringIDToTypeID("json")
  if (generator_data.hasKey(json_id)) {
  var json_data = generator_data.getString(json_id)
  if (json_data) {
  return Globals.decodeJson(json_data)
  }
  }

  }
  }
  }
}

Tags: Adobe

Similar Questions

  • How update you the location of linked smart objects?

    The new feature of the linked smart object has a discrete function but it fundamentally changes our workflow for the better!

    Quick question, is possible to update the paths to the linked smart objects or Photoshop it will work to? I can't see a links under window or file panel so do not know how do you sorry.

    I am about to change these files at home and want to make sure that Photoshop can find the links - but also find everything when I copy everything back on the server and work.

    See you soon

    Ben

    If a link is moved from its location, when you open the file that contains the link, you will get a dialog box asking to located the missing file.

  • How to find info for Missing Linked Smart Object

    I received a file from another vendor, and they have a layer of dynamic object bound within the photoshop file that is missing.

    Is it possible to determine the layer file name/path/owner? In Illustrator and InDesign, it's possible, but I see no way to determine any info on the link. I need to communicate to the seller, what lack us.

    Hello

    You do not get the missing link dialog box?

    Another place to look is in the properties panel with the targeted layer.

    Steve

  • How to add metadata to split titles

    I know how to do one track, but when I click on the next track it always shows the name of the previous track. How to add metadata to split multiple tracks for like a mixtape?

    Thanks for the screenshots, very useful.

    Once divide you it into different tracks, and each track is another file on the disk (as shown in your Windows Explorer / Finder screenshot), you'll want to:

    • Go through each file
    • Enter the metadata you want via the metadata Panel (see below)
    • Save each file

    If you work with MP3 files, the areas concerned are the tags ID3 listed in this dialog box:

    If you save as WAVE files, RIFF relevant metadata fields displayed in this dialog box

    Once you enter the information you want in the fields and save them as file, so it should appear in the Windows Explorer, which is what I think you're going to.

  • How to place a linked smart object?

    Hello

    It is possible to place linked smart object in photoshop document uses Photoshop plugin SDK or CEP extension sdk? Thank you!

    Yes. Here is the JavaScript code to do this via the extension of the CEP.

    // =======================================================

    var idPlc = charIDToTypeID ("Plc");

    var desc11 = new ActionDescriptor();

    var idIdnt = charIDToTypeID ("Idnt");

    desc11.putInteger (idIdnt, 2);

    var idnull = charIDToTypeID ("null");

    desc11.putPath (idnull, new file ("C:\\Users\\notme\\Desktop\\Untitled-1.psd"));

    var idLnkd = charIDToTypeID ("Lnkd");

    desc11.putBoolean (idLnkd, true);

    var idFTcs = charIDToTypeID ("CIE");

    var idQCSt = charIDToTypeID ("QCSt");

    var idQcsa = charIDToTypeID ("Qcsa");

    desc11.putEnumerated (idFTcs, idQCSt, idQcsa);

    var idOfst = charIDToTypeID ("Ofst");

    var desc12 = new ActionDescriptor();

    var idHrzn = charIDToTypeID ("Hrzn");

    var idRlt = charIDToTypeID ("#Rlt");

    desc12.putUnitDouble (idHrzn, idRlt, 0.000000);

    var idVrtc = charIDToTypeID ("Vrtc");

    var idRlt = charIDToTypeID ("#Rlt");

    desc12.putUnitDouble (idVrtc, idRlt, 0.000000);

    var idOfst = charIDToTypeID ("Ofst");

    desc11.putObject (idOfst, idOfst, desc12);

    executeAction (idPlc, desc11, DialogModes.NO);

  • Where are my linked smart objects linked too?

    So, I spent an hour looking online for what I thought was going to be a simple answer. Did not find.

    I work with a large team and we use linked smart objects. Us link to change some of the smart objects related to others. Normally I the old version of archives and solve the problem when I noticed the broken link, but I can't take the risk of a person including bad assets before that he go to dev.  Y at - it a simple dialog box or something that tells me that it is other files my linked smart objects linked too?

    I think that a Scripting solution is possible, but no default option for that comes to mind.

    Edit: An approach to script can use the filePaths listed in the XMP metadata but that gets refreshed only to save, it seems, so if the files have been placed as connected or associated SO deleted since the last save those not translate correctly.

    Including registration in the Script might however, make much of time and with 'Save in the background' it could still be problematic.

  • You can extract higher resolutions of Smart Objects or linked smart objects?

    When I design at resolution of x 1, can I retrieve assets of smart objects and smart objects related to 2 x or more? If so, how they evolve upward?

    Yes, with reservations.

    PSD and Illustrator smart objects are also a new made and scaling smoothly to the requested resolution.

    Other dynamic objects (including those with filters) are only intensified since the resolution they are running in the Photoshop file. If you want to perform a new rendering, you can paste 100% resolution in a linked smart object and get the scaling smoothly.

  • Photoshop: Edit a linked smart object in Illustrator

    I've created a few vector shapes and text in Illustrator and paste in Photoshop as a vector object smart. I re - uses these elements, so I the converted to a linked smart object. Awesome. But now, when I double-click items in Photoshop to edit in Illustrator, the linked file just opens preview (I use Mac OS). It is possible to manually edit the linked file by double-clicking it in the Finder and selecting open in Illustrator. It is possible but not very effective. Converted into a dynamic linked object removes the ability to quickly open/edit my Photoshop vectors?

    Yes, it removes only the ability. To be able to do what you want, you must integrate the smart AI object in your file. It is inefficient.

  • Display linked smart object problem?

    I was really kissing linked smart objects recently. However I found on a few occasions, there are cases where a linked smart object seems to strangely, and I see pixels rounded curiously - almost as if she started scaling the picture a bit.

    Screen Shot 2015-12-16 at 08.03.04.png

    The smart object linked above is correct, but the one below (linked the same file) is rendered differently. Two smart objects have been placed with identical dimensions, any scaling that occur here. Whenever I for now, place this file in the PSD I have this display problem. Around him, my only way is by duplicating that rendered correctly.

    Has anyone else encountered this problem?

    I worked on it.

    Essentially, when you insert the linked smart object even if I was seized to display 100% width & height (by default, that it has been globally as the source PSD has a smaller width/height), I had to then move the smart object after setting width & height 100% in order to then render correctly.

  • Linked smart objects nested within the smart object, not automatically update

    I notice that if I have a smart object bound or smart, group with other layers in a new smart object feature updates of content updated the stops working and has to be done manually.

    This would be the creation of a mobile application by saying where I need the same key throughout all my 10 files.

    Say I have a button throughout several documents and would like to be able to easily change the color in all documents. I'd create an object bound and intelligent color sample. Then in my paper, I put this object linked above my shape of button and create a clipping mask. Then create a dynamic object out of these 2 layers.  I place this same button in all my documents. In my mind, I would always open the object bound and smart (color chart), change the color and it should be updated for the buttons in all of my open documents.

    This is not updated in the document all. Need to go in the dynamic button object and update updated content.

    Using Photoshop | Working with dynamic objects

    The link above

    Note:

    While the detection of changes to the linked smart objects or update a linked Smart object, Photoshop examines the immediate linked file. Links embedded within dynamic objects are not updated.

  • How to add an external url link to a navagation button in Dreamweaver Cs5.5

    How or can I add an external url link to a navagation button in Dreamweaver Cs5.5. If I try the link/properties it says that the link is an html element and not a css...

    Thank you

    Binding is done in HTML, not CSS (with the exception of a link to a background picture)

    So, if your navigation is a list, you should have the following in your HTML code:

    Here, in the example above, I use the

  • CS6 & CC 2015, bridge how to add metadata and keywords in MXF files

    Hello

    I can't add metadata and keywords to my my new video camera of Sony MXF files.  I tried Bridge CS6 & CC 2015.

    I'd appreciate very much all the advice to achieve this!

    Best regards, Jose

    I think with these types of files, you get a third party app to change the metadata.

  • How to add metadata to the JPG format without changing the image data

    I have a JPG file and I want to use Photoshop to simply add metadata to the image - the author, the copyright of some tags. I don't want to change anything in the data of the image itself, but chsaving file does not change, even if I select the highest quality. I know that it has changed because the hashcount for the actual image data has changed; I also see changes in areas of the DHT and DQT and I need avoid these changes.

    Photoshop is the wrong tool, then you can use Bridge for example.

  • location of linked smart objects

    I have several PSD with a bunch of smart objects linked files that are organized in different folders. I am trying to replace a bunch of them (they all share a folder) in all my PSD and I that this change of name the chip original object file location to something else and by creating a folder with the name of old and new smart objects would automatically do this. It turns out that my PSD is still tied to the old smart objects despite the change in name of folder!

    I am very confused about what rename files has always broken links to files in other software (for example: indesign)

    How is photoshop followed by my folder name change? I even tried to move the location of the entire record without result, he still finds the photoshop.

    Is there a simple way to do what I want?

    It is finally worked after the addition of ' ~ ' at three levels of different folders

  • How to add listbox form in string array objects

    Hello

    I need help related to listbox

    1. currently, I am able to select and implement string in array

    Prob is

    ex.

    When I select the point 1 and 1 point will be created on arrayString but when I select article 2 and article 3 then arrary string poster article 2 and article 3 and article 1 is deleted.

    So please let me know how to add, add and delet listbox to string in array.

    2. how popup listbox and allow the user to add, delet or add the items in the listbox control and the transfer to the string table

    I have my code atatched. Please help me.

    Thank you

    Clement

    Sorry, try this:

Maybe you are looking for