DAZ Studio 4.5 - Fix Duplicate IDs script

Richard HaseltineRichard Haseltine Posts: 101,354
edited June 2017 in Freebies

http://www.4shared.com/zip/oY0vbkJk/Fix_Duplicate_IDs.html


http://rhaseltine.ovbi.org/Fix_Duplicate_IDs.zip


Thanks to Kendall Sears for providing hsoting that doesn't require users to have an account, as 4Shared now does.

 

https://www.dropbox.com/s/78mi1zh8p7udsgx/Fix Duplicate IDs.zip?dl=0


This script will (usually) fix files that throw the Duplicate IDs error in DAZ Studio 4.5. I have found one that didn't get fixed, which had a very odd structure, and another couple of items had errors that stopped it from working but it worked on everything else I tried. You should note, however, that many files at DAZ have already had the fix applied (or have been fixed manually) so you may want to reset your downloads on those.


It's simple to use - I'd make it a custom action, or open it with File>Merge, while viewing the folder with the content in the Content Library pane - that way the file selector will open in the right place. Select one or more files in the folder, click Accept, and it will do its thing. Don't go looking for files in the \data folder - the script expects to be given user files, usually in \People\Genesis\some folder, and will then find the data files from there. The script creates a .bak file for each file it edits - one in the library folder, one in the \daat folder, so that you can go back if it fails. If you do a lot of conversions and they are working you might want to use the OS search to find and remove the .bak files.

Post edited by Richard Haseltine on
«134567

Comments

  • RAMWolffRAMWolff Posts: 10,212
    edited December 1969

    Thanks for reposting this Richard!

  • Richard HaseltineRichard Haseltine Posts: 101,354
    edited December 1969

    Updated with new link, courtesy of Kendall Sears

  • KickAir 8PKickAir 8P Posts: 1,865
    edited December 1969

    Thanks Richard! But I'm getting the Duplicate ID error on Genesis.duf (!?!), and you script gives me "Error writing updated C:\Users\KickAir8P\Documents\DAZ 3D\Studio\My Library\People\Genesis\Genesis.duf" when I run it. Help?

  • Richard HaseltineRichard Haseltine Posts: 101,354
    edited June 2012

    The script assumes a dsf format file - the error shouldn't be happening with a DUF. Is this the regular Genesis.duf that comes with DS 4.5? Or is it a saved scene that uses Genesis, and possibly some other content?

    Post edited by Richard Haseltine on
  • KickAir 8PKickAir 8P Posts: 1,865
    edited December 1969

    The script assumes a dsf format file - the error shouldn't be happening with a DUF. Is this the regular Genesis.duf that comes with DS 4.5? Or is it a saved scene that uses Genesis, and possibly some other content?

    The "Duplicate formulas found in files" error pops up when the default Genesis scene first loads, and then again if I delete Genesis from the scene and reload it. I believe it's the Genesis.duf that comes with DS 4.5, but I'm not at home to check and won't be again till Sunday night, sorry.
  • Richard HaseltineRichard Haseltine Posts: 101,354
    edited December 1969

    Ah, this script is a fix for Duplicate IDs, Duplicate Formulas is a different issue - and shouldn't be happening. If you open the log file after loading Genesis and scroll to the end you should see the morphs causing the error listed.

  • RCDescheneRCDeschene Posts: 2,800
    edited June 2012

    Wait, I'm confused. It's opening Studio 4.5 with my Library open like you said, but I don't know where to go from there.


    Sorry, I'm a complete noob with kinds of things. :down:

    Post edited by RCDeschene on
  • Richard HaseltineRichard Haseltine Posts: 101,354
    edited December 1969

    With the Content Library showing the folder you want to work on, under DAZ Studio Formats, run the script (File>Merge, though if you use it a lot it may be worth making it a custom action and adding it to a menu). Pick the file or files that give the error (usual system - click to seelct one file, ctrl/cmd-click to add another single file, shift-click to select a range). Click Accept. That should do the job - try reloading the content to make sure the Duplicate IDs error has gone.

  • KickAir 8PKickAir 8P Posts: 1,865
    edited December 1969

    Ah, this script is a fix for Duplicate IDs, Duplicate Formulas is a different issue - and shouldn't be happening. If you open the log file after loading Genesis and scroll to the end you should see the morphs causing the error listed.

    Seems like a very long list! Where's the thread for the "Duplicate formulas found in files" issue? I don't wanna derail this one with it.
  • Richard HaseltineRichard Haseltine Posts: 101,354
    edited December 1969

    It has an entry in the FAQ - with luck the items in the list will come from the affected products and a simple download and install will fix it. If not I don't think there is an existing thread.

  • KickAir 8PKickAir 8P Posts: 1,865
    edited December 1969

    Ah, this script is a fix for Duplicate IDs, Duplicate Formulas is a different issue - and shouldn't be happening. If you open the log file after loading Genesis and scroll to the end you should see the morphs causing the error listed.

    Seems like a very long list! Where's the thread for the "Duplicate formulas found in files" issue? I don't wanna derail this one with it.
    It has an entry in the FAQ - with luck the items in the list will come from the affected products and a simple download and install will fix it. If not I don't think there is an existing thread.
    Found it -- yep, that fixed it, thanks!
  • RCDescheneRCDeschene Posts: 2,800
    edited December 1969

    With the Content Library showing the folder you want to work on, under DAZ Studio Formats, run the script (File>Merge, though if you use it a lot it may be worth making it a custom action and adding it to a menu). Pick the file or files that give the error (usual system - click to seelct one file, ctrl/cmd-click to add another single file, shift-click to select a range). Click Accept. That should do the job - try reloading the content to make sure the Duplicate IDs error has gone.

    Ahh, I see! Basically run the script over and over again with every department of dsf files in the People > Genesis Directory?
  • Richard HaseltineRichard Haseltine Posts: 101,354
    edited December 1969

    For those that are a problem, yes - a lot of content has been updated, or never showed the issue.

  • solarviewsolarview Posts: 272
    edited December 1969

    With the Content Library showing the folder you want to work on, under DAZ Studio Formats, run the script (File>Merge, though if you use it a lot it may be worth making it a custom action and adding it to a menu). Pick the file or files that give the error (usual system - click to seelct one file, ctrl/cmd-click to add another single file, shift-click to select a range). Click Accept. That should do the job - try reloading the content to make sure the Duplicate IDs error has gone.

    Sorry, total noob here to scripts (and Studio, . . . mostly), and not getting it.
    Are you saying from within the Studio application select a suspect file, then go outside of Studio to the downloaded 'script' and double-click on it? Or does the script need to be installed to Studio somehow, and accessed form there? I don't see a place for scripts in any old the Studio 4 menus.

  • Richard HaseltineRichard Haseltine Posts: 101,354
    edited December 1969

    Download the script and place it somewhere on your hard drive, such as My Library\Scripts.

  • edited December 1969

    Maybe I'm doing something wrong, but I get an error when trying to fix my files.
    My original problem:

    Loading Startup Scene : G:/external poser/DAZ Studio Content/People/Genesis/Genesis.duf*** Scene Cleared ***Duplicate id “ClaudiarEye” found in file “/My Library/data/DAZ 3D/Genesis/Base/Morphs/PDesign/Claudia/ClaudiarEye.dsf”File loaded in 0 min 9.0 sec.Loading Startup Scene : G:/external poser/DAZ Studio Content/People/Genesis/Genesis.duf*** Scene Cleared ***Duplicate id “ClaudiarEye” found in file “/My Library/data/DAZ 3D/Genesis/Base/Morphs/PDesign/Claudia/ClaudiarEye.dsf”File loaded in 0 min 5.0 sec.Loaded file: Genesis.duf

    The error I get when trying the fix:

    Ran tdlmake on image G:/external poser/DAZ Studio Content/My Library/Runtime/Textures/PDesign/PD Claudia/ClaudiaMU03.jpg
    Ran tdlmake on image G:/external poser/DAZ Studio Content/My Library/Runtime/Textures/PDesign/PD Claudia/ClaudiaMU07.jpg
    Ran tdlmake on image G:/external poser/DAZ Studio Content/My Library/Runtime/Textures/PDesign/PD Claudia/ClaudiaL04.jpg
    Ran tdlmake on image G:/external poser/DAZ Studio Content/My Library/Runtime/Textures/PDesign/PD Claudia/ClaudiaL07.jpg
    Executing DAZ Script file: G:/external poser/downloads/2012/New/DAZ3D/Fix_Duplicate_IDs/Fix Duplicate IDs.dsa
    DEBUG: Script starting
    WARNING: Script Error: Line 62
    WARNING: SyntaxError: Unable to parse JSON string
    WARNING: Stack Trace:
     ()@:62
    Error in script execution!
    Ran tdlmake on image G:/external poser/DAZ Studio Content/My Library/Runtime/Textures/PDesign/PD Claudia/ClaudiaE05.jpg
    Ran tdlmake on image G:/external poser/DAZ Studio Content/My Library/Runtime/Textures/PDesign/PD Claudia/ClaudiaE02.jpg
    Ran tdlmake on image G:/external poser/DAZ Studio Content/My Library/Runtime/Textures/PDesign/PD Claudia/ClaudiaE06.jpg
    Ran tdlmake on image G:/external poser/DAZ Studio Content/My Library/Runtime/Textures/PDesign/PD Claudia/ClaudiaL08.jpg
    

    Any ideas?

  • coqueyocoqueyo Posts: 15
    edited December 1969

    @Punisher:

    manually edit line 4, change:

    "id" : "/data/DAZ 3D/Genesis/Base/Morphs//Product/Claudia_rEye_V4.dsf",

    to:

    "id" : "/data/DAZ 3D/Genesis/Base/Morphs/Product/Claudia_rEye_V4.dsf",

    and line 408:

    "id" : "ClaudiarEye",

    to

    "id" : "ClaudiarEye_0",

    in the file : \My Library\data\DAZ 3D\Genesis\Base\Morphs\PDesign\Claudia\ClaudiarEye.dsf

    Hope this Help you. :)

  • RAMWolffRAMWolff Posts: 10,212
    edited December 1969

    Had an oddity happen. I am currently updating my Aiko 3 character files (not Genesis but Aiko 3) and upon saving out the Freja updated file and loading it again to test I got a Duplicate ID error. Now the .duf files are not accessible so I can't very well change anything in them. They are all code. Upon doing a search for the files in question all the comes up in the Windows Search is the Freja Hair folder so not sure that's it or what's going on.

  • SkirikiSkiriki Posts: 4,975
    edited December 1969

    Re: .duf files: 1) You can untick the "compression" and 2) they're .zipped, so open/unpack with any zip-opener you might have around.

  • RAMWolffRAMWolff Posts: 10,212
    edited December 1969

    Hmmm, not at home right now... where do I find the tick to decompress them? Thanks! :-)

  • Richard HaseltineRichard Haseltine Posts: 101,354
    edited December 1969

    The option to save compressed is at lower-left of the options dialogue. There's also an decompression tool in DS itself, Window>Panes(Tabs)>batch convert

  • RAMWolffRAMWolff Posts: 10,212
    edited December 1969

    Ah, thanks so much Richard!

  • RAMWolffRAMWolff Posts: 10,212
    edited December 1969

    WOW... just got around to running the decompression script within DS... works great but not sure what I'm looking for? Something with double slashes // or what would be causing a duplicate ID like this in such an older resaved file??

  • RAMWolffRAMWolff Posts: 10,212
    edited December 1969

    Just did a search using Edit Pad Pro and couldn't find any // entries so it's not that....

  • RAMWolffRAMWolff Posts: 10,212
    edited December 1969

    Interesting outcome.... the decompressed version of the file is not throwing ANY Duplicate ID errors. I think that's really odd. Meaning, in my way of seeing things, there might be something wrong with the compressed .duf files that needs to be looked into.

  • Richard HaseltineRichard Haseltine Posts: 101,354
    edited December 1969

    Very odd - please make a bug report with both versions attached.

  • anikadanikad Posts: 1,919
    edited December 1969

    Thank you for this script. Just started getting errors after upgrading to Daz 4.5, was wondering how on earth to fix it.

  • SaitoChikaraSaitoChikara Posts: 0
    edited December 1969

    I am having an issue when trying to apply an object to my scene. Attached is a screen cap of my message and the item I am using.

    It says to "check the log file" but I do not know where to begin looking.

    Thanks in advance, as I am really stuck without this working.

    duplicate_ID.png
    744 x 365 - 55K
  • Richard HaseltineRichard Haseltine Posts: 101,354
    edited December 1969

    Try seeing if the item has been updated. If it hasn't use the script this thread discusses on it.

  • nowefgnowefg Posts: 557
    edited December 1969

    Fix Duplicate IDs
    (c) Richard Haseltine, May 2012

    A script to fix .dsf files that throw Duplicate IDs errors in DAZ Studio 4.5.

    --------------------------------------------------------------------

    To use the script, run it in the usual manner - it should open at the folder currently open
    in the Content Library,

    I've been having the Duplicate ID problem since installing V5 Pumps; purchased separately--worked well; purchased V5 Pro Suite, which includes it, and ran the installer again, neglecting to say yes to the uninstall warning prompt; installed one more time with a yes to the uninstall prompt. Since, every load of V5 Pumps gets a Dup ID message, stocking component now requires smoothing every time; uninstall/reinstall has no effect; uninstall Studio 4.5 and all data files has no effect!

    Anyway, I got Richard's script, but have a question: what does "run in the usual manner" look like in "brand new to all this" terms? Run it with Studio open and running? With Studio closed, open the data files and unzip/run? Where?

    I've not used/run a script before, and would appreciate a leg up on process-specifics.

Sign In or Register to comment.