When controller set ID and name opposite, import expression set mirror pose

Issue #1127 resolved
engetudouiti created an issue

I describe special case which apply mirror pose for Import Expresison (with database)

I can not call it bug, it seems vendor happend to set reverse name and id when make it. and it work for ds. so I do not report it. And at current I only know 4 files in one product, so usually it may not happen.

This good product https://www.daz3d.com/genesis-3-female-s-expressions-face-aniblocks

only about 4 files (though I still not check all) set ID and name as reverse. Then if I save new expresssion which use these controller

and “import expression”, add on not load the Controller but use another mirror one.

Problem files are,

head_eCTRLSWMBiteLipRight, head_eCTRLSWMBiteLipLeft, alias_Genesis3Female_eCTRLSWMBiteLipLeft, alias_Genesis3Female_eCTRLSWMBiteLipRight

The reason is, these file set reverse L and R for ID and name.. it work for daz studio without problem, but when there are used in expression.duf, add on try to use opposite one.

(eg when it need to load head_eCTRLSWMBiteLipRight, it load head_eCTRLSWMBiteLipLeft

author describe head_eCTRLSWMBiteLipRight like this

{
    "file_version" : "0.6.0.0",
    "asset_info" : {
        "id" : "/data/DAZ%203D/Genesis%203/Female/Morphs/SimonWM/G3F%20Expressions/head_eCTRLSWMBiteLipRight.dsf",
        "type" : "modifier",
        "contributor" : {
            "author" : "SimonWM",
            "email" : "simonwm2012@comcast.net",
            "website" : "http://www.daz3d.com/shop/simonwm"
        },
        "revision" : "1.0",
        "modified" : "2016-05-11T00:00:55Z"
    },
    "modifier_library" : [
        {
            "id" : "eCTRLSWMBiteLipLeft",
            "name" : "eCTRLSWMBiteLipRight",
            "parent" : "/data/DAZ%203D/Genesis%203/Female/Genesis3Female.dsf#head",
            "presentation" : {
                "type" : "Modifier/Pose",
                "label" : "",
                "description" : "",
                "icon_large" : "/data/DAZ%203D/Genesis%203/Female/Morphs/SimonWM/G3F%20Expressions/PHMBiteLipRight.png",
                "colors" : [ [ 0.1607843, 0.1607843, 0.1607843 ], [ 1, 1, 1 ] ]
            },
            "channel" : {
                "id" : "value",
                "type" : "float",
                "name" : "eCTRLSWMBiteLipRight",
                "label" : "SWM Bite Lip Right",
                "value" : 0,
                "min" : 0,
                "max" : 1,
                "clamped" : true,
                "display_as_percent" : true,
                "step_size" : 0.04
            },
            "group" : "/Pose Controls/Head/Expressions/Simon WM",
            "formulas" : [
                {
                    "output" : "Genesis3Female:/data/DAZ%203D/Genesis%203/Female/Morphs/DAZ%203D/Base%20Pose/eCTRLMouthOpen.dsf#eCTRLMouthOpen?value",
                    "operations" : [
                        { "op" : "push", "url" : "head:#eCTRLSWMBiteLipLeft?value" },
                        { "op" : "push", "val" : 0.064 },
                        { "op" : "mult" }
                    ]
                },

Though I can describe all detail about json one by one (why for daz it work ), but anyway you notice,

even though label (in daz studio) chanel

"name" : "eCTRLSWMBiteLipRight", label" : "SWM Bite Lip Right",

but he set modifier id as "id" : "eCTRLSWMBiteLipLeft", "name" : "eCTRLSWMBiteLipRight",

then in all formula of this controller use the id "eCTRLSWMBiteLipLeft" as controller.

now I only set this cotnroler as value 1.0 then save it as my new expression in daz studio.

it describe like this.

{
    "file_version" : "0.6.0.0",
    "asset_info" : {
        "id" : "/People/Genesis%203%20Female/Expressions/TK/lipbiter.duf",
        "type" : "preset_pose",
        "contributor" : {
            "author" : "TK",
            "email" : "",
            "website" : ""
        },
        "revision" : "1.0",
        "modified" : "2022-08-19T12:49:55Z"
    },
    "scene" : {
        "animations" : [
            {
                "url" : "name://@selection/head#eCTRLSWMBiteLipRight:?value/value",
                "keys" : [ [ 0, 1 ] ]
            }
        ]
    }
}

you may see in the saved Expression preset duf, animation url use name.

"url" : "name://@selection/head#eCTRLSWMBiteLipRight:?value/value", then can set controller

( "name" : "eCTRLSWMBiteLipRight") value = 1.00

but Daz improter unfotruantelly miss (maybe serch id eCTRLSWMBiteLipRight then load or serch it and set props value described in pair name file ^^;

in daz studio

in blender (I load same saved expression which I attached code)

Actually I once correct it, (then it worked) by change those problem 4 files, but so it work in ds then

I may hope Thomas confirm,,, (because I do not know how you use id / name for case by case with each import menu

(it may change when import (morph)/ import(expression) ? I do not know. and if there is option, (force to use Name etc)
I hope to know. (I just describe, if G3 user have same issue when they use this product and made custom expression etc,

and for myself (so I can remember easy, when I see same issue, I may check the product file first)

Comments (10)

  1. Thomas Larsson repo owner

    Hm. Perhaps this happens because scanning ignores alias files. What happens if you load the morphs as custom morphs before importing the expression? That is safer than relying on that missing morphs will be loaded correctly.

  2. engetudouiti reporter

    mmm,, about this case, 2 alias files have same problem (describe ID and name, as reverse) so I think it not relate with this issue.

    as you can see, I only save real pose file value. (not save alias , I set so when save expresison carefully)

    Then Yes I felt if import as morph it may work

    (from seeing my close topic, it seems worked for me,, = import as morph then import expresison)

    I know about this case, after all I need to import morphs (or import expresison will auto import morphs)

    But if the producct controller only use default morphs, (which all user import), add on may not load them. Then maybe there will be case without load morph, but simply show mirror pose.

    (it was happend to use bone transform, but as you said, there will be case only need to use other basic morphs)

  3. engetudouiti reporter

    Yes ,, I test now..

    1. I load the file = /data/DAZ%203D/Genesis%203/Female/Morphs/SimonWM/G3F%20Expressions/head_eCTRLSWMBiteLipRight.dsf"

    ‌ as morph

    2. then I manually check , it work correctly

    3, return as zero, then import saved same Expression file,, it ccorrectly applied the value. if it miss , I think import another one as new morph. but about this case, add on set already imported morph as 1.00 correctly.

    So it seems only happen, when I import Expression.. btw, why Bit bucket list is so un-usable ^^; (it not forgive me to change new line, but it often auto-set as list, when I imput number )🤢

  4. engetudouiti reporter

    ththththomas… now I found new problem ^^;

    when I first import the controller as morph (I make new test category)

    Then next import Expression,, it worked but it seems try to load empty morph and I see some warning

    output console it is huge (though it seems stop to output,, when load finished,,) I cut off it…

    ARN (bpy.rna): C:\Users\blender\git\blender-v320\blender.git\source\blender\python\intern\bpy_rna.c:8439 bpy_class_call: unable to get Python class for RNA struct 'DAZ_UL_CustomMorphs'
    WARN (bpy.rna): C:\Users\blender\git\blender-v320\blender.git\source\blender\python\intern\bpy_rna.c:8439 bpy_class_call: unable to get Python class for RNA struct 'DAZ_UL_CustomMorphs'
    WARN (bpy.rna): C:\Users\blender\git\blender-v320\blender.git\source\blender\python\intern\bpy_rna.c:8439 bpy_class_call: unable to get Python class for RNA struct 'DAZ_UL_CustomMorphs'
    WARN (bpy.rna): C:\Users\blender\git\blender-v320\blender.git\source\blender\python\intern\bpy_rna.c:8439 bpy_class_call: unable to get Python class for RNA struct 'DAZ_UL_CustomMorphs'
    WARN (bpy.rna): C:\Users\blender\git\blender-v320\blender.git\source\blender\python\intern\bpy_rna.c:8439 bpy_class_call: unable to get Python class for RNA struct 'DAZ_UL_CustomMorphs'
    WARN (bpy.rna): C:\Users\blender\git\blender-v320\blender.git\source\blender\python\intern\bpy_rna.c:8439 bpy_class_call: unable to get Python class for RNA struct 'DAZ_UL_CustomMorphs'
    WARN (bpy.rna): C:\Users\blender\git\blender-v320\blender.git\source\blender\python\intern\bpy_rna.c:8439 bpy_class_call: unable to get Python class for RNA struct 'DAZ_UL_CustomMorphs'
    WARN (bpy.rna): C:\Users\blender\git\blender-v320\blender.git\source\blender\python\intern\bpy_rna.c:8439 bpy_class_call: unable to get Python class for RNA struct 'DAZ_UL_CustomMorphs'
    WARN (bpy.rna): C:\Users\blender\git\blender-v320\blender.git\source\blender\python\intern\bpy_rna.c:8439 bpy_class_call: unable to get Python class for RNA struct 'DAZ_UL_CustomMorphs'
    WARN (bpy.rna): C:\Users\blender\git\blender-v320\blender.git\source\blender\python\intern\bpy_rna.c:8439 bpy_class_call: unable to get Python class for RNA struct 'DAZ_UL_CustomMorphs'
    

  5. engetudouiti reporter

    No it seems keep out-put it when I open console,, though I can not detect, when it add new line.

    anyway, I hope to return my file as usual name setting, and re-scan data base, so I may not report about this special case ^^;

  6. engetudouiti reporter

    I did not see this issue anymore, after re-edit duf files id and name. then test same thing. (and update daz importer to newest version) Though when I test again after scan data-base,, I import 5 or 6 simon morph first.. but maybe it not related with this issue.

  7. Thomas Larsson repo owner

    I think I finally understood how aliases work. Now the lip bite morph looks right, at least in three of four cases:

    1. Use database, morphs loaded in advance.
    2. Use database, load missing morphs.
    3. Don’t use database, morphs loaded in advance.

    Without the database the right missing morphs are not found, but that was expected. To make this work, you again have to scan the database because now the alias is stored there too.

  8. Thomas Larsson repo owner

    Now I also saw those warnings in the terminal. It disappeared when I updated scrollbars, so now the import tools always do that.

  9. engetudouiti reporter

    Thanks the warnings was annoying. I usually keep to use database. because as user

    we may not clear understand, the preset need to use database or not I suppose.

    because we do not remember, how we made each preset. and we may not check preset code for vendor (without we got problem)

    anyway this is small but complex problem for me, so thanks you try and solve issue ^^

  10. Log in to comment