Morphs from G3 to G8

1212224262770

Comments

  • RedzRedz Posts: 1,457

    IT'S DONE!

    No, actally it isn't. But it works. Props to mork for doing a lot of the heavy lifting so I didn't have to.

    What am I talking about? Well, way up thread I said I had a method for transfering Morphs with their ERC intact. Which I did... Do. You know what I mean. I also said it was too dangerous to be released into the wild. New-queue-lar levels of dangerous. I figured if I could work out a way to automate some or all of the process, then actually do that automation, I'd release that.

    Well, I did it.

    Let's talk limitations first.

    This software is so Alpha it's slightly Omega. Use at your own risk. It probably can't break anything, but they said the same about the RMS Titanic.

    Fingernails. Toenails. It won't do them. The geometry was too darned messy for me to work out how to reliably handle them, so I skipped it entirely. The nails will, instead, follow the nailbeds. As a result they should be free of distortion and well shaped, but they may not match exactly, and any special nail morphs won't transfer. However, the script doesn't know about this limit, so if a nail morph file is included in the process, it will process it. The results of that should be, effectivelly, an empty morph, but a possibility for error exists.

    The script is not interactive. No UI, no notification. I don't know how to do that stuff. This is my first Daz Script. (I don't think small, unfortnately.) If I do a later release, I may add something, but my main goal has always been just getting it to work.

    It almost certainly won't handle Connect products. Right now it tries to write back to the same library it is working in. I mean to fix that at some point, after which it might be able to work with Connect. 

    It will also probably fail if you have more than one library, if the source morph is not in your base library. Again, something I mean to fix, but I only have the one library, and don't feel like making a new one atm. It wasn't necessary to reach "it works." This is not trivial. To make it easy to use, I wanted to be sure to use the Studio UI to find morphs, rather than requiring the user to find them. But because of a quirk in the way morphs can be saved, so morphs own themselves, and don't seem to report their file location. So I had to hack around to make it work. Hacking the hackery to distinguish between Connect and non Connect makes me cry.

    As a result of this hackery, some files may not trasfer at all, ever. Basically, because they own themselves, and report their names generically, they may have the same "label," as far as the script method is concerned, as another file or files. This means the script will always find one of them and never find the others. I can't think of a way around that, right now. I did work around the most common way this happens by having the script first ask for the file's location and only hack around when it doesn't get an answer, but I don't have enough products, frankly, to test all the possible failure modes.

    I pretty much didn't document it at all.

    It reads compressed and uncompressed files but only writes uncompressed.

    Did I meantion no UI. Because no UI. At all. It seems to take about 9 seconds, on average to run one morph. This would be about 4 to 7 minutes for an average character, and about double that for a typical Morph pack. During this time, Studio will be busy. Make a sammich or something. Call your mom, if you have one. These numbers are based on 50 to 100 morphs and my slow laptop, so your values will vary. But don't go forcequiting because something like 200 Plus is taking a long time. that's twice the size of any test I've run.

    The script is attempting almost 24,000 operations per file. Mind you, when working with a file where most of those ops are invalid (most expressions, for ex) it will run much, much faster. But morphs tend to run slow.

    How to Use

    1. Load Genesis 3 Female. Make sure it is selected.
    2. Find one (1 and only 1) Morph from the set you wish to transfer and mark it as favorite. (if you mark more, the script will only work with first one it finds, which may not be the one you want).
    3. Run the script
    4. Studio will lock up, and you will get the wait manipulator. It's thinking. Remember, 9 seconds per morph file. Ish
    5. Studio will become responsive. This means it's finished. It may have errored out, but it's finished.
    6. Load Genesis 8 Female. Find your morphs
    7. Report any misbehavior to this thread.
    8. Enjoy

    There's no ERC freezing, there's no trying to fix transfer related distortions (although the eyes might be slightly small, that related to the fact that G8's eyesballs are closed meshes and G3's are not). There's, in fact, nothing more to do. Once the Script finishes successfully, the figure will be fully set up, and all the links between the files will be maintained.

    This is true even with respect to files that link to other products, irrespective of whether you have transfered those other products. The script doesn't "tranfer" as much as it translates. All of the commands built into the G3 files are present in the resultant G8 files. This means it transfer whimsically misspelled name for Victoria 7, then transfer Victoria 7 later, the first product will be connected to V7 (after you reload the figure, if it is open).

    Good night, and good luck.

    So far the script seems to be working a dream on all of the '7' characters. It's hit or miss with the other characters I own. Many characters won't transfer at all, regardless of which morph I favourite, nor will some morph sets such as growing up or ageing morphs. It's working great with some extreme morphs like toon generations, but Star 2 ports over with dinted armpits. For the '7' characters alone this is a huge time saver. I'm very pleased. I'm not quite sure I follow about why certain morphs won't transfer, but that's my lack of understanding of the coding I should think. :) Thanks again

  • Singular BluesSingular Blues Posts: 729
    edited August 2017

    The corrected file has been added to original post.

    It won't fix the issues you're having, Redz. It was a particular problem with the script returning NaN for some expression values which wouldn't let them load.

    To trouble shoot the morphs it doesn't transfer, you can do this.

    Open the script IDE tab, and file > Open the script. Follow the directions for use, but at 3. Run the script, instead of double clicking the Icon, go to the Script IDE tab and press Execute. Should be in the top right.

    There are bunch of diagnostic print statements in the script, so when running in the IDE it should spell out a little of what it is doing in the bottom pane. If you could copy the output and paste (I think you can select the output like any text, but you have to right click to copy. Ctrl+C doesn't work) it here, I might be able to figure out what's up.

    I'm not sure Star 2 is recoverable. Way back when in this thread we got some notice of "bent" arms with the anime type characters. I've noticed that this is a real thing that happens with thoe super waif arms. With Star, my guess is it is that plus her JCMs that is causing this to happen.

    My suggested fix would be, if you think it is down to the transfer and not the JCM, get the label of Star's body morph and do a transfer of Star's body shape using one of Obj export methods. Name the file with the label of the body morph. Morph Loader that shape as normal, but shet Overwrite existing to Delta's only. This will give the body morph a different set of deltas but keep the ERC. If that fixes it, save the morph. If it doesn't fix it, close studio and try removing the Collar/arms down JCMs from the transfered Star and see if that works on reload. Though, I have to admit, I don't expect either method to reall do the trick.

    P.S. I don't understand half of what it's doing and I wrote it :). Partly that down to the documentation for the script API and partly it's down my own stupidity. I just guessed what some functions do and kept messing with them until I got output I could use.

    Post edited by Singular Blues on
  • RCDescheneRCDeschene Posts: 2,779
    edited August 2017

    The corrected file has been added to original post.

    It won't fix the issues you're having, Redz. It was a particular problem with the script returning NaN for some expression values which wouldn't let them load.

    To trouble shoot the morphs it doesn't transfer, you can do this.

    Open the script IDE tab, and file > Open the script. Follow the directions for use, but at 3. Run the script, instead of double clicking the Icon, go to the Script IDE tab and press Execute. Should be in the top right.

    There are bunch of diagnostic print statements in the script, so when running in the IDE it should spell out a little of what it is doing in the bottom pane. If you could copy the output and paste (I think you can select the output like any text, but you have to right click to copy. Ctrl+C doesn't work) it here, I might be able to figure out what's up.

    I'm not sure Star 2 is recoverable. Way back when in this thread we got some notice of "bent" arms with the anime type characters. I've noticed that this is a real thing that happens with thoe super waif arms. With Star, my guess is it is that plus her JCMs that is causing this to happen.

    My suggested fix would be, if you think it is down to the transfer and not the JCM, get the label of Star's body morph and do a transfer of Star's body shape using one of Obj export methods. Name the file with the label of the body morph. Morph Loader that shape as normal, but shet Overwrite existing to Delta's only. This will give the body morph a different set of deltas but keep the ERC. If that fixes it, save the morph. If it doesn't fix it, close studio and try removing the Collar/arms down JCMs from the transfered Star and see if that works on reload. Though, I have to admit, I don't expect either method to reall do the trick.

    P.S. I don't understand half of what it's doing and I wrote it :). Partly that down to the documentation for the script API and partly it's down my own stupidity. I just guessed what some functions do and kept messing with them until I got output I could use.

    Well, you DID say it's still in the Alpha states, did you not? Obviously, it's not GenX-quality just yet, but if this truely is your first Daz script, then it's a start, at least. :)

    Post edited by RCDeschene on
  • Well, you DID say it's still in the Alpha states, did you not? Obviously, it's not GenX-quality just yet, but if this truely is your first Daz script, then it's a start, at least. :)

    Thank you. I do hope to make it better. At the very least, a progress bar :).

    But I also really do welcome feed back, and I really will do my best to look into any issues I can to try to fix them. Especially these missing products issues. Because once I feel confident calling it beta, I hope to invert it to send morphs to G3.

    Not that I expect to get much use out of that, but some people might like it.

  • RedzRedz Posts: 1,457

    Well, you DID say it's still in the Alpha states, did you not? Obviously, it's not GenX-quality just yet, but if this truely is your first Daz script, then it's a start, at least. :)

    Thank you. I do hope to make it better. At the very least, a progress bar :).

    But I also really do welcome feed back, and I really will do my best to look into any issues I can to try to fix them. Especially these missing products issues. Because once I feel confident calling it beta, I hope to invert it to send morphs to G3.

    Not that I expect to get much use out of that, but some people might like it.

    Hi Singular, Yes I hope you know my post was purely for feedback (which you'd asked for) and not criticism. I'm in awe that you've managed to create this and have it working as well as it does! I'm not sure that Genx transfers the jcms (correct me if I'm wrong) so in this regard your script has the potential to add even more functionality, at least between Genesis 3 and Genesis 8. When the Genesis 8 Male eventually shows up, will the script be usable/adaptable to transfer morphs between the males too?

  • RedzRedz Posts: 1,457

    In the script IDE editor for those morphs that won't transfer, it simply says Processed 0 files. They are all in the same data directory and folder as the morphs that do transfer. 

  • Thank you so much!!!

    Words are not enough!

  • morkmork Posts: 278
    edited August 2017

    Very nice script, Singular Blues!
    And thank you for the props, very much appreciated. :-)

    I have some troubles on my linux installation, since linux is case sensitive, but I expected that and don't expect it to get fixed (it's a PITA).
    The problem occurs when you convert cloud stuff, since the naming convention changed to all lowercase for cloud content - which is really great, but it clashes with the old naming scheme with upper and lowercase. Simply copying without changing the case only works on windows.

    When converting a Character I installed with DIM, it works great! Good job! *thumbsup*
    Did try only one character yet (G3F Andromeda), but will give it a thorough test when I'm at home and have access to my full library.
    Feels so good not to have to convert all my beloved characters by hand! :D

     

    Edit:
    Be careful NOT to run it on Connect content, it possibly will break it by overwriting the original files.
    Connect content needs some more handling in the script, but then it will work on that as well.

    In my case I ran it on Mika 7, which I installed with connect. I can see that it fails to replace the "genesis 3" with "genesis 8" in the path, thus it overwrites the source files, which then will no longer work, because they got changed to G8 and Mika is G3.
    I'm not 100% sure if this is an issue on Windows as well, but I think so.

    One culprit is this line:
    processDsfFile(aFiles[i].toString(), aFiles[i].toString().replace("Genesis 3", "Genesis 8"));
    The replace() is case-sensitive, it will only replace "Genesis 3", not "genesis 3", which it is called in connect content due to lowercase naming scheme.

    Just a heads up, still a very good script. ;-)

    Post edited by mork on
  • BraincellsBraincells Posts: 37
    edited August 2017

    Hi, I followed Redz tut but can't seem to report your beautiful results. I have a G3F dialled character which I transferred to the shape of G8F as you can see on the left.  I can successfully see my new G8F morph dial and use it on a fresh G8 base female. However, as soon as I pose the new G8F shape, hands and the whole face rig go bananas. I did the ERC freeze. Any thoughts? 

    Screenshot 2017-08-09 23.48.44.jpeg
    559 x 787 - 83K
    Post edited by Braincells on
  • morkmork Posts: 278

    Hi, I followed Redz tut but can't seem to report your beautiful results. I have a G3F dialled character which I transferred to the shape of G8F as you can see on the left.  I can successfully see my new G8F morph dial and use it on a fresh G8 base female. However, as soon as I pose the new G8F shape, hands and the whole face rig go bananas. I did the ERC freeze. Any thoughts? 

    Just a blind guess, but did you do that "Adjust rigging to shape" step?
    Also, did you zero the G8 figure before you saved the morph as an support asset?

  • Redz said:

    In the script IDE editor for those morphs that won't transfer, it simply says Processed 0 files. They are all in the same data directory and folder as the morphs that do transfer. 

    That's something. It tells me script isn't finding anything. Which means files that have no URI And don't own themselves. I didn't think that was possible, but it seems it is.

    What product is it? This is so unexpected, I want to follow it directly.

    Also, yes, and thank you. I didn't feel picked on by your feedback, and I really apreciate how specific it was. I don't think my goal here has ever been to be the very best, like no one ever was, but I do want it to work reasonably, and reliably. At the very least, any progress/UI I add should, where possible, say why it failed.

  • mork said:

    Very nice script, Singular Blues!
    And thank you for the props, very much appreciated. :-)

    I have some troubles on my linux installation, since linux is case sensitive, but I expected that and don't expect it to get fixed (it's a PITA).
    The problem occurs when you convert cloud stuff, since the naming convention changed to all lowercase for cloud content - which is really great, but it clashes with the old naming scheme with upper and lowercase. Simply copying without changing the case only works on windows.

    When converting a Character I installed with DIM, it works great! Good job! *thumbsup*
    Did try only one character yet (G3F Andromeda), but will give it a thorough test when I'm at home and have access to my full library.
    Feels so good not to have to convert all my beloved characters by hand! :D

     

    Edit:
    Be careful NOT to run it on Connect content, it possibly will break it by overwriting the original files.
    Connect content needs some more handling in the script, but then it will work on that as well.

    In my case I ran it on Mika 7, which I installed with connect. I can see that it fails to replace the "genesis 3" with "genesis 8" in the path, thus it overwrites the source files, which then will no longer work, because they got changed to G8 and Mika is G3.
    I'm not 100% sure if this is an issue on Windows as well, but I think so.

    One culprit is this line:
    processDsfFile(aFiles[i].toString(), aFiles[i].toString().replace("Genesis 3", "Genesis 8"));
    The replace() is case-sensitive, it will only replace "Genesis 3", not "genesis 3", which it is called in connect content due to lowercase naming scheme.

    Just a heads up, still a very good script. ;-)

    Thank you, thank you! I had thought it would error out and not get Connect, at all. Now I know otherwise and how to fix.

    I want to avoid writeback to Connect entirely, so I aim to hard code the next version to only write to the main library.

    If I ever figure out UI building, I might add the option to choose target libs, but I still want to leave Connect out of the write options, because I don't really understand Connect :) This is very helpful, and I will incorporate in ver 0.02.

  • RedzRedz Posts: 1,457

    Glad to hear it, my aim is to encourage this awesome project. I have a lot of morphs that do this 'processed zero files'. Some examples Gwennili, RawArt's Cosette, Raw Massive morphs for G3F, Fantasy creature Morphs for G3F, The Little ones by 3D Universe, Mangatastic Satsuki and Danica and Darnissa from Rendo.

  • Redz said:

    Glad to hear it, my aim is to encourage this awesome project. I have a lot of morphs that do this 'processed zero files'. Some examples Gwennili, RawArt's Cosette, Raw Massive morphs for G3F, Fantasy creature Morphs for G3F, The Little ones by 3D Universe, Mangatastic Satsuki and Danica and Darnissa from Rendo.

    Okay, so now I'm definitely confused. I was able to test Danica (mousso, correct?) and it worked. It took almost six minutes, which is way longer than I'd expect, so it must have had to search the whole folder for the files, but it found them.

    Do you have these morphs in a separate library?


     

  • RedzRedz Posts: 1,457
    Redz said:

    Glad to hear it, my aim is to encourage this awesome project. I have a lot of morphs that do this 'processed zero files'. Some examples Gwennili, RawArt's Cosette, Raw Massive morphs for G3F, Fantasy creature Morphs for G3F, The Little ones by 3D Universe, Mangatastic Satsuki and Danica and Darnissa from Rendo.

    Okay, so now I'm definitely confused. I was able to test Danica (mousso, correct?) and it worked. It took almost six minutes, which is way longer than I'd expect, so it must have had to search the whole folder for the files, but it found them.

    Do you have these morphs in a separate library?


     

    No, all of these characters are in my default library along with the base figures. I re-tried Danica head and then body and still get zero files processed. So perhaps there's something else going on. 

  • Redz said:
    Redz said:

    Glad to hear it, my aim is to encourage this awesome project. I have a lot of morphs that do this 'processed zero files'. Some examples Gwennili, RawArt's Cosette, Raw Massive morphs for G3F, Fantasy creature Morphs for G3F, The Little ones by 3D Universe, Mangatastic Satsuki and Danica and Darnissa from Rendo.

    Okay, so now I'm definitely confused. I was able to test Danica (mousso, correct?) and it worked. It took almost six minutes, which is way longer than I'd expect, so it must have had to search the whole folder for the files, but it found them.

    Do you have these morphs in a separate library?


     

    No, all of these characters are in my default library along with the base figures. I re-tried Danica head and then body and still get zero files processed. So perhaps there's something else going on. 

    Add a Danica morph to favorites, paste this into a blank Script IDE, hit execute and post the results.

    /*********************************************************************/
    // Array<DzProperty> :
    function getGroupProperties( oGROUP, bTRAVERSE, bRECURSE ){
    	var aProperties = new Array();
    	if( !oGROUP ){ return aProperties; }
    	else{
    		var nPROPERTIES = oGROUP.getNumProperties();
    		for( var i = 0; i < nPROPERTIES; i++ ){
    			aProperties.push( oGROUP.getProperty( i ) );
    		}
     
    		if( bRECURSE ){ aProperties = aProperties.concat( getGroupProperties( oGROUP.getFirstChild(), bTRAVERSE, bRECURSE ) ); }
    		if( bTRAVERSE ){ aProperties = aProperties.concat( getGroupProperties( oGROUP.getNextSibling(), bTRAVERSE, bRECURSE ) ); }
    	}
     
    	return aProperties;
    }
     
    /*********************************************************************/
    // Array<DzProperty> :
    function getNodeProperties( oNODE, bTRAVERSE, bRECURSE ){
    	var oPROPERTY_GROUP_TREE = oNODE.getPropertyGroups();
    	var oPROPERTY_GROUP = oPROPERTY_GROUP_TREE.getFirstChild();
     
    	return getGroupProperties( oPROPERTY_GROUP, bTRAVERSE, bRECURSE );
    }
     
    /*********************************************************************/
    var strFullPath;
    var oNODE = Scene.getPrimarySelection();
    if( oNODE ){
    	var aPROPERTIES = getNodeProperties( oNODE, true, true );
    	var oProperty;
     
    	for( var i = 0; i < aPROPERTIES.length; i++ ){
    		oProperty = aPROPERTIES[ i ];
    		oOwner = oProperty.getOwner();
    		if( oProperty.isFavorite() ){
    			
    			mod = oProperty;
    			if( mod.assetUri.toString() == "#Value")
    			{
    			sMatch = oOwner.name;
    			}
    		}
    	}
    }
    print(sMatch);
    print(mod);
    print(mod.assetUri.toString());

    This is Rob's base code for iterating over all properties, modified to return the values needed to find files.

    Here I've truncated it to print the sets of values it would be passing to the file search. It should execute in less than 5 seconds.

    I get:
     

    Executing Script...
    Danica Head
    [object Object]
    #Value
    Result: 
    Script executed in 1 secs 180 msecs.

     

  • RedzRedz Posts: 1,457
    edited August 2017

    This is what I get - Edited sorry I pasted wrong

    Executing Script...
    Danica Head
    [object Object]
    #Value
    Result: 
    Script executed in 0 secs 231 msecs.

    Post edited by Redz on
  • So it is finding the right info. That should be enough for it to find the file.
    What is the result of:

    var aString = ["*.dsf", "*.png"]
    var sTargetPath = App.getDataFolderPathBase()+"/data/DAZ 3D/Genesis 3/Female/Morphs/";
    var aFiles = DzDir(sTargetPath).getFilesFromDir(aString);
    for( var i = 0; i < aFiles.length; i++ ){
    		var sFindPath = aFiles[i].match(new RegExp("[^\n]+Danica Head[^\n]+", "ig"));
    			if(sFindPath != null && sFindPath != undefined) 
    			{
    				sTargetPath = sFindPath.toString().replace( /\/[^\/]+\.dsf/, "/" );
    				aFiles = DzDir(sTargetPath).getFilesFromDir(aString);
    				for( var i = 0; i < aFiles.length; i++ )
    				{
    					print(aFiles[i].toString());
    					
    				}
    			}
        }

    I get:
     

    Executing Script...
    D:/Users/Dyson/DAZ 3D/Studio/My Library/data/DAZ 3D/Genesis 3/Female/Morphs/mousso/Danica Body.dsf
    D:/Users/Dyson/DAZ 3D/Studio/My Library/data/DAZ 3D/Genesis 3/Female/Morphs/mousso/Danica Body.png
    D:/Users/Dyson/DAZ 3D/Studio/My Library/data/DAZ 3D/Genesis 3/Female/Morphs/mousso/Danica Head.dsf
    D:/Users/Dyson/DAZ 3D/Studio/My Library/data/DAZ 3D/Genesis 3/Female/Morphs/mousso/Danica Head.png
    D:/Users/Dyson/DAZ 3D/Studio/My Library/data/DAZ 3D/Genesis 3/Female/Morphs/mousso/nails long.dsf
    Result: 
    Script executed in 1 secs 224 msecs.

     

  • RedzRedz Posts: 1,457

    This is what I get -

    Executing Script...
    Result: 
    Script executed in 0 secs 1 msecs.

     

     

  • RedzRedz Posts: 1,457

    Ah I think I found the problem. I have another Daz Library on my C drive with an empty Genesis 3 folder in it. When I remove that I get your results :) gotta go for now but will test again tomorrow. Thanks for your help. 

  • Singular BluesSingular Blues Posts: 729
    edited August 2017

    How about this?

    var aString = ["*.dsf", "*.png"]
    var sTargetPath = App.getDataFolderPathBase()+"/data/DAZ 3D/Genesis 3/Female/Morphs/";
    var aFiles = DzDir(sTargetPath).getFilesFromDir(aString);
    print(App.getDataFolderPathBase());
    for( var i = 0; i < aFiles.length; i++ ){
    		var sFindPath = aFiles[i].match(new RegExp("[^\n]+Danica Head[^\n]+", "ig"));
    					
    			if(sFindPath != null && sFindPath != undefined) 
    			{
    				print(sFindPath);
    				sTargetPath = sFindPath.toString().replace( /\/[^\/]+\.dsf/, "/" );
    				aFiles = DzDir(sTargetPath).getFilesFromDir(aString);
    				for( var i = 0; i < aFiles.length; i++ )
    				{
    				print(sFindPath.toString());
    				print(sTargetPath);
    					
    				}
    			}
        }

     

    Post edited by Singular Blues on
  • Redz said:

    Ah I think I found the problem. I have another Daz Library on my C drive with an empty Genesis 3 folder in it. When I remove that I get your results :) gotta go for now but will test again tomorrow. Thanks for your help. 

    I'll have to go over mork's script again for pointers on getting the script to reliably search all the libraries. Not sure when I'll get around to the 0.02 release, but hopefully that will be in it. For now, I have to turn my focus to other things. It's been a very challenging couple of weeks, and I was doing this to destress. Now I need to make up for lost time on a lot of the things.

  • GeneralDeeGeneralDee Posts: 128
    edited August 2017

    Ok, I screwed up big time trying the script by Singular Blues. I did read that the script would take long but I didn't know it was in hours... well it was hours in my case (you did say don't go force-quitting but maybe it should've been written in all caps) Not blaming you Singular...it's all on me.  After 2 and a half hours of DAZ being non-responsive, I really needed to force-quit because I had to move on and get some work done. So I relaunched DAZ and now when I try to load the basic genesis 8 character, it gives me a message that duplicate IDs were found but I can still work with the gen8 figure. The BAD news is that all my genesis 3 morphs are gone. So for anyone about to try this script, Do Not run it unless you are willing to wait....HOURS. And Do NOT force Quit.

    My question now....do I have to re-install DAZ and everything or is there a way to clean this mess up??

    EDIT: Actually I fixed everything by re-importing metedata :)

    Post edited by GeneralDee on
  • Force quitting the script would not cause that. And no, it should not take hours to run. There are real limits to what this script can do. It finds files makes copies of them. It does not, with one known exception, mess with the original files.

    I need to edit the original post.

    Right now, the only known issue that this causes has to do with Daz Connect, where a quirk in the way those files are stored and character literals means that the script will overwrite files.

    I'm not trying to be touchy abot this, at all. Clearly something happened. The thing is, this report is not very helpful in figuring out what happened. The results of the issue seem a bit fantasitical considering what the script actually does. 

    If something goes wrong, you have to help me help you. You have to identify what it is you were attempting to transfer, at the very least. 

    Duplicate IDs however, is a thing it could do. The script does not even attempt to rewrite the original IDs. So if the same ID already exists on G8, you get dupes. This is something I couldn't fix if I wanted to. Overally, this whole things ges back to the first point I made in the original post. Use at your own risk. 

    That said, I do want to prevent very large failure modes, but again, Just saying "all my stff broke" doesn't help. That's your risk, after all. The help is "What did I do? What's my part of it as the user who ran the script?" This is not about blame. It's about finding out what happened. A bug report that doesn't say what the bug is isn't useful at all.

  • nonesuch00nonesuch00 Posts: 15,912

    Force quitting the script would not cause that. And no, it should not take hours to run. There are real limits to what this script can do. It finds files makes copies of them. It does not, with one known exception, mess with the original files.

    I need to edit the original post.

    Right now, the only known issue that this causes has to do with Daz Connect, where a quirk in the way those files are stored and character literals means that the script will overwrite files.

    I'm not trying to be touchy abot this, at all. Clearly something happened. The thing is, this report is not very helpful in figuring out what happened. The results of the issue seem a bit fantasitical considering what the script actually does. 

    If something goes wrong, you have to help me help you. You have to identify what it is you were attempting to transfer, at the very least. 

    Duplicate IDs however, is a thing it could do. The script does not even attempt to rewrite the original IDs. So if the same ID already exists on G8, you get dupes. This is something I couldn't fix if I wanted to. Overally, this whole things ges back to the first point I made in the original post. Use at your own risk. 

    That said, I do want to prevent very large failure modes, but again, Just saying "all my stff broke" doesn't help. That's your risk, after all. The help is "What did I do? What's my part of it as the user who ran the script?" This is not about blame. It's about finding out what happened. A bug report that doesn't say what the bug is isn't useful at all.

    Just curious but can DAZ scripts be written such that the command is parsed and offered to the end user to inspect and approve or disapprove via UI exactly what the script has parsed for that step, for each step of the task as a debugging aid? Asking should I ever want to venture into writing or modifying DAZ Studio scripts - that would be a big debugging aid help.

  • Singular BluesSingular Blues Posts: 729
    edited August 2017

    I think so.

    Daz Script is basically extended QScript which is extended EMACS which is extend javascript. So if you can do it in js. you can probably do it in Daz Script.

    This script generally just relies on print statements so I can see what it is doing, and I took out those that seemed to be working as expected. But it seems reasonably simple to, instead of saying "If this, do that," say "If this, message box. say 'About to do this with parameters that in object there. Okay? Cancel?' If Okay, do that, else break."

    And to revisit GeneralDee's issue, it is certainly possible that the script would overwrite and thus wipe out a Daz Connect library. BUT that doesn't seem to be what happened, because meta data would not fix that.

    Which is why I think Studio was making a db call of some kind when the forcequit happened, and left the DB is a bad state. That would certainly be fixed with re-importing metadata, so long at the db wasn't hopelessly corrupted. But the script doesn't really deal with the content db, at all. It acts at the figure and file system levels. I could be wrong here, because I just don't like the content DB. (Because products are hit an miss about having metadata I find useful.) I don't really use it. But API calls for information, and the copy() and write() constructors shouldn't affect the db and any changes they make shouldn't be fixed by se of metadata import.

    Which means that the script was not the proximal cause of the issue, or the issue still exists, and the metadata import is only making things look fixed. Like a new coat of paint on a rested hulk. Things look fine as long as you don't poke it.

    Not knowing what the user was trying to transfer means all of this is just guessing.

    Post edited by Singular Blues on
  • nonesuch00nonesuch00 Posts: 15,912
    edited August 2017

    I think so.

    Daz Script is basically extended QScript which is extended EMACS which is extend javascript. So if you can do it in js. you can probably do it in Daz Script.

    This script generally just relies on print statements so I can see what it is doing, and I took out those that seemed to be working as expected. But it seems reasonably simple to, instead of saying "If this, do that," say "If this, message box. say 'About to do this with parameters that in object there. Okay? Cancel?' If Okay, do that, else break."

    OK, thanks. I would help you test your script but I am waiting for G8M to come out and that way I can transfer male morphs to G8M and female morphs to G8M. Well some of them, not all, just the ones I think aren't likelyto be re-made so soon again - like Toon Generations 2 is not likely to have a Toon Generations 3 (or Toon Generations 8?) so soon.

    Post edited by nonesuch00 on
  • Singular BluesSingular Blues Posts: 729
    edited August 2017

    OK, thanks. I would help you test your script but I am waiting for G8M to come out and that way I can transfer male morphs to G8M and female morphs to G8M. Well some of them, not all, just the ones I think aren't likelyto be re-made so soon again - like Toon Generations 2 is not likely to have a Toon Generations 3 (or Toon Generations 8?) so soon.

    The script will not work on G3M/G8M. The trick here is that most of the 24,000 operations it is making are saying, "find delta for vertex G3F[n], change the number to matching vertex G8F[n]" So, to make the script work for G8M might be impossible. Pretty sure it is. As I understand G3F and G3M have  slightly different vertex order. I expect the same for G8M. So the core bit of script that does the translation, it's not a online operation. That's why you don't need to load G8 to transfer. There is a map of which vertex index on G3F is equal to a given index on G8F. I'll need to create a matching map for G3M and G8M, which I can't do until I have G8M. And that's a tedious process.

    Then there are hard coded elements that look in the dsf file for the word "Female." This is because some properties can have an ID "JoeBag'o'Donuts" but also have a super ID "JoeBag'o'Donuts-1" For some reason, G3F, as a figure, has this. G8F does not. So if "Female-1" is not changed to "Female" the resultant file will not load. It will be written, but it is saying "My parent is called Genesis 8 Female-1. Connect me." Studio says, "There's no such animal. You are the weakest link. Good bye." Compounding this, some morphs look for Genesis 3 Female and some look for Genesis 3 Female-1. Getting that all sorted for G8F means that Female is built in the script and has to be changed for G8M. 

     

    Edit: Bottom line, to avoid 48,000 possible ops, G8M will require a separate script.

    Post edited by Singular Blues on
  • nonesuch00nonesuch00 Posts: 15,912
    edited August 2017

    OK, thanks. I would help you test your script but I am waiting for G8M to come out and that way I can transfer male morphs to G8M and female morphs to G8M. Well some of them, not all, just the ones I think aren't likelyto be re-made so soon again - like Toon Generations 2 is not likely to have a Toon Generations 3 (or Toon Generations 8?) so soon.

    The script will not work on G3M/G8M. The trick here is that most of the 24,000 operations it is making are saying, "find delta for vertex G3F[n], change the number to matching vertex G8F[n]" So, to make the script work for G8M might be impossible. Pretty sure it is. As I understand G3F and G3M have  slightly different vertex order. I expect the same for G8M. So the core bit of script that does the translation, it's not a online operation. That's why you don't need to load G8 to transfer. There is a map of which vertex index on G3F is equal to a given index on G8F. I'll need to create a matching map for G3M and G8M, which I can't do until I have G8M. And that's a tedious process.

    Then there are hard coded elements that look in the dsf file for the word "Female." This is because some properties can have an ID "JoeBag'o'Donuts" but also have a super ID "JoeBag'o'Donuts-1" For some reason, G3F, as a figure, has this. G8F does not. So if "Female-1" is not changed to "Female" the resultant file will not load. It will be written, but it is saying "My parent is called Genesis 8 Female-1. Connect me." Studio says, "There's no such animal. You are the weakest link. Good bye." Compounding this, some morphs look for Genesis 3 Female and some look for Genesis 3 Female-1. Getting that all sorted for G8F means that Female is built in the script and has to be changed for G8M. 

    Oh, I didn't realize you were being forced to look at actual geometry but though you just had to contend with mapping the G3F data structures to the G8F data structures sort of like, head, left arm, right arm, left leg, right leg, torso but not worry about actual shape of those things. sad

    Thanks for the information, it will help me look for errors when I test. I may as well go ahead and test with Toon Generations 2 Female in the next couple of weeks.

    Post edited by nonesuch00 on
  • GeneralDeeGeneralDee Posts: 128
    edited August 2017

    Singular- Sorry if my report was shallow. I'm not very savvy at what code does at all. I was attempting to convert a custom character I made in G3. Perhaps I did something wrong. I chose the character and the full body morph for that character.....not sure if I did it right.

     

    On another note, I am having issues because I'm using the Public Beta alongside my older 4.8 version where I have file access issues between them. I'm gonna leave the beta and go full 4.9 and see if things improve. Would having 2 copies of daz via public beta have an affect this script in any way?

    Post edited by GeneralDee on
Sign In or Register to comment.