Digital Art Zone

 
   
5 of 10
5
DAZ Studio 4.5 - Fix Duplicate IDs script
Posted: 14 February 2013 12:57 PM   [ Ignore ]   [ # 61 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  13567
Joined  2003-10-09

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.

 Signature 

DAZ Studio Frequently Asked Questions

Index of free DAZ Studio scripts and plugins list

Profile
 
 
Posted: 14 February 2013 01:57 PM   [ Ignore ]   [ # 62 ]
Member
Avatar
Rank
Total Posts:  104
Joined  2007-12-12
Richard Haseltine - 14 February 2013 12:57 PM

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.

 Signature 

Specs: Win7 x64 • Gigabyte GTX 570 • Gigabyte P45T-ES3G • Intel Core2 Quad 3.0ghz • 16gb Ram
Click For My Rendo Gallery Old Post Count 910

Profile
 
 
Posted: 14 February 2013 03:27 PM   [ Ignore ]   [ # 63 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  13567
Joined  2003-10-09

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

 Signature 

DAZ Studio Frequently Asked Questions

Index of free DAZ Studio scripts and plugins list

Profile
 
 
Posted: 14 February 2013 05:42 PM   [ Ignore ]   [ # 64 ]
Member
Avatar
Rank
Total Posts:  104
Joined  2007-12-12
Richard Haseltine - 14 February 2013 03:27 PM

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.

 Signature 

Specs: Win7 x64 • Gigabyte GTX 570 • Gigabyte P45T-ES3G • Intel Core2 Quad 3.0ghz • 16gb Ram
Click For My Rendo Gallery Old Post Count 910

Profile
 
 
Posted: 15 February 2013 08:54 AM   [ Ignore ]   [ # 65 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  13567
Joined  2003-10-09

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 DzFilename );
 if ( 
file.openDzFile.ReadOnly ) {
  
var ourObject JSON.parsefile.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.openDzFile.ReadOnly ) {
  
var ourObject JSON.parsefile.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.

 Signature 

DAZ Studio Frequently Asked Questions

Index of free DAZ Studio scripts and plugins list

Profile
 
 
Posted: 15 February 2013 02:50 PM   [ Ignore ]   [ # 66 ]
Member
Avatar
Rank
Total Posts:  104
Joined  2007-12-12

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].

 Signature 

Specs: Win7 x64 • Gigabyte GTX 570 • Gigabyte P45T-ES3G • Intel Core2 Quad 3.0ghz • 16gb Ram
Click For My Rendo Gallery Old Post Count 910

Profile
 
 
Posted: 20 February 2013 11:16 PM   [ Ignore ]   [ # 67 ]
Member
Avatar
Rank
Total Posts:  123
Joined  2008-09-17

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

 Signature 

www.bloodyrosesdesigns.com
The Aldara Project

Profile
 
 
Posted: 20 February 2013 11:41 PM   [ Ignore ]   [ # 68 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  8413
Joined  2007-11-06
ssweete - 20 February 2013 11:16 PM

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

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

 Signature 

PostgreSQL CMS FAQ

Product Updates: Non-Genesis/G2 DIM Zips starting July 2013
Non-Genesis Items with Metadata
Plugin Version Numbers for DS 4.5
Updated Genesis Products

Profile
 
 
Posted: 23 February 2013 10:06 PM   [ Ignore ]   [ # 69 ]
Member
Avatar
Rank
Total Posts:  123
Joined  2008-09-17

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

 Signature 

www.bloodyrosesdesigns.com
The Aldara Project

Profile
 
 
Posted: 07 April 2013 03:58 PM   [ Ignore ]   [ # 70 ]
Addict
Avatar
RankRankRankRank
Total Posts:  4451
Joined  2004-08-11

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.  grin

 

 Signature 

    —- Wolff On The Prowl—-

Pan Project

Profile
 
 
Posted: 07 April 2013 04:03 PM   [ Ignore ]   [ # 71 ]
Addict
Avatar
RankRankRankRank
Total Posts:  4744
Joined  2008-03-06
RAMWolff - 07 April 2013 03:58 PM

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.  grin

 

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

 Signature 

My store at DAZ.

My Deviantart gallery.

Profile
 
 
Posted: 07 April 2013 04:34 PM   [ Ignore ]   [ # 72 ]
Addict
Avatar
RankRankRankRank
Total Posts:  4451
Joined  2004-08-11

GRRRRRRRRRR…. nope, didn’t fix it!  WHAAAAAAAAAAAA

 Signature 

    —- Wolff On The Prowl—-

Pan Project

Profile
 
 
Posted: 07 April 2013 04:35 PM   [ Ignore ]   [ # 73 ]
Addict
Avatar
RankRankRankRank
Total Posts:  4451
Joined  2004-08-11

I figure it say’s “Duplicate ID’s” .... so looking at the ID’s should be the clue.  All looks fine.  cool mad

 Signature 

    —- Wolff On The Prowl—-

Pan Project

Profile
 
 
Posted: 07 April 2013 04:45 PM   [ Ignore ]   [ # 74 ]
Active Member
RankRank
Total Posts:  985
Joined  2012-02-04

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…

 Signature 

My deviantART Homepage

Profile
 
 
Posted: 07 April 2013 04:57 PM   [ Ignore ]   [ # 75 ]
Addict
Avatar
RankRankRankRank
Total Posts:  4451
Joined  2004-08-11

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!

 Signature 

    —- Wolff On The Prowl—-

Pan Project

Profile
 
 
   
5 of 10
5