DAZ Studio 4.5 - Fix Duplicate IDs script

135

Comments

  • Richard HaseltineRichard Haseltine Posts: 19,946
    edited December 1969

    Is the script error from my script or from the hair? It's very hard to troubleshoot the issue without the product, which I don't currently have though I've a feeling it's one I've wishlisted - certainly there are things that can trip the script up.

  • cipher_Xcipher_X Posts: 111
    edited December 1969

    Is the script error from my script or from the hair? It's very hard to troubleshoot the issue without the product, which I don't currently have though I've a feeling it's one I've wishlisted - certainly there are things that can trip the script up.

    Not sure Richard. I did notice an earlier poster in this thread having a similar looking error when they screen cap what was in the log. First post on page two of this thread, second image.

  • Richard HaseltineRichard Haseltine Posts: 19,946
    edited December 1969

    Well, were you running my script or importing the hair when you got the error?

  • cipher_Xcipher_X Posts: 111
    edited December 1969

    Well, were you running my script or importing the hair when you got the error?

    Running the script, the hair was not in the scene yet.

  • Richard HaseltineRichard Haseltine Posts: 19,946
    edited February 2013

    OK, line 62 is certainly when it reads in the .dsf file so it looks as if the basic DSON importer is choking on something - does the hair load, with errors, when you double-click to load it or does it fail to load at all?

    Please open my script in a text editor (you can use the DAZ Studio IDE - Window>Panes(Tabs)>Script IDE). find this block

    function prepFile( name ) { // Open the file, read it into a string // and convert to a JSON object, which  // is to be returned  // open file var file = new DzFile( name ); if ( file.open( DzFile.ReadOnly ) ) {  var ourObject = JSON.parse( file.read() );  file.close();  return ourObject; } return undefined;}

    which starts around line 54 and edit it by adding print( name ); just after the comment, like this:

    function prepFile( name ) { // Open the file, read it into a string // and convert to a JSON object, which  // is to be returned  print( name );  // open file var file = new DzFile( name ); if ( file.open( DzFile.ReadOnly ) ) {  var ourObject = JSON.parse( file.read() );  file.close();  return ourObject; } return undefined;}

    save, and try processing the hair with that - to be safe you may want to reinstall the hair from the zips, to make sure it's a clean copy. That should let us see the actual file that's throwing the error - it may be the library file, or it may be the data file that the library file reads in.

    Post edited by Richard Haseltine on
  • cipher_Xcipher_X Posts: 111
    edited December 1969

    Richard it didn't appear to be your script. I went back in and looked at the original zip package and noticed that in the DSON folder there was another folder named "DragonLHairGenLegacyDS4.5" and also a folder with instructions about installing the LegacyDS4.5 as well as the Poser Companion files. I did that and the hair loaded without getting the duplicate ID's error.

    This is weird because I thought you only need to install the DSON or Poser Companion files if you plan on using Genesis in Poser? I don't have either DSON or Poser installed [yet].

  • ssweetessweete Posts: 115
    edited December 1969

    any chance we could get this script for duf files???

  • FixmypcmikeFixmypcmike Posts: 12,337
    edited December 1969

    ssweete said:
    any chance we could get this script for duf files???

    Are you getting Duplicate ID's errors on .duf files?

  • ssweetessweete Posts: 115
    edited December 1969

    my mistake after rechecking the error message its the other popular message.....lol
    so this is not needed.

  • RAMWolffRAMWolff Posts: 5,583
    edited December 1969

    While adding morphs to my SuperCape (in production) I ran into Duplicate ID error in the .duf file. Not sure what's causing that. Scripting is not something I wrap my head around easily. I do notice one thing. There is a "-1" at the end of some of the ID names at the end of the .duf files and other files do not have this added. So wondering if this is where the duplicate id error message is hailing from??

    Example:

    
    "scene" : {
      "modifiers" : [
       {
        "id" : "Front-CapeAdjust-1",
        "url" : "#Front-CapeAdjust"

    The .duf files are not compressed so it was easy enough to open them up in my pad program.

    Thanks. :-)

  • SickleYieldSickleYield Posts: 6,003
    edited December 1969

    RAMWolff said:
    While adding morphs to my SuperCape (in production) I ran into Duplicate ID error in the .duf file. Not sure what's causing that. Scripting is not something I wrap my head around easily. I do notice one thing. There is a "-1" at the end of some of the ID names at the end of the .duf files and other files do not have this added. So wondering if this is where the duplicate id error message is hailing from??

    Example:

    
    "scene" : {
      "modifiers" : [
       {
        "id" : "Front-CapeAdjust-1",
        "url" : "#Front-CapeAdjust"

    The .duf files are not compressed so it was easy enough to open them up in my pad program.

    Thanks. :-)

    That's a weird one. Back them up,edit the -1 away, and see if that fixes it?

  • RAMWolffRAMWolff Posts: 5,583
    edited December 1969

    GRRRRRRRRRR.... nope, didn't fix it! WHAAAAAAAAAAAA

  • RAMWolffRAMWolff Posts: 5,583
    edited December 1969

    I figure it say's "Duplicate ID's" .... so looking at the ID's should be the clue. All looks fine. :coolmad:

  • cwichuracwichura Posts: 1,000
    edited December 1969

    And these are .duf's which means 4.5 and I thought 4.5 fixed the big with creating assets with duplicate IDs in the first place...

  • RAMWolffRAMWolff Posts: 5,583
    edited December 1969

    Well, I don't directly blame DS for it (I use 4.5, most recent build) but somewhere along the way today creating my adjustment morphs for the cape must have inserted some weird line SOMEWHERE!

  • RAMWolffRAMWolff Posts: 5,583
    edited April 2013

    Hmmmm. I think I found it. It's a hidden morph. I only remember making ONE morph to fix a slight poke through that I locked and hide but now I'm seeing two and it's name is very similar to another morph : SuperCape-C02 except the visible morph is called: Unstick-FullAdjust-C02, this morph is under "Adjustments" while the hidden mystery morph is hidden under my main "Morphs" category. I have no idea how to get rid of something I don't have. I've looked in the main folder and in folders outside of the SuperCape and not finding any file labeled "SuperCape-C02"

    Hmmm, also found this:

    
    ],
     "modifier_library" : [
      {
       "id" : "DzMeshSmoothModifier",
       "name" : "DzMeshSmoothModifier",
       "parent" : "#SuperCape",
       "extra" : {
        "type" : "smoothing",
        "smoothing" : {
         "smoothing_on" : false,
         "smoothing_type" : "Base Shape Matching",
         "iterations" : 5,
         "weight" : 0.5,
         "secondary_weight" : -0.5,
         "lock_distance" : 0.001,
         "length_influence" : 0.5,
         "interactive_update" : false,
         "collision_node" : "/data/Richard McCormick/Gen5-SimpleSuit/Gen5-SimpleSuit/RAMS-Gen5-SimpleSuit.dsf#RAMS-Gen5-SimpleSuit",
         "collision_iterations" : 5,
         "collision_intervals" : 1

    Is that normal to have the RAMS-Gen5-SimpleSuit repeated in the Collision Node line twice at the end of the line? Seeing that last #RAMS-Gen5-SimpleSuit" seems odd to me.

    Post edited by RAMWolff on
  • Richard HaseltineRichard Haseltine Posts: 19,946
    edited December 1969

    Yes, the bit up to the # is the file and the bit after is the particular thing in the file.

  • RAMWolffRAMWolff Posts: 5,583
    edited December 1969

    Thought I had is solved but it's still throwing Dup ID's so not sure what to think about that. I tried transferring the morphs into a new cape and some don't even function but function fine in the old cape so there is SOMETHING amiss. The new cape was not throwing the dup id error but having 3 hard made adjustment morphs no longer functioning is not OK. lol

  • RAMWolffRAMWolff Posts: 5,583
    edited December 1969

    Still can't figure out what's throwing the Dup ID's. Here are my thoughts and a little code from the main duf file (one that's in the actual People>Genesis folder that loads the data for the actual SuperCape.

    ],
     "scene" : {
      "nodes" : [
       {
        "id" : "SuperCape",
        "url" : "/data/Richard McCormick/Gen5-SimpleSuit/SuperCape/SuperCape.dsf#SuperCape",
        "name" : "SuperCape",
        "label" : "SuperCape",
        "geometries" : [
         {
          "id" : "geometry",
          "url" : "/data/Richard McCormick/Gen5-SimpleSuit/SuperCape/SuperCape.dsf#geometry",
          "name" : "SuperCape",
          "label" : "shape",
          "type" : "polygon_mesh"
         }
        ],
        "conform_target" : "name://@selection:",
        "preview" : {
         "type" : "figure",
         "oriented_box" : {
          "min" : [ -43.786, 65.3, -27.625 ],
          "max" : [ 65.039, 162.124, 1.904 ]
         },
         "center_point" : [ 0, 0, 0 ],
         "end_point" : [ 0, 147.3934, -0.5922295 ],
         "rotation_order" : "YXZ"

    As you can see there is a bolded out bit with an id called 'geometry' but the main geometry is called SuperCape because that's what I named the obj when I exported it from ZBrush. So wondering if this extra bit of lines might be the culprit?? I'm out of ideas and would really appreciate some help in trying to figure this out.

    Thanks so much!

    Rich

  • Richard HaseltineRichard Haseltine Posts: 19,946
    edited December 1969

    In the snippet, the node is called SuperCape and the geometry that belongs to the node is called geometry. That's as it should be - if they were the same that would throw a duplicate IDs error. The problem could be a node further down the tree, or a material name - anything with an id should have a unique id within the figure (it's OK for bits of different figures to have the same id as the figure identifier distinguishes them).

  • RAMWolffRAMWolff Posts: 5,583
    edited December 1969

    Hmm, maybe I should just post the entire thing and see if someone else can see it. I've been looking at it so much I don't think my eyes can discern what can be wrong.... would that be OK Richard?

  • bicc39bicc39 Posts: 215
    edited December 1969

    Assume total ignorance, how would you delete/solve the duplicate Id problem without a script?
    Cannot get the script to do anything.
    Would like to try manually if possible.
    Thank you.

  • Richard HaseltineRichard Haseltine Posts: 19,946
    edited December 1969

    If the script isn't doing anything the problem may be different anyway. Is it not launching at all, or is it appearing to run but not solving the issue?

  • Richard HaseltineRichard Haseltine Posts: 19,946
    edited December 1969

    RAMWolff said:
    Hmm, maybe I should just post the entire thing and see if someone else can see it. I've been looking at it so much I don't think my eyes can discern what can be wrong.... would that be OK Richard?

    It's your item isn't it? If so then of course you can post it, though I think you'd have to do that as a zip for download - it would be very likely to greatly exceed the post character limit.

  • SickleYieldSickleYield Posts: 6,003
    edited December 1969

    Something else to try:


    Copy the data files to /daz 3d/tools/projection templates/ and the main file to daz/3d/projection templates, which makes the broken one a template. Rerig the base mesh from scratch through Transfer Utility and the new template(it should add the morphs as well). See if it still is broken.

  • RAMWolffRAMWolff Posts: 5,583
    edited December 1969

    Still working on the rig and weight mapping so don't really want to mess with that just now. The issue is I don't know if it's the main loading .duf file or if it's one of the morph files it's reading. I've tried everything to locate the issue and I keep running into a wall.

  • SickleYieldSickleYield Posts: 6,003
    edited December 1969

    RAMWolff said:
    Still working on the rig and weight mapping so don't really want to mess with that just now. The issue is I don't know if it's the main loading .duf file or if it's one of the morph files it's reading. I've tried everything to locate the issue and I keep running into a wall.

    Very easy to check that specific thing. Cut and paste the Morphs folder from data files to the desktop, reload Studio and the item, and see if the error is still there.

  • RAMWolffRAMWolff Posts: 5,583
    edited December 1969

    Put the morph folder on the desktop and loaded up the cape. No Dup ID issue!

    Thanks for helping SY! Perhaps if we continue this we can go here so as to not mess up Richard's thread....

    http://www.daz3d.com/forums/discussion/18515/P45/#298060

    Thanks so much. I gotta run out to the gym and errands for now!

  • h666666h666666 Posts: 0
    edited December 1969

    Chelsea Hair and Genesis Bikini have duplicate IDs, as a consequence(?), all the scenes I saved in 4.5 load as horribly warped. Anything I saved in 4.0 loads fine.

    When running the script, I get this:

    Script Error: Line 62
    SyntaxError: Unable to parse JSON string
    Stack Trace:
    ()@:62

    I'm running DAZ on Mountain Lion.

    Any pointers?

    Thanks. This is just bad.

  • SkelchSkelch Posts: 168
    edited December 1969

    By warped I guess you are talking about the exploded figures, save the scene again, and open the newest save, Your new thumbnail will show the exploded figure, but this usually fixes the exp-loads, if that is what you are referring to.

Sign In or Register to comment.
Rocket Fuel