Retarget mesh drivers cause error for appended mesh

Issue #579 resolved
engetudouiti created an issue

I do not clear remember, this option have worked or not. But this option is useful when append mesh which saved as library.

1 I save the mhx character with some clothings as library.blend

2 I am making scene which use same rig and body meshes with other clothing, the making scene rig name is genesis3 female

then I append the clothing which was saved in library.blend

3 the appended clothing have jcms and shape keys which need to be driven by current scene rig (genesis3 female”

4 blender usually generate mesh with rig then the rig name have changed as genesis3female.001

5 Now the appended clothing jcms drive by the genesis3female.001

6. After I change armature modifier from genesi3female.001 to genesis3female (current scene rig), now the clothing can pose with genesis3female (mhx), but jcm not drive by genesis3female rig propertys (fin)

Then I select appended clothing, with ctrl select the current character rig (genesis3female) and use the “Retarget mesh driver”

now it cause error

location: <unknown location>:-1
Error: Python: Traceback (most recent call last):
File "C:\Users\TAKE\AppData\Roaming\Blender Foundation\Blender\2.93\scripts\addons\import_daz\error.py", line 247, in execute
self.run(context)
File "C:\Users\TAKE\AppData\Roaming\Blender Foundation\Blender\2.93\scripts\addons\import_daz\driver.py", line 661, in run
self.retargetRna(ob.data.shape_keys, rig)
File "C:\Users\TAKE\AppData\Roaming\Blender Foundation\Blender\2.93\scripts\addons\import_daz\driver.py", line 676, in retargetRna
min,max,cat = self.getOldData(trg, prop)
File "C:\Users\TAKE\AppData\Roaming\Blender Foundation\Blender\2.93\scripts\addons\import_daz\driver.py", line 695, in getOldData
min = GS.sliderMin
AttributeError: 'GlobalSettings' object has no attribute 'sliderMin'

location: <unknown location>:-1

Or the usage is wrong? If so I hope to know if there is way, actually retarget jcms (and transfered shape keys) driver target change to current rig.

(of course the clothing perfettly fit with current rig and character mesh)

About default rig, I may not use this option (because I can easy transfer shape keys), but for MHX converted rig and make library which store clothing and hairs for same character, this option is useful if it work.
(change driver target from library rig (appended) to current rig.

I save all clothing meshes with MHX rig after convert as MHX, (to keep shape key or JCM driver expression correctly) in library. then load (append) them for working scene (so I can exchange clothing as I need for mhx rig without re-import and transfer morphs)

Comments (8)

  1. engetudouiti reporter

    hm,,, I think with new morph system, (which need prop for Armature object, and armature data) , maybe retarget shape key need more complex thing..

    I clear see,, driver expression need to change not only about rig name, but rig. data name too…

    This pic show appended clothing mesh object from library then those shape key driver expression, valuable target change as Genesis3female.001 (rig object), and Genesis3female.002 (rig.data)

    So if add on retarget shape keys, it need to change driver expression target, current scene character rig = Genesis3female(rig object), and Genesis3female.001 (rig.data)

    Before add on only needed to change the rig object name for driver expression variable ,I remember.

    I suppose, when select mesh and rig (which we change driver target), check the selected (active) rig object ID, and rig.data ID and convert these shape keys driver expression property, , when prop ID type = armature, change rig.data name, and when prop ID type = object, change rig name. then usually it should work.

    (of course, old rig (appended mesh library rig) and current character scene rig should have same property. to it work correctly, but I made library so (just use same rig and character body so all property should be same)

  2. engetudouiti reporter

    Then if you know way with other options to make it work (append mesh and attach it for current scene character rig,with keep shape key driver (JCM and custom morphs), I hope to know..

    I think before it worked when append mesh keep shape key driver correctly (so I need to save with rig then protect all driver expression in library, if I only save mesh, usually those shape key driver disappear (corrupt and auto removed when save I remember)

  3. engetudouiti reporter

    I could confrim, the procedure (when driver variable targets id_type ='ARMATURE', change target id as active rig.data , if driver variable targets id_type = ‘OBJECT’ change target id as active rig (object),) worked for me.

    At current I re-make my old function of my custom add on which I had used but I can not believe my self, (for error handling, when the shape keys driver not generated by your add on and daz rig)

    Though about this issue error seems , add on check if shape key limit and fin ,raw limit have changed with global setting (by user etc), so if you already take count rig.data props, I just wait you correct it. This is first time I test this function with new morph system, so do not know how you up-date those function.

  4. engetudouiti reporter

    And one question for way to preserve clothing as custom library (not use link or real override at current, just append from lib to confirm it work without problem)

    So to make custom library, I need to keep 2 mesh for rig (it can not be avoid I suppose) for MHX and default rig. with each weight map.

    Then if I transfer shape keys to transfer JCM or some custom morphs, add on still work without problem?

    if so I do not keep morph which need to be driven by rig for those library assets but may use transfer shape keys for each scene. (after append those mesh, then transfer shape keys from current rig body mesh)

    about gen and body I usually keep non merge version with merged one. so it is not problem. I usually not transfer gen morphs for other clothings. (maybe somecase it may need though)

    Then only thing which I hope to confirm, transfer body mesh jcm (and some pbm) to the clothing mesh . clothing mesh have already weight for MHX rig, (and current scene body use MHX rig). about this case, I can safe transfer all jcm and PHM to clothings with transfer shape keys ? (with some options)

  5. engetudouiti reporter

    Then I think I asked it long time ago,, if you keep default rig weight map without remove when convert MHX, , one same mesh (clothing) can compatible with default rig and mhx. I suppose.

    Though I remember there was reason you may avoid it, but with see current mesh weight map for MHX, I suppose almost all deform bone may change as new MHX bone name .

    then only remain some custom or hidden tweak bones. (but they do not change weight map at all). so basically, one mesh data have 2 type weight maps at same time (without user change something eg,, auto normalized etc) then can change attach rig (modifer target), anytime they need, I suppose at least about clothing

    If it work so,, I only need to keep one mesh as library, (which can use for default rig cloth, or MHX rig cloth with each scene rig,,just change armature target) hope if you may consider it or test.... (though it only work for same character shape,, )

  6. Thomas Larsson repo owner

    The global settings sliderMin and sliderMax were changed to customMin and customMax some time ago, but apparently the names were not updated everywhere. They are now. Will look into the other issues later.

  7. engetudouiti reporter

    Thanks, about 2nd question, it seems work without problem for me. that means, I could translfer shape keys (jcms etc) even though rig and clothing mesh have converted as MHX . We need to import morphs for body untill convert mhx,(like pose controll or jcms) but even though we do not transfer morphs for other attached mesh, but convert as MHX >> transfer shape keys do same thing.

    Only exceptional case should be,, merged bone and morphs. which drive or driven by those merged bone (clothing or grafted items or hair)

    About 3rd request, (keep weight map for old name bones, when convert as mhx ) if it work well at least I can declease most of clothing mesh for library , about body mesh, I think even though it keep 2 weight map,, I may prefer keep both separatelly.

    so my library will change,, (def rig with body mesh), (mhx rig with mhx body mesh) , (compatible weight clothings meshes).

    Then load (append) those items in actuall render scene, >> change armature target >> transfer shape keys or retarget driver

    is my current work-flow to store many clothing, hairs. (I keep hair with rig, and parented + constrain)

  8. Log in to comment