Should work now. Or at least the bug should have moved.
Been a while since I think this was asked, but I got a Gen3 model I want to import into Blender, but I get this error when I try to.
Exactly what is going on here again?
I don’t know what’s going on, because I have never seen this problem myself. Anyway, the code should fail more gracefully now, only skipping the strange asset that caused the problem.
However, since I cannot reproduce the problem myself, I’m not sure that it is gone. If it persist, perhaps you could send me the duf file for inspection.
See now, that’s the issue, it’s got some files you probably don’t have and will more than likely need to download. So sending over the .DUF file would be impossible unless you got that Toon Generations 2 pack for Gen3.
Also, I don’t know what you mean by “Fail gracefully”. Moreover because I don’t know what asset it is that’s causing the issue.
I think by “fail gracefully” he means that it will still load the figure and everything except the problem asset. Try this: Only load in the Gen3 model, then use the tool to load in the items you want on it (pants, shirt, hair, etc.) until you find the problem item. Save after each import so you don’t crash or whatever.
As Safetyman says, failing gracefully means that the function prints an error message in the DOS terminal and returns None, which indicates that no asset was found. Depending on the verbosity setting, the script may also generate an error with message box, but with the factory settings it should just continue.
About needing lots of DAZ files. Normally you are right, a duf file contains pointers to other files which contain assets. However, in this case that pointer is missing - this is what Keyerror: ‘url’ means. The updated script prints the keys that are actually there in the terminal. This could give us a hint of what is going on.
Thing is though, like I said before, I don’t know if you got the files you need for the .DUF file itself for you to look at.
Well, the only way to figure that out is if you send me the file.
Also, the updated scripts prints some info to the dos terminal: the problematic file and the keywords (which do not include “url”). That information may be useful to figure out what happened.
'K fine. Here’s the .DUF file.
Don’t say I didn’t warn you if you don’t have the Toon Generations 2 morphs and accessories.
jinny.duf (109.4 KB)
Hi. When do “Import Action” from one file (containing mulltiple keyframes), some frames are lost.
Like this: in DAZ 0 - 17, in blender 1 - 15.
use 1.3.1dev (7 jan).
Import from folder with 1 pose by frame, work correctly.
Apparently the framerate was hardwired to 25 fps, but in the latest commit it uses the current framerate instead. If you set the framerate to match that of the animation, you should get the same number of frames. In your case you should probably set it to 30 fps (30/25 = 18/15).
Change in render to 30 fps, still lost frames. Where need change fps?
The button used to read the frame rate from the scene’s render settings, but I just changed the interface. Now the button has a new option called Frame Rate. It is set to 30 fps by default since that seems to be the most common value in Daz Studio.
There is also another new option: Integer Frames. If there is a mismatch between the frame rates, keys will be put on non-integer time slots if this option is off. If on, time values are rounded to the closest integer. If you put keys on non-integer times, you may have problems with quaternions since the same rotation corresponds to two quaternions. Matching frame rates might seem the best, but then you must render the animation with the same frame rate or timing will be off.
The problem has been located, I think. The node “VestDecal” has a geometry with id “Decal Shape” which does not contain an url. The plugin now ignores this case, which means that the VestDecal will be imported, but it has no mesh, so it becomes an empty in Blender. I might try to do something more intelligent with this later, but for now this should allow you to continue loading the character.
There might be further problems with missing assets, but if Verbosity is set to 2 or less that should only generate warning messages. Possibly a lot of them.