import_daz.getMorphs(ob, "Custom") can not show all custom morph

Issue #140 resolved
engetudouiti created an issue

I test with recent version daz importer, with blender 2.83

then after up-date morphs for new system, I install multi custom morphs, but use category name as bodys, like that .(not transfered still)

then tried to use the function getMorphs with use Custom.

but it only pick up one morph… you may clear see, what I tested. Do I need to use another function? or I use wrong argutment (type) etc?

Comments (6)

  1. engetudouiti reporter

    Hmm,, getmorphlist() show same problem. it only record first one morph in list.

    import_daz.getMorphList(ob, "Custom")

    it return

    [bpy.data.objects['Genesis 3 Female'].DazCustom[0]]

    (Though I could get the morph name of [0])

  2. Thomas Larsson repo owner

    Should work now. There is also an optional keyword “category” to only get the morphs a certain category, or a list of categories.

  3. engetudouiti reporter

    Thanks much. new morph system really enhace DAZ impoter props now !! 😀

    so now I can easy get all morphs prop ID for each custom category, and each morph type to get values. ( to get “all” daz props, can I use “all” for “type” arguments?)

    Then I hope if you can add one more function which can get daz custom prop float “values” with id keys? What I means,,

    props = getMorphVals(ob, type, [category])

    It will return dictionary, which gather current daz prop id, and values as dictionary only about Type and custom Category,

    It seems reduce some code to get prop values.😃

    Then would you teach me how I can get prop values only about “check marked” one? 🤔

    to export or import and change only about checked parametes .

    '(Then I believe it is best you will add the morph preset system button, in DAZ importer UI,,as same way you have already offer option only import checked duf, dsf files,, )

  4. Thomas Larsson repo owner

    You should only use the getMorphs function. Other functions are for internal use and their behaviour may change.

    getMorphs now returns a dict of (morph name , morph value) pairs. The simplified print name that is used in the panels is no longer available, because you probably don’t need it and can easily reconstruct it from the full morph name.

    If type = “All”, all types of morphs are included, otherwise only the specified types.

    Note that JCM-like morphs ["Jcms", "Flexions", "CustomJcms"] are stored in the mesh object, and other morphs in the armature object. The morphs that you will get thus depends on the object.

    The morph type names may change in the future. In particular, I would like to replace “Jcms” with “JCMs” or “StandardJCMs”, but old parts of the code capitalizes the type names and I haven’t had time to update that.

  5. engetudouiti reporter

    I really apreciate this new commits and yes, directly return the “value” is really useful. Of course I always follow your naming way. Object (armature or mesh obj) which morphs will be stored seems need to test with real case..

    What I hope is, the morphs (include face units , each mesh custom morphs etc) which we may use UI sliders, may better stored in Armature obj.. (because I can acess as ID props by current selected main rig)

    Before I only need to select Armature obj, to access and change values of children mesh shape keys, after I install with driver…

    The way is change? I do not care jcms (which we do not directly change value by UI slider) will be stored as mesh obj props.. (it seems reasonable)

    I do not test much about G8 flexion morphs (though I suppose it is kind of JCM ,, but about muscle) but if flexion can be controlled from UI slider as same as shape morphs, I hope at least I can access those value getMorphs(ob, type) , ob = currently selected armature,,

    ====

    ah ok,, yes so you said jcms type morphs,,, then I believe I do not change flexion values from slider, (when posed flextions will be auto-applied as jcm) thanks it is what I expected.

  6. Log in to comment