Skip to main content
Participant
February 6, 2018
Question

How can I edit "Category" in IPTC-IIM in Bridge CC 2018?

  • February 6, 2018
  • 2 replies
  • 1126 views

Hello,

for some agencies I still have to edit the "Category" in IPTC-IIM, Legacy. In Bridge CC 2018 (on Mac) I can see the categories in the Metadata-panel but can't edit it there nor in the Information field.

I know the field is a “depreciated” entry for many years, but my customers use it so I have to use it. In the 2017 edition of Bridge or PS it was still possible. Do I miss any entries in the preferrences?

Thanks a lot,

Robert

    This topic has been closed for replies.

    2 replies

    Stephen Marsh
    Community Expert
    Community Expert
    February 7, 2018

    Keep in mind that the legacy IPTC:Category entry was officially only 3 characters.

    Guideline for mapping Category Codes to Subject NewsCodes

    The Photoshop:Category entry will allow more characters to be written, however when Adobe software also writes out the legacy metadata to the IPTC:Category field the entry will be truncated to 3 characters. The “problem” with many “official industry specific” metadata fields is that they are not correctly used by people outside of the specific industry… so there may be a potential discrepancy between these two fields, depending on the software used to enter and or view this data.

    SuperMerlin
    Inspiring
    February 7, 2018

    You could use a script...

    #target bridge  

    if( BridgeTalk.appName == "bridge" ) { 

    Category = MenuElement.create( "command", "Edit Category","at the end of Thumbnail");

    }

    Category.onSelect = function () {

    if (ExternalObject.AdobeXMPScript == undefined)  ExternalObject.AdobeXMPScript = new ExternalObject("lib:AdobeXMPScript");

    thumb = app.document.selections[0];

    app.synchronousMode = true;

    var xmp = new XMPMeta(thumb.synchronousMetadata.serialize());

    Cat = "";

    if( xmp.doesPropertyExist(XMPConst.NS_PHOTOSHOP, "Category") ){

        Cat = xmp.getProperty(XMPConst.NS_PHOTOSHOP, "Category");

        }

    var win = new Window("dialog", "Set Category");

    win.p1= win.add("panel", undefined, undefined, {borderStyle:"black"});

    win.p1.alignChildren="fill";

    win.g10 =win.p1.add('group');

    win.g10.orientation = "row";

    win.g10.alignment="left";

    win.g10.st1 = win.g10.add("statictext",undefined,decodeURI(thumb.name));

    win.g20 =win.p1.add('group');

    win.g20.orientation = "row";

    win.g20.alignment="left";

    win.g20.st1 = win.g20.add("statictext",undefined,"Category:- ");

    win.g20.et1 = win.g20.add("edittext",undefined,Cat);

    win.g20.et1.preferredSize=[100,20];

    win.g200 =win.p1.add('group');

    win.g200.orientation = "row";

    win.g200.alignment="center";

    win.g200.bu1 = win.g200.add("button",undefined,"Update Field");

    win.g200.bu2 = win.g200.add("button",undefined,"Cancel");

    win.g200.bu1.onClick=function(){

    if(win.g20.et1.text == ""){

        alert("No Category has been entered!");

        return;

        }

    win.close(0);

    xmp.setProperty(XMPConst.NS_PHOTOSHOP, "Category",win.g20.et1.text);

    var newPacket = xmp.serialize(XMPConst.SERIALIZE_USE_COMPACT_FORMAT);

    thumb.metadata = new Metadata(newPacket);

    ExternalObject.AdobeXMPScript.unload();

    ExternalObject.AdobeXMPScript = undefined;

    }

    win.show();

    };

    leandromarino
    Participant
    October 3, 2019
    I tried to save as .jsx and run with the startup of the bridge. But i'm still not seeing how to put that. would you help me in solving that?