Import custom morph (drive property) may duplicate already imported morph slider

Issue #430 resolved
engetudouiti created an issue

I may report individual issue about new morph system with different topic to solve one by one.

This issue happen when user import new custom morph which drive already imported morph before we couls not import those morphs, but recent add on could do it. (I think it may relate with some corruption when we import G8.1 face unit and expresison individually, but if custom morph work , I think we can avoid same issue so talk as custom morph only.

eg import face unit first, then in daz studio, you make new pose controller which only change face unit morphs. with ERC freeze, save it as new morph.

before add on can not manage those type morph. so I needed to convert the pose controller to pose actual bones, then save as morph.dsf and import as custom morph. but new morph system forgive user to import user made (or vendor offer) morphs which change other morph values.

like this.

Then I import the morph (PctrTest.dsf) with add on after import all face unit (which driven by PctrTest).

So add on can import prop and set driver correctly, but the problem is it duplicate all silder which driven by import PctrTest like this.

Only problem is, those morphs have been installed as Face unit, (or un cloassified morphs). then it may do same thing if I import new morph which drive other property (in expresison or in face unit or in vismes).

I did not check if I import new one in same category, and it drive same property, how add on will generate slider. it olnly issue for UI slider. (custom property not duplicated)

Comments (14)

  1. thisis sparta

    this also happens whenever importing, as custom morph, any expressions that use FACS (apart from the pre existing FACS expressions for Genesis 8.1). Also the newly imported expressions stop functioning if the duplicate FACS units that were imported automatically are deleted.

  2. engetudouiti reporter

    Yes I remember thisis sparta issue. To solve those up-date issue, I think we need some functions which can store and manage already imported driver target variables, expressions, etc. Thomas may know clear what is current problem. and what we need to solve these issue.

    I wait if Thomas will find solution .

  3. engetudouiti reporter

    Then if problem is only about UI slider (and category), I have suggestion about current Collection property to make category for each morph.At current, add on seems use Collection property, for each category or to get slider is selected or not.. but not perfectly gather all data which may useful to manage UI slider and morph.

    if all morphs slider are gathered as Rig.Daz_ui_morphs (collection property),

    then each Daz_ui_morphs[0] , [1], [2]….. represent each morph(raw) slider data (like category, file path, hidden etc)

    Then I think add on can check those data when generate raw slider, more easy.

    so when import new morph.dsf, add the morph(raw) slider in Daz_ui_morphs, and set slider propertys whcih you need to keep, as Property Group propertys

    (category, custom, hidden, daz morph dir, name or id etc,) then use the stored data to generate , remove, edit UI slider Category.

    eg Daz_ui_morphs[9] may represent, slider of Rig[“morphtest”(raw)”]

    Rig.Daz_ui_morph[9].name = “morphtest”, Daz_ui_morph[9].category = “custom”, Daz_ui_morph[9].group = “shape”, like this. if it make so, when import new morph, you can check if the morph already in Daz_ui_morphs[].name or not. and you can get category, and can access Rig[“morphtest”] (raw) property. and driver..more easy from file name or ID.

    =========

    you already use dazActivated (Collection props), to get each slider activated or not..

    rig.dazActivated[0].name show the slider name, and rig.dazActivaed[0].active return true or false.

    So I think it can be gathered as daz_ui_morphs[n].active then can add more property like category or check it is custom morph, or set it as hidden etc..

    you may access each slider prop by serching through Daz_ui_morphs collection, with name or id.then can get category.. above case, when I import custom morph dsf, add on may try to add raw prop , fin prop, (if it include shape key data, generate shape key), and set driver, I suppose.

    then generate new layout.prop.. so if you check the morph name already in daz_ui_morphs[n].name, you skip to generate UI slider…. (I suppose you alerady do almost same thing, but do not know why it duplicate… (though there should be complex reason, why at current it work so)


    Actually I think, you can get most of data which need to change UI panel, by set one “Collection property” for each morphs.

    and if you set “name” for Daz_ui_morphs[] property, the name can directly use as key of collection property.

    eg you can set or get Daz_ui_morphs[“mytestmorph1”].category directly by the morph name.

    All property of Daz_ui_morphs do not need auto-up-date,, they will be directly set propertys, when we import new morphs, or when we change category, or when we delete UI morphs. (but keep the csutom property as same as before)

    Or you can make DazMorphSetting , then add “slider” property as bool type, then only when slider=True, you may generate UI prop slider for the morph.

    I understand, current add on panel morphs have been expanded, and add new option one by one (like check mark or user category), so it seems good time to re-write code for generate UI panel. It should not effect, about each morph value, and driver expressions, , raw prop, fin prop, shape keys, intermediate props.

    New UI panel code is only about how generate UIlayout, and props, more effectively. with use your set setting values. so it relate with how you generate props to keep each morph setting data. (morphing.py panell.py )

  4. engetudouiti reporter

    This issue is same which described in closed topic (sorry I made it too large, with talking many issues about Fact morphs in same topic) And this is main problem what we change way.

    We also have some problems with facs expressions ruining facs units. The new morph system first removes all morphs of the given type (units, expressions, etc), then reads the files and creates the morphs again. This is normally not a problem if you load all morphs of the given type. However, it only works as long as morphs of one type (facs expressions) don’t refer to morphs of another (facs units). Don’t know how to handle this. Perhaps both types need to be loaded at the same time.

    I think we should not remove all morphs, but edit morph which already installed (exist) driver expression and variables. the procedure is need to solve those morph up-date issues. (slider layout props and real prop which will be driven or drive each other)

    Basically we can not do “both types need to be loaded at the same time” for any custom morph product. When import morphs, we can choose morphs in one same morph Directory (product base) only.

    About new Fact 8.1 morphs, we can not import Expression untill we import Face units. it is not bug. because daz offer it as one products package (default package). then if we hide Facs unit directory, daz simply show errors because Expression morphs dirve, them.

    But it need to work if we import all Fact unit first, then import all Exprression next without break or duplicate already imported Facs Unit morphs. (slider and driver). I ignore limit of expression in this topic.

  5. engetudouiti reporter

    Then About my op issue (G3 custom morphs) it seems UI issue, which happend to duplicate all driven Facs unit slider in 2 category (Facs unit and Custom morph) when I import new one morph controller which driven them. If you can not change draw function, I think Thomas can offer up-date function which re-draw Custom morph sliders (layout props). when they have been duplicated slider in custom morph,

    In my test case, TKpctrTest(fin) drive, Facs unit morphs ( Cheek ballon(fin) . Eyes suint(fin) ….).. then it generate new custom prop about TKpctrTest(fin), then set dirver correctly for those driven Facs units morph props. at same time it generate (draw) un necessary UI props.

    If you have made collection property which can store Category and name, when generate each layout.prop slider, for each ,morph(law) property, I suppose you could avoid, generate those UI slider (which already in fact morph category). or at least you can add up-date button , which re draw prop slider for each imported morph and category.

  6. Thomas Larsson repo owner

    engetudiouiti, could you please upload your test file. I haven’t figured out how to make new poses in DS, and if you already have a nice file I could just as well use that.

    Removing morphs doesn’t really work with the new morph system. The sliders disappear from the UI, because that part of the code is the same as in the old system, but properties and drivers are still there. So that is something that needs to be addressed first.

  7. Thomas Larsson repo owner

    On second thought, the same issue can be triggered in a much simpler way.

    First step: load EyesClosedL.

     Making morphs
      * EyesClosedL
     Making missing morphs
    

    Second step: load EyesClosed.

     Making morphs
      * EyesClosed
     Making missing morphs
      . ectrleyesclosedl.dsf
      * ectrleyesclosedr.dsf
    

    The terminal output means that in the Eyes closed file, references to the left and right morphs were found. The add-on then proceeds to load those. The left property already exists and is ignored (hence the dot), but the right property is not found so that file is loaded (hence the star). Now all three sliders exist in the UI and work correctly.

    Thus in the last commit, duplicate morphs are no longer loaded.

  8. engetudouiti reporter

    Thanks. if you need to test morph files. which you hope to check, tell me please. I can offer any hand made morphs which you need to test.. if you describe what you need to test. (like drive jcm with multipler, or drive face units only or drive pose controller + face unit ,,, I think use simple custom morphs may make you test easy)

    When you test morphs, I found I needed to set the morphs in daz library, same structure as the morph I made. (relative path from your one library directory). So you need to locate un-zipped folda. there is duf in my signature and sub directory. for genesis3 morphs. “TK/test/TKpctrTest” you need to locate the dsf as,

    “(your daz library) data\DAZ 3D\Genesis 3\Female\Morphs\TK\Test\TKpctr.Test.dsf” in your genesis3 female morphs data directory.

    you can check it in daz studio, with select root node, I do not make alias for head node, so you need to select root node in daz studio. “pose controll/head/test category”

    in blender simply load it as custom morphs after import face units of G3. The morph only drive face ctrl (default) propertys. (so it is good to test)

    The terminal output means that in the Eyes closed file, references to the left and right morphs were found. The add-on then proceeds to load those. The left property already exists and is ignored (hence the dot), but the right property is not found so that file is loaded (hence the star). Now all three sliders exist in the UI and work correctly.

    your guide is really helpful to understand how add on generate morph(raw) and (fin), when import each directory morph driver expression and variables Then I hope to know those detail. Then I hope to confirm the way…

    Add on try to generate driver expression for the morph(fin) one by one..,, when import each morph.dsf in sub-directory,,with generate fin and raw props of the morph?

    or add on try to generate fin and raw props for all selected files first,, , then generate driver one by one with use already imported all morph propertys?

  9. engetudouiti reporter

    Yes your test it really good to confirm how it work.. So I may test the case,, with another setting and check conslole,,

    1. only select EyesClosedL, then import as Face unit. next then select EyesClosed as custom morphs.
    2. select both ,and install as Face unit (or Custom morphs.. (I suppose they are installed same daz morph directory)
    3. select EyesClosed only, then import as Custom morphs. (no install other morphs at all)

  10. engetudouiti reporter

    Yes it worked thanks ^^ I will close soon, after test with real vendor products to confrim but I suppose UI duplicate slider issue seems has gone already at least import as new custom morphs.

    @thisis sparta

    I suppose this UI duplicated problem may not happen about G8 Facs expression and custom morphs. if you test. (though I do not confrim, first imported morph driver expression can keep as same as before or not. I saw the problem (some Facs unit props driver expression overwritten by new imported controller, and lost some function. ,about G8.1 before)

    At current I only hope to test with G3 , then keep to test only G3 default morphs and custom morphs, but If you see clear import morph problem I hope you report it with real case (step by step reproduce easy) and topic about each problem, then anyone can check it too. (of course Thomas is only one who actually solve issue)

  11. engetudouiti reporter

    Thanks with simple test it seems have solved. (I may test about overwriten dirver issue ) next. I think one of main annoying problem has gone now ^^

  12. engetudouiti reporter

    I can not help you much even though I really often use your add on, but I hope to tell you the way to make ERC morphs in daz studio when you need it.

    There are 2 ways, manually add ERC with property hielrachy pane, or use ERC freeze to make first both have pro and con, to quick make pose controller or any controller which drive other props you may better to know ERC freeze way.

    1_ in daz studio, load G8.1 female (which you may hope to make ERC face pose controller. select top root node without add any other character morphs.

    2_ we need to make facial controller property first which control other morph. , go to parameter tab, then right click parameter tab> Edit mode. and preferences> activvate Show hidden properties

    It usually offer many option and show type of morphs to edit each daz property slider. and you can see all morphs daz hidden too.

    you may see many category, but now we make head pose controller then select the category, eg pose controller/head section. like this pic. then right click the tab, and choose “Create new property” it open small window to create new property.

    3_ next set parameters for new prop (Small window to set parameter). you can edit it as you like later, but to first test pose controller, set those attribute first.

    Name: pctrlMytestexp (file name) Label: Mytestexp (parameater view label) Path Pose Controlls/Head/Thomas (group for UI to show the morph)

    (you can input “/Thomas” even though you have not made group, ds auto generate new group for your new category) Hidden = no Locked = no, AutoFollow = Yes (asyou like) you need not check Create As Empty Morphs. then click Create.

    4_ you may see, now ds add new group Head/Thomas then when you click the group, you may find your new property. you can now change setting as you like with use parameter setting. but at current I leave it off. then set the new morph value as 1.00 (100%)

    5_ you keep your new morph as 1.00. then next make Expression as you like. you can use any morph which you already installed, but for first test, you may only use some 2 or 3 Facs Unit morphs. (though you can use any morphs eg expression or vismes etc) after you made your expression. go to currently used section, to check which morph you used to make expression. you may see like this pic . I use eye, nose, and jaw morphs to made expression,, so all morphs which value is not 0 are shown.

    6_ you must find your hand made morph as currently used (as 1.00 value). then right click the morph (which you made), and select ERC freeze. like this

    7_ it open ERC freeze window, then set those attribute

    Node = Genesis 8.1 Female (your currently selected node)

    Property = your hand made property (which you right click and ERC freeze)

    Attenuate = not need to activate (I do not know the usage, but it seems to be removed un-necessary driven prop? I do not use the option

    In Property section, you may see driven propertys which will be controlled by your hand made propertys.

    If it happend to include un-necessary one, like Render setting or some HD morphs etc, you can remove it by un-check them.

    about this case, I only use facs_unit morphs so there is no problem but some case it include HD morph or render setting, or sub-D setting so you carefully check them

    all props in propertys section will be driven by your new controller. And I activate “Restore figure” option only ,. After you confirm it, click “Accept”

    8_ Restore figure option, restore all morphs value which currently used. then your figure return as default. you may confrim , set your “Mytestexp” , it actually drive all props as you set before.

    9_ basically it may need not, but as you know DS offer 2 otpions how save ERC formula,, about this case, I hope to save those ERC formula in new MYtestexp file not hope to save new formula in other DS morph files. to confirm it,, right click your “Mytestexp” and “show in property hieralchy, then DS open Property HIelachy pane, then expand the property, you may find all driven property (fact morpsh) which you set . then check “Attribute” > Save with.

    it should set as pctrlMytestExp (MytestExp), it means all driver expression are described in your new morph files. (so not change fact morph files, when you save the morph)

    and you only need to save the new generated morph file without over-write other fact morphs.

    10 after you confrim it work as you need, you can adjust the morph setting in parameter setting (click the gear of the parameter) , but now I keep it as same as before, then save it as new morph file. you may better set the morph value as zero, and confirm default and current value of your morph set as 0.. or sometimes ds save default, or current value as 0, then show really annoying issue untill you delete the morph file. file>save as>supported assets>morph assets

    11 you may set your vendor name like Thomas, etc and you can set product name as sub-directory for path as you need (eg you can add one more sub dir for product manually input path like “posectrl/test” . ds auto generate those sub-directory as you input to save the dsf in G8.1 data morphs.

    12 to make more complex morph, you need to work in property hielalchy pane,, you can set sub-component or set controller, after you generate new property without use ERC freeze (you can drug morphs in property hieralchy pane, which you need to add as sub component or add as controller, then set step value. or can add 2nd stage controller etc.. To test those,, you may first made 2 or 3 custom props,, and make ERC as you like, then save them and see how it work. (in Property hieralchy pane,, add another prop as controller or sub-component . for each property.

  13. Log in to comment