Scene Optimizer -> change paths

Hello everybody.

I'm using https://www.daz3d.com/scene-optimizer to reduce the texture sizes of my scenes.

I have a new PC and moved my DAZ-content and scenes to an USB-Drive. Now, when loading an old scene, the old path to the optimized textures is still used, which of course does not exist anymore.

Is there any chance to change the paths to the new location? I'm afraid that the path is stored in the duf-file. If this is the case, I'm afraid that all of my scenes are ruined :(.

Many thanks in advance.

Comments

  • LeanaLeana Posts: 11,812

    You can open the .duf file in a text editor and replace the path (you might need to uncompress the .duf file first).

  • Leana said:

    You can open the .duf file in a text editor and replace the path (you might need to uncompress the .duf file first).

    Thanks a lot :). Unpacking and changing the path works fine.

    If anybody is facing the same problem, I wrote a powershell script to automatically change the pathes for a given file. You need to have 7zip installed for this to work:

    # be aware that : are escaped!$pathToReplace = "/P%3A/PATH_TO_REPLACE/"$newPath = "/E%3A/NEW_PATH/"# The file in which the paths shall be replaced$zipFileName = "E:\Daz3D\...\file.duf"$fileName = [System.IO.Path]::GetFileName($zipFileName)$fileNameWithoutExtension = [System.IO.Path]::GetFileNameWithoutExtension($zipFileName)# Unzip file to tmp-dir... change to your needs& "P:\Tools\7zip\7z.exe" x $zipFileName "-o$('E:\Daz3D\tmp')" -y$content = [System.IO.File]::ReadAllText("E:\Daz3D\tmp\$fileNameWithoutExtension").Replace($pathToReplace, $newPath)[System.IO.File]::WriteAllText("E:\Daz3D\tmp\$fileNameWithoutExtension", $content)& "P:\Tools\7zip\7z.exe" a $zipFileName "E:\Daz3D\tmp\$fileNameWithoutExtension"

     

Sign In or Register to comment.