2 Replies Latest reply on Apr 30, 2013 10:16 PM by JJMack

    Original filename for Smart Objects in CS6

    rj acton Level 1

      After processing a camera raw image in ACR, I want to open the image in CS6 as a Smart Object.

       

      Then I want to run a java script that depends on the original filename.  Where in the metadata can I find the original filename?

       

      Background:  I have a script that executes very well if the file is opened in CS6 as a regular layer.  However, when I open a file as a Smart Object, the script fails, complaining about an invalid filename.

       

      The problem is associated with my favorite time-saving script and I am very keen to resolve the problem.   :-(

       

      Thank you for your assistance.

       

      BA

      .....

        • 1. Re: Original filename for Smart Objects in CS6
          Michael L Hale Level 5

          A normal file open with create a document from that file and associate the file with the document. So those types of documents have filenames. When you open as smart object, Photoshop creates a new documents and embeds the file in the smart object layer. It does not associate or link to the embeded file.

           

          Using Action Manger you can determine the filename of the embeded image. But the name only, not the full path. The document's metadata does not have any info about the embedded file.

           

          My guess is your script fails because it's trying to access the document.fullName property which does not exist for new or open as smart object documents.

          • 2. Re: Original filename for Smart Objects in CS6
            JJMack Most Valuable Participant

            rj acton wrote:

             

            After processing a camera raw image in ACR, I want to open the image in CS6 as a Smart Object.

             

            Then I want to run a java script that depends on the original filename.  Where in the metadata can I find the original filename?

             

            Background:  I have a script that executes very well if the file is opened in CS6 as a regular layer.  However, when I open a file as a Smart Object, the script fails, complaining about an invalid filename.

            I think the the only reason it works when you open them as a regular layer is because of your work-flow and habits. Try opening it twice as a normal layer an see if it works.

             

            When you open a RAW file through ACR as a normal layer and as a smart object layer there is no backing file associated with the open document yet.   I feel you problem is you script is using something like the document name.   If you look at the title in the image floating window or tab you will see that Photoshop has assigned a name the first time you open it as a normal layer you will see something like filename.cr2 @ 25% (RGB16) the second time you will see filename-2 @ 25% (RGB16) when you open as Object you will see filename as smart object-1 (filename, RGB16). These title will change when you save the document to a image file type the title will change to the associated backing file you just saved.

             

            I you look at Photoshop File info you can see all the image metadata and you can find the RAWFileName you want here a text file I wrote using a  Photoshop script

            metadata.jpg

            It is enev in small jpef file saved from raw conversions if you don't strip mete data

             

            <x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="Adobe XMP Core 5.3-c011 66.145661, 2012/02/06-14:56:27        ">
               <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
                  <rdf:Description rdf:about=""
                        xmlns:xmp="http://ns.adobe.com/xap/1.0/">
                     <xmp:ModifyDate>2010-08-16T22:47:35-04:00</xmp:ModifyDate>
                     <xmp:CreateDate>2009-04-25T15:20:46</xmp:CreateDate>
                     <xmp:Rating>0</xmp:Rating>
                     <xmp:MetadataDate>2010-08-16T22:47:35-04:00</xmp:MetadataDate>
                     <xmp:CreatorTool>Adobe Photoshop CS5 Windows</xmp:CreatorTool>
                  </rdf:Description>
                  <rdf:Description rdf:about=""
                        xmlns:dc="http://purl.org/dc/elements/1.1/">
                     <dc:format>image/jpeg</dc:format>
                     <dc:creator>
                        <rdf:Seq>
                           <rdf:li>McAssey</rdf:li>
                        </rdf:Seq>
                     </dc:creator>
                  </rdf:Description>
                  <rdf:Description rdf:about=""
                        xmlns:aux="http://ns.adobe.com/exif/1.0/aux/">
                     <aux:SerialNumber>237498</aux:SerialNumber>
                     <aux:LensInfo>300/1 300/1 0/0 0/0</aux:LensInfo>
                     <aux:Lens>300.0 mm</aux:Lens>
                     <aux:LensID>142</aux:LensID>
                     <aux:ImageNumber>48302</aux:ImageNumber>
                     <aux:FlashCompensation>0/1</aux:FlashCompensation>
                     <aux:OwnerName>McAssey</aux:OwnerName>
                     <aux:Firmware>1.2.3</aux:Firmware>
                  </rdf:Description>
                  <rdf:Description rdf:about=""
                        xmlns:crs="http://ns.adobe.com/camera-raw-settings/1.0/">
                     <crs:RawFileName>LO2G5037.CR2</crs:RawFileName>
                     <crs:Version>6.1</crs:Version>
                     <crs:ProcessVersion>5.7</crs:ProcessVersion>
                     <crs:WhiteBalance>Custom</crs:WhiteBalance>
                     <crs:Temperature>5350</crs:Temperature>
                     <crs:Tint>-22</crs:Tint>
                     <crs:Exposure>0.00</crs:Exposure>
                     <crs:Shadows>5</crs:Shadows>
                     <crs:Brightness>+65</crs:Brightness>
                     <crs:Contrast>+25</crs:Contrast>
                     <crs:Saturation>0</crs:Saturation>
                     <crs:Sharpness>25</crs:Sharpness>
                     <crs:LuminanceSmoothing>0</crs:LuminanceSmoothing>
                     <crs:ColorNoiseReduction>0</crs:ColorNoiseReduction>
                     <crs:ChromaticAberrationR>0</crs:ChromaticAberrationR>
                     <crs:ChromaticAberrationB>0</crs:ChromaticAberrationB>
                     <crs:VignetteAmount>0</crs:VignetteAmount>
                     <crs:ShadowTint>0</crs:ShadowTint>
                     <crs:RedHue>0</crs:RedHue>
                     <crs:RedSaturation>0</crs:RedSaturation>
                     <crs:GreenHue>0</crs:GreenHue>
                     <crs:GreenSaturation>0</crs:GreenSaturation>
                     <crs:BlueHue>0</crs:BlueHue>
                     <crs:BlueSaturation>0</crs:BlueSaturation>
                     <crs:FillLight>0</crs:FillLight>
                     <crs:Vibrance>+21</crs:Vibrance>
                     <crs:HighlightRecovery>0</crs:HighlightRecovery>
                     <crs:Clarity>0</crs:Clarity>
                     <crs:Defringe>0</crs:Defringe>
                     <crs:HueAdjustmentRed>0</crs:HueAdjustmentRed>
                     <crs:HueAdjustmentOrange>0</crs:HueAdjustmentOrange>
                     <crs:HueAdjustmentYellow>0</crs:HueAdjustmentYellow>
                     <crs:HueAdjustmentGreen>0</crs:HueAdjustmentGreen>
                     <crs:HueAdjustmentAqua>0</crs:HueAdjustmentAqua>
                     <crs:HueAdjustmentBlue>0</crs:HueAdjustmentBlue>
                     <crs:HueAdjustmentPurple>0</crs:HueAdjustmentPurple>
                     <crs:HueAdjustmentMagenta>0</crs:HueAdjustmentMagenta>
                     <crs:SaturationAdjustmentRed>0</crs:SaturationAdjustmentRed>
                     <crs:SaturationAdjustmentOrange>0</crs:SaturationAdjustmentOrange>
                     <crs:SaturationAdjustmentYellow>0</crs:SaturationAdjustmentYellow>
                     <crs:SaturationAdjustmentGreen>0</crs:SaturationAdjustmentGreen>
                     <crs:SaturationAdjustmentAqua>0</crs:SaturationAdjustmentAqua>
                     <crs:SaturationAdjustmentBlue>0</crs:SaturationAdjustmentBlue>
                     <crs:SaturationAdjustmentPurple>0</crs:SaturationAdjustmentPurple>
                     <crs:SaturationAdjustmentMagenta>0</crs:SaturationAdjustmentMagenta>
                     <crs:LuminanceAdjustmentRed>0</crs:LuminanceAdjustmentRed>
                     <crs:LuminanceAdjustmentOrange>0</crs:LuminanceAdjustmentOrange>
                     <crs:LuminanceAdjustmentYellow>0</crs:LuminanceAdjustmentYellow>
                     <crs:LuminanceAdjustmentGreen>0</crs:LuminanceAdjustmentGreen>
                     <crs:LuminanceAdjustmentAqua>0</crs:LuminanceAdjustmentAqua>
                     <crs:LuminanceAdjustmentBlue>0</crs:LuminanceAdjustmentBlue>
                     <crs:LuminanceAdjustmentPurple>0</crs:LuminanceAdjustmentPurple>
                     <crs:LuminanceAdjustmentMagenta>0</crs:LuminanceAdjustmentMagenta>
                     <crs:SplitToningShadowHue>0</crs:SplitToningShadowHue>
                     <crs:SplitToningShadowSaturation>0</crs:SplitToningShadowSaturation>
                     <crs:SplitToningHighlightHue>0</crs:SplitToningHighlightHue>
                     <crs:SplitToningHighlightSaturation>0</crs:SplitToningHighlightSaturation>
                     <crs:SplitToningBalance>0</crs:SplitToningBalance>
                     <crs:ParametricShadows>-25</crs:ParametricShadows>
                     <crs:ParametricDarks>-13</crs:ParametricDarks>
                     <crs:ParametricLights>+13</crs:ParametricLights>
                     <crs:ParametricHighlights>+25</crs:ParametricHighlights>
                     <crs:ParametricShadowSplit>25</crs:ParametricShadowSplit>
                     <crs:ParametricMidtoneSplit>50</crs:ParametricMidtoneSplit>
                     <crs:ParametricHighlightSplit>75</crs:ParametricHighlightSplit>
                     <crs:SharpenRadius>+1.1</crs:SharpenRadius>
                     <crs:SharpenDetail>25</crs:SharpenDetail>
                     <crs:SharpenEdgeMasking>27</crs:SharpenEdgeMasking>
                     <crs:PostCropVignetteAmount>0</crs:PostCropVignetteAmount>
                     <crs:GrainAmount>0</crs:GrainAmount>
                     <crs:LensProfileEnable>0</crs:LensProfileEnable>
                     <crs:LensManualDistortionAmount>0</crs:LensManualDistortionAmount>
                     <crs:PerspectiveVertical>0</crs:PerspectiveVertical>
                     <crs:PerspectiveHorizontal>0</crs:PerspectiveHorizontal>
                     <crs:PerspectiveRotate>0.0</crs:PerspectiveRotate>
                     <crs:PerspectiveScale>100</crs:PerspectiveScale>
                     <crs:ConvertToGrayscale>False</crs:ConvertToGrayscale>
                     <crs:ToneCurveName>Strong Contrast</crs:ToneCurveName>
                     <crs:CameraProfile>Camera Faithful</crs:CameraProfile>
                     <crs:CameraProfileDigest>07AA307EAF63019A907C3A103EC361D0</crs:CameraProfileDigest>
                     <crs:LensProfileSetup>LensDefaults</crs:LensProfileSetup>
                     <crs:HasSettings>True</crs:HasSettings>
                     <crs:HasCrop>False</crs:HasCrop>
                     <crs:AlreadyApplied>True</crs:AlreadyApplied>
                     <crs:ToneCurve>
                        <rdf:Seq>
                           <rdf:li>0, 0</rdf:li>
                           <rdf:li>32, 16</rdf:li>
                           <rdf:li>64, 50</rdf:li>
                           <rdf:li>128, 128</rdf:li>
                           <rdf:li>192, 202</rdf:li>
                           <rdf:li>255, 255</rdf:li>
                        </rdf:Seq>
                     </crs:ToneCurve>
                  </rdf:Description>
                  <rdf:Description rdf:about=""
                        xmlns:photoshop="http://ns.adobe.com/photoshop/1.0/">
                     <photoshop:DateCreated>2009-04-25T15:20:46</photoshop:DateCreated>
                     <photoshop:LegacyIPTCDigest>C919DE8C578CC777664AB2BCEBAFE2ED</photoshop:LegacyIPTCDigest>
                     <photoshop:ColorMode>3</photoshop:ColorMode>
                     <photoshop:ICCProfile>sRGB IEC61966-2.1</photoshop:ICCProfile>
                  </rdf:Description>
                  <rdf:Description rdf:about=""
                        xmlns:xmpMM="http://ns.adobe.com/xap/1.0/mm/"
                        xmlns:stEvt="http://ns.adobe.com/xap/1.0/sType/ResourceEvent#"
                        xmlns:stRef="http://ns.adobe.com/xap/1.0/sType/ResourceRef#">
                     <xmpMM:InstanceID>xmp.iid:53B401F530A9DF11A629E42CB0F33EB0</xmpMM:InstanceID>
                     <xmpMM:DocumentID>xmp.did:E719AF78E386DF1185EABAB6DC507A64</xmpMM:DocumentID>
                     <xmpMM:OriginalDocumentID>xmp.did:E719AF78E386DF1185EABAB6DC507A64</xmpMM:OriginalDocumentID>
                     <xmpMM:History>
                        <rdf:Seq>
                           <rdf:li rdf:parseType="Resource">
                              <stEvt:action>saved</stEvt:action>
                              <stEvt:instanceID>xmp.iid:E719AF78E386DF1185EABAB6DC507A64</stEvt:instanceID>
                              <stEvt:when>2010-07-03T16:42:18-04:00</stEvt:when>
                              <stEvt:softwareAgent>Adobe Photoshop CS5 Windows</stEvt:softwareAgent>
                              <stEvt:changed>/</stEvt:changed>
                           </rdf:li>
                           <rdf:li rdf:parseType="Resource">
                              <stEvt:action>converted</stEvt:action>
                              <stEvt:parameters>from image/tiff to image/jpeg</stEvt:parameters>
                           </rdf:li>
                           <rdf:li rdf:parseType="Resource">
                              <stEvt:action>derived</stEvt:action>
                              <stEvt:parameters>converted from image/tiff to image/jpeg</stEvt:parameters>
                           </rdf:li>
                           <rdf:li rdf:parseType="Resource">
                              <stEvt:action>saved</stEvt:action>
                              <stEvt:instanceID>xmp.iid:E819AF78E386DF1185EABAB6DC507A64</stEvt:instanceID>
                              <stEvt:when>2010-07-03T16:42:18-04:00</stEvt:when>
                              <stEvt:softwareAgent>Adobe Photoshop CS5 Windows</stEvt:softwareAgent>
                              <stEvt:changed>/</stEvt:changed>
                           </rdf:li>
                           <rdf:li rdf:parseType="Resource">
                              <stEvt:action>saved</stEvt:action>
                              <stEvt:instanceID>xmp.iid:52B401F530A9DF11A629E42CB0F33EB0</stEvt:instanceID>
                              <stEvt:when>2010-08-16T22:47:35-04:00</stEvt:when>
                              <stEvt:softwareAgent>Adobe Photoshop CS5 Windows</stEvt:softwareAgent>
                              <stEvt:changed>/</stEvt:changed>
                           </rdf:li>
                           <rdf:li rdf:parseType="Resource">
                              <stEvt:action>saved</stEvt:action>
                              <stEvt:instanceID>xmp.iid:53B401F530A9DF11A629E42CB0F33EB0</stEvt:instanceID>
                              <stEvt:when>2010-08-16T22:47:35-04:00</stEvt:when>
                              <stEvt:softwareAgent>Adobe Photoshop CS5 Windows</stEvt:softwareAgent>
                              <stEvt:changed>/</stEvt:changed>
                           </rdf:li>
                        </rdf:Seq>
                     </xmpMM:History>
                     <xmpMM:DerivedFrom rdf:parseType="Resource">
                        <stRef:instanceID>xmp.iid:E719AF78E386DF1185EABAB6DC507A64</stRef:instanceID>
                        <stRef:documentID>xmp.did:E719AF78E386DF1185EABAB6DC507A64</stRef:documentID>
                        <stRef:originalDocumentID>xmp.did:E719AF78E386DF1185EABAB6DC507A64</stRef:originalDocumentID>
                     </xmpMM:DerivedFrom>
                  </rdf:Description>
                  <rdf:Description rdf:about=""
                        xmlns:tiff="http://ns.adobe.com/tiff/1.0/">
                     <tiff:ImageWidth>2336</tiff:ImageWidth>
                     <tiff:ImageLength>3504</tiff:ImageLength>
                     <tiff:BitsPerSample>
                        <rdf:Seq>
                           <rdf:li>8</rdf:li>
                           <rdf:li>8</rdf:li>
                           <rdf:li>8</rdf:li>
                        </rdf:Seq>
                     </tiff:BitsPerSample>
                     <tiff:PhotometricInterpretation>2</tiff:PhotometricInterpretation>
                     <tiff:Orientation>1</tiff:Orientation>
                     <tiff:SamplesPerPixel>3</tiff:SamplesPerPixel>
                     <tiff:XResolution>2400000/10000</tiff:XResolution>
                     <tiff:YResolution>2400000/10000</tiff:YResolution>
                     <tiff:ResolutionUnit>2</tiff:ResolutionUnit>
                     <tiff:Make>Canon</tiff:Make>
                     <tiff:Model>Canon EOS-1D Mark II</tiff:Model>
                  </rdf:Description>
                  <rdf:Description rdf:about=""
                        xmlns:exif="http://ns.adobe.com/exif/1.0/">
                     <exif:ExifVersion>0221</exif:ExifVersion>
                     <exif:ColorSpace>1</exif:ColorSpace>
                     <exif:PixelXDimension>400</exif:PixelXDimension>
                     <exif:PixelYDimension>600</exif:PixelYDimension>
                     <exif:DateTimeOriginal>2009-04-25T15:20:46</exif:DateTimeOriginal>
                     <exif:ExposureTime>1/1000</exif:ExposureTime>
                     <exif:FNumber>56/10</exif:FNumber>
                     <exif:ExposureProgram>2</exif:ExposureProgram>
                     <exif:ISOSpeedRatings>
                        <rdf:Seq>
                           <rdf:li>800</rdf:li>
                        </rdf:Seq>
                     </exif:ISOSpeedRatings>
                     <exif:ShutterSpeedValue>9965784/1000000</exif:ShutterSpeedValue>
                     <exif:ApertureValue>4970854/1000000</exif:ApertureValue>
                     <exif:ExposureBiasValue>0/1</exif:ExposureBiasValue>
                     <exif:MaxApertureValue>3/1</exif:MaxApertureValue>
                     <exif:MeteringMode>5</exif:MeteringMode>
                     <exif:Flash rdf:parseType="Resource">
                        <exif:Fired>False</exif:Fired>
                        <exif:Return>0</exif:Return>
                        <exif:Mode>2</exif:Mode>
                        <exif:Function>False</exif:Function>
                        <exif:RedEyeMode>False</exif:RedEyeMode>
                     </exif:Flash>
                     <exif:FocalLength>300/1</exif:FocalLength>
                     <exif:FocalPlaneXResolution>3520000/1136</exif:FocalPlaneXResolution>
                     <exif:FocalPlaneYResolution>2342000/756</exif:FocalPlaneYResolution>
                     <exif:FocalPlaneResolutionUnit>2</exif:FocalPlaneResolutionUnit>
                     <exif:CustomRendered>0</exif:CustomRendered>
                     <exif:ExposureMode>0</exif:ExposureMode>
                     <exif:WhiteBalance>0</exif:WhiteBalance>
                     <exif:SceneCaptureType>0</exif:SceneCaptureType>
                  </rdf:Description>
               </rdf:RDF>
            </x:xmpmeta>