Possible new conflict with Diffeomorphic and MustardUI?
Closed this issue · 13 comments
So, I've now redone my model from scratch maybe 3 times now. First time was because of the exact same issue I'm having now, though the model had a ton of other issues related to some systems being deprecated. Second time wasn't exactly related to either the UI or Diffeomorphic (though that issue too was annoying to find out when I was finished with everything), but now I'm having the same exact issue I had the first time I redid the model from scratch a week ago.
Well, why I'm suspecting a conflict, is because when I was editing the scene, I basically made a restore point to some time before I had added a bunch of new properties to MustardUI, where basically converting the default Daz rig to MHX rig system, that comes with the Diffeomorphic toolset, works just fine without any issues. However, now couple of hours later and messing around with the model some, I'm getting this error all of a sudden when converting the rig to MHX. And mind you, I haven't touched the armature in any way, shape or form since I made the earlier restore point, all I've done is added and edited some properties in the UI. In fact, I recall when I was half-way done with the editing, I tried testing if the model converts just fine and it did. After that point, I also just continued editing the UI, didn't touch the armature in any way. Here's the error code, though not sure how much help it is here:
Python: Traceback (most recent call last): File "C:\Users\Yee\AppData\Roaming\Blender Foundation\Blender\4.0\scripts\addons\import_daz\error.py", line 223, in execute self.run(context) File "C:\Users\Yee\AppData\Roaming\Blender Foundation\Blender\4.0\scripts\addons\import_daz\mhx.py", line 625, in run self.convertMhx(context) File "C:\Users\Yee\AppData\Roaming\Blender Foundation\Blender\4.0\scripts\addons\import_daz\mhx.py", line 704, in convertMhx self.fixBoneDrivers(rig, rig, MHX.BoneDrivers) File "C:\Users\Yee\AppData\Roaming\Blender Foundation\Blender\4.0\scripts\addons\import_daz\fix.py", line 248, in fixBoneDrivers changeTargets(ob.data.shape_keys, rig, rig0) File "C:\Users\Yee\AppData\Roaming\Blender Foundation\Blender\4.0\scripts\addons\import_daz\fix.py", line 220, in changeTargets self.changeTarget(fcu, rna, rig, rig0, assoc) File "C:\Users\Yee\AppData\Roaming\Blender Foundation\Blender\4.0\scripts\addons\import_daz\fix.py", line 271, in changeTarget for var in fcu.driver.variables: AttributeError: 'NoneType' object has no attribute 'variables'
So since I haven't changed how the armature works, I'm thinking that when I was adding properties to the UI, something just breaks with the armature that prevents me from converting it to MHX. And the bad things is I don't know what causes it and when it happens, so at worst, I've just wasted countless hours because I have no choice than to either use the restore point or delete the entire armature, because it's irreversibly bugged on the current scene.
I've had no such issues before Blender 4.0 released and I've been working on the model since 2021. Just curious how out of a blue these issues just happen within a span of a week.
I also made a thread to Diffeomorphic issue page about this, but apparently the issue is that some tranform needs to be applied. Well, the thing is that before I added any of the extra properties after the restore point, the conversion worked just fine. And I don't see that the armature or anything has moved out of place.
Also, even when the transforms fix was applied, Rigify too was totally broken.
I'm going to see if removing the UI, then converting to MHX does anything.
Edit: Nope, still bugged after I removed the UI from the model in the bugged scene instance.
I think I found something. I first deleted all but JCM morphs, and the conversion was still bugged. I then deleted all morphs, and suddenly I could convert the rig to MHX normally.
The thing is, I haven't even touched the JCM morphs after doing the restore point. Nor have I touched the custom properties within the armature properties tabs related to the JCM morphs. So the only explanation is something in the MustardUI at some point must have broken some link or links with the JCMs and the custom properties. Just would be nice to know what.
Hi!
It's strange because the UI does not modify the Daz properties in any way, it just reads them. What bothers me is also that the errors are generated by import_daz and not by MustardUI, maybe due to a deeper part of Diffeomorphic I didn't think about.
The only thing I might think about at the moment is the fact that the armature might have different users due to the presence of the UI.
Does it work if you start adding properties after generating the MHX? In fact, this is what I usually do, I add the UI only after I generate the MHX, never tried before.
If you have the blend file (even without textures) i can take a look. It would be the best if it's the file just before adding the UI; and if you have also the one giving the error when generating the MHX I can take a look.
Plus, which versions of MustardUI, Diffeomorphic and Blender are you using?
Yeah it says it's part of Diffeomorphic, but the thing is that I hadn't modified any of the Diffeomorphic assets after doing the restore point, I had only added properties to MustardUI. What I find strange is that it seems to only affect the JCMs, but I certainly didn't modify them.
I can't really recall any more if I did it before or after doing the restore point, but I did uncheck the Diffeomorphic support and detect morphs-options at some point to remove the old morphs from the UI, because I had deleted all of the units and facs I had in the old scene (since I decided to make a scene without all of them, then do another scene with those included just so I can edit the model better), before I redid the Diffemorphic assets (this is after the second time I needed to redo the whole scene.)
Edit: Checked the restore point and I did in fact uncheck the Diffeo support in the UI, before it had bugged, so that's not what caused it.
So, what I'm thinking is that at some point Blender just unlinks some drivers with the associated custom properties in the main armature that are linked to the JCMs. And I don't have any clear evidence, but it happens while editing MustardUI, so I'm not sure if it happened when I was adding other shape keys to MustardUI that weren't shape keys. I'm certain I didn't mess up at least deliberately any JCMs and it doesn't show that there are any missing links when the scene is bugged. In fact, I checked a lot of the JCM custom properties within the armature and they too seemed fine at least to me.
Not sure if it's all of the JCMs or only one or two that's causing the bug, but it's kind of difficult and time consuming to diagnose without deleting them one by one and checking if the rig converts to MHX.
I managed to temporarily fix this by deleting all shape keys from a duplicate mesh, reimporting the JCMs, then transferring all of the other shape keys from the original mesh to the duplicate. But I suspect this will just happen again in the future as I further edit the UI considering it happened twice out of the blue.
I still however have the restore point scene and the one where the armature is bugged, when converting to MHX. I deleted most of the non-essential stuff to cut down the file size, but it doesn't affect the cause of the issue:
https://www.mediafire.com/file/n7k0af975g4v2rc/restore_point_-_bugged_armature.rar/file
Currently have Blender 4.0.2, stable 1.7.3 Diffeomorphic and the February patch of MustardUI.
Wonderful, it happened now a third time. And it happened after I was done fixing some missing links to couple of my custom shape keys connected to the UI. This time I didn't even do anything in the actual UI, just on the main body.
More spesifically, I've got a master shape key attached to the main body, that basically controls the infulence of hip R and L shape keys. For some reason Blender just kicks off the master shape key's link randomly away from the hip R and L. So, what I did was just put back the correct driver variable's prop. And I suspect that after doing that, somehow the links completely break where MHX just collapses.
Well damn, I removed the drivers completely off hip R and L and MHX converted normally.
Gonna see if it even has anything to do with MustardUI by messing around with the properties.
Edit: I deleted the master shape key entirely from the mesh and the UI property as well. I then basically made it into a custom property within the armature together with bunch of other properties I have and copied it as a new driver, then pasted that to hip L and R so that the master property would influence them both. And the MHX wouldn't convert. As soon as I deleted the drivers again off hip R and L, it would convert again.
I'll see if the master property attached to the UI has anything to do with this.
Edit 2: Nope, deleting the master property off the UI did nothing, it still breaks. I also tried removing connection to it from hip L and R and it would still break. What I find strange is that only when I removed the drivers completely it would convert. It's definitely something to do with Diffeomorphic, though I'm not sure if the driver expressions are incorrect, I'll check.
Probably can safely rule out that it has nothing to do with the UI.
Driver looks alright, in fact, it's almost the same expression I have with some other shape keys. Only difference is that I've named the working driver's variable as "var" (more like that's how Blender put it automatically), while the broken shape key driver has it as "a".
Okay found the culprit, it's a shape key that should move together with hip R and L (basically when one gets influenced, the third shape key should get a little bit added to it.).
The expression in it is "(var-+var1)*3". As soon as I deleted that driver, it would convert.
Edit: Nah nevermind, I cleared the scene as a test while having the master property still attached, then deleted that driver and it would still fail. Oh well, at least I know it's one of the 4 assets.
Edit 2: I found out it's the hip R shape key. Or more specifically, its driver. As soon as I delete it, the armature converts. It's also the exact same as on the opposite side, but just has the proper object linked to it, which too is fine.
I also found that if I delete the driver, then readd it back with the exact same values, the armature converts. It too will work if I copy and paste the same driver on top of itself.
Edit 2: Nope, deleting the master property off the UI did nothing, it still breaks. I also tried removing connection to it from hip L and R and it would still break. What I find strange is that only when I removed the drivers completely it would convert. It's definitely something to do with Diffeomorphic, though I'm not sure if the driver expressions are incorrect, I'll check.
Probably can safely rule out that it has nothing to do with the UI.
Uhm, from what I'm seeing here, it seems like a Diffeomorphic issue somehow?
I mean, if it does have issues even without the UI, I guess the problem is the other things. :D
Closing due to inactivity. Please open a new issue if the problem persists.