Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Linked Smart Objects - changing the file path via (Hex)Editor or Script?

New Here ,
May 29, 2018 May 29, 2018

I'm not native English.

I have a file with a lot of linked Smart Objects.

The folder for these objects has now been moved. Photoshop no longer finds the files automatically.

This is about the setup of my PSD file:

PSD file with 400 linked Smart Objects.

These were previously on the hard disk like this:

C://Pojekt33/Footage/Angle000/beauty.exr

C://Pojekt33/Footage/Angle001/beauty.exr

C://Pojekt33/Footage/Angle002/beauty.exr

....

C://Pojekt33/Footage/Angle399/beauty.exr

The new path is now as follows:

C://Pojekt33/Final/Example/Footage/Angle000/beauty.exr

C://Pojekt33/Final/Example/Footage/Angle001/beauty.exr

C://Pojekt33/Final/Example/Footage/Angle002/beauty.exr

....

C://Pojekt33/Final/Example/Footage/Angle399/beauty.exr

Photoshop is not able to automatically re-link all Smart Objects. Probably because all files have the same name.

Is there a way to have only the part of the file path changed automatically?

Via Java Script e.g.?

If I look at the PSD file with a HEX editor, I can see the paths clearly (in the XMP).

Here is an excerpt of this file:

<xmpMM:Ingredients>

            <rdf:Bag>

               <rdf:li rdf:parseType="Resource">

                  <stRef:linkForm>ReferenceStream</stRef:linkForm>

                  <stRef:filePath>file:///C://Pojekt33/Footage/Angle000/beauty.exr</stRef:filePath>

               </rdf:li>

               <rdf:li rdf:parseType="Resource">

                  <stRef:linkForm>ReferenceStream</stRef:linkForm>

                  <stRef:filePath>file:///C://Pojekt33/Footage/Angle001/beauty.exr</stRef:filePath>

               </rdf:li>

               <rdf:li rdf:parseType="Resource">

                  <stRef:linkForm>ReferenceStream</stRef:linkForm>

                  <stRef:filePath>file:///C://Pojekt33/Footage/Angle002/beauty.exr</stRef:filePath>

               </rdf:li>

Now I could simply exchange all paths in a hex editor via "Search and Replace". But when I save the edited PSD, Photoshop doesn't open it anymore. An error then appears. The window will show "EOF - End Of File".

The only possibility now is to reconnect all linked content by hand. This is very complex and takes a long time. Is there another option here?

Thank you very much for your help!

TOPICS
Actions and scripting
763
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe
Guest
May 29, 2018 May 29, 2018

Hi

I'll move you post to this forum Photoshop Scripting

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
May 30, 2018 May 30, 2018

I think you might be out of luck as Photoshop uses the file information embeded in the smart object not the metadata

So using a hex editor or changing the metadata will not work.

Example of metadata in smartobject..

"smartObject": {
    "placed": "rasterizeContent",
    "documentID": "3C206B39F415165B248A8FDE3CABB8DE",
    "compsList": {
        "compID": -1,
        "originalCompID": -1
    },
    "linked": true,
    "fileReference": "Blue_new.jpg",
    "link": "/d/a/Blue_new.jpg",
    "linkMissing": true,
    "linkChanged": false
},
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 30, 2018 May 30, 2018
LATEST

I almost thought so

That's very annoying. It could be that simple. It is not even necessary to change the complete file path, but only a part of it.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines