#target bridge //----------------------------------------------------------------------- //This script updates the colour labels in Bridge //so they are the same as those in iView //The AdobeLibrary scripts must be loaded //-------------------------------------------------------------------- var iViewMapping = Array ("None","Red","Green","Blue","Brown","Magenta","Orange","Yellow","Cyan","Gray"); newMenu = MenuElement.create("menu", "iView", "-at the end of Labels", "ivMenu"); writeCommand = MenuElement.create("command", "Copy iView colour to Bridge", "at the end of ivMenu", "myColour1"); writeCommand.onSelect = function (m) { var getFolderChildren = true ; var filesOnly = true ; var thumbs = getBridgeThumbnails ( TYPES.PHOTOSHOP_OPENABLE, getFolderChildren, filesOnly) ; for ( var i = 0; i < thumbs.length; i++ ) { thumb = thumbs[i]; md = thumb.synchronousMetadata; md.namespace ="http://ns.adobe.com/photoshop/1.0/"; fldUrgency = md.Urgency; md.namespace ="http://ns.adobe.com/xap/1.0/"; if( fldUrgency == "None" ) md.Label = ""; else if( fldUrgency == "High" ) md.Label = iViewMapping[1]; else if( fldUrgency == "Normal" ) md.Label = iViewMapping[5]; else if( fldUrgency == "Low" ) md.Label = iViewMapping[8]; else md.Label = iViewMapping[fldUrgency]; } }; writeCommand = MenuElement.create("command", "Copy Bridge colour to iView", "at the end of ivMenu", "myColour2"); writeCommand.onSelect = function (m) { var getFolderChildren = true ; var filesOnly = true ; var thumbs = getBridgeThumbnails ( TYPES.PHOTOSHOP_OPENABLE, getFolderChildren, filesOnly) ; for ( var i = 0; i < thumbs.length; i++ ) { thumb = thumbs[i]; md = thumb.synchronousMetadata; md.namespace ="http://ns.adobe.com/xap/1.0/"; var brLabel = md.Label ; md.namespace ="http://ns.adobe.com/photoshop/1.0/"; if( brLabel == "" ) md.Urgency = 0; else if( brLabel == "Red" ) md.Urgency = "High"; else if( brLabel == "Yellow" ) md.Urgency = "7"; else if( brLabel == "Green" ) md.Urgency = "2"; else if( brLabel == "Blue" ) md.Urgency = "3"; else if( brLabel == "Purple" ) md.Urgency = "5"; } };