FACS can't be imported on Linux.

Issue #435 closed
Chris R created an issue

Now i know Linux might not be supported by the addon but i figured i’ll open a ticket anyway.

I’ve imported a default Genesis 8.1 Female character (just the base with no alterations) through the importer into Blender and noticed that the FACS menu entries (FACS Units & FACS Expressions) under the Morphs category aren’t populated, while all other entries are populated. I’m not sure why but it seems that Blender (2.92 Native) or Linux fails to locate the “Female 8_1” & “Male 8_1” folder.

In order to pinpoint the issue i went ahead and copied the FACS folder from the “Female 8_1” folder to the “Female” folder and changed their location accordingly in the “data/genesis8-female.json” just to see if the addon will populate the menus with entries. Long story short, it worked.

In general i’m ok with this workaround for me if this is something that can’t be fixed, but i’d like to know if this could bug out something later down the line or if it doesn’t matter to the system where those FACS folders are located as long as it can find them.

If you need anything else from me feel free to ask i’m more than willing to help.

Thanks for your outstanding work as well as anyone who contributes to it!

Comments (11)

  1. Thomas Larsson repo owner

    I had a Linux box some time ago, but it died. OTOH, I only installed Linux on it after the windows installation had already died, so the machine was corrupt to start with. So I cannot check any Linux problems anymore, but any problem with Linux probably affects Mac as well, since in both cases the file systems are case dependent.

    The add-on tries to find assets, even if the case is wrong. I didn’t write that piece of code myself; some Linux user contributed it long ago, but in my experience it works quite well. It fails in one situation, though: if there are several case-sensitive directories that correspond to the same case-insensitive directory. Are you sure that there is no other directory with the same case-insensitive name, .e.g “female 8_1” instead of “Female 8_1”? Perhaps starting with another root path.

  2. Aszrael

    For Linux I got the following error importing Dicktator assets:

    MISSING ASSETS:
    data/Meipex/Dicktator_Genitalia_G8M/Dicktator_Genitalia_G8M_v3/UV%20Sets/Meipex/Base/Dicktator%20UVs%20v2.dsf

    So, the UV-maps are not loaded. The work around: load it manually via: Advanced Setup → Load UV Set

    Seams like the import script has problems with spaces in folder names.

  3. Thomas Larsson repo owner

    No, spaces and other strange characters should work fine. I use such assets all the time, and did so when I still was on Linux.

    But what is strange about your error message is that the path does not begin with a “/”, as in this:

    MISSING ASSETS:
    /data/h%26c/2018%20business%20suit%20for%20g8f/bsa%20jacket%20d2/181_49913.dsf

    I’m not sure how the plugin reacts to that on Linux. On Windows a path that does not start with “/” is interpreted as an absolute path, but then it always starts with “C:” or “D:” or so.

  4. Aszrael

    found my error: Content Directories in Global Settings must end without /
    I just paste&copied from the Dolphin file explorer. So: “…/MyLibrary/” is wrong, “…/MyLibrary“ works.

    However it was strange, as this only happened to the Meipex Package… (I do not own more).

    Thanks, for you fast response!

  5. Xin

    Thomas, to avoid these issues, I think always using “os.path.join()” and completely avoiding using “+” to join paths would work.

    For example in “asset.py” there is the following line:

    subpath = path + "/" + fname
    

    Which could be:

    subpath = os.path.join(path, fname)
    

  6. Thomas Larsson repo owner

    I use os.path.join() most of the time, but in this particular case I am not sure that it will work. File paths are not only used for opening files, but they are also compared to duf/dsf urls, which use forward slash even on windows.

    Anyway, this problem should not arise anymore. File paths are brought to canonical form when opening and closing the global settings dialog, and that now includes stripping trailing slashes.

  7. Xin

    In that case Thomas, you could look into using os.path.normpath(), os.path.normcase(), os.path.abspath(), and os.path.realpath() too.

    These are all functions that will behave differently according to the os, so they are good for comparing paths in an os independent manner, while taking into account that paths could be written differently but still be the same (like a windows path having uppercase letters, or different slashes conventions, etc.).

    For example:

    def normal_path(path):
      return os.path.normcase(os.path.normpath(path))
    
    path0 = normal_path(os.path.join(path, fname))
    dsf_path = normal_path(os.path.join(daz_path, dsf_url))
    if path0 == dsf_path:
      ...
    

  8. Thomas Larsson repo owner

    Perhaps, but things seem to be working now, and I don’t want to change core functionality before a stable version 1.6.0 is released. Maybe later.

  9. Chris R reporter

    Hey guys thanks for all the recent investigation into the issue but it seems that the issue is “simpler” than it looked at the beginning.

    It’s not the Female 8_1 & Male 8_1 folder the system struggles with but the uppercase DAZ 3D folder defined in the genesis8-female.json & genesis8-male.json. DAZ seems to install its content into a lowercase Daz 3D folder but the .json files link to an uppercase DAZ 3D folder. I’m not quite sure why it only fails to load the FACS & FACS Expressions (all other paths work with the uppercase DAZ 3D) but changing both paths to a lowercase Daz 3D folder (both folder appearances per line) inside the genesis8-female.json & genesis8-male.json fixes the issue.

    Again thanks for the investigation and all the work put into the the addon.

  10. Thomas Larsson repo owner

    The plugin should compensate for that; at least it did when I was on Linux. What causes problems is if you have multiple case-sensitive directories corresponding to the same case-insensitive ones, like runtime/textures and Runtime/Textures. In that case you need to manually move the files around so the case-insensitive path is unique.

  11. Log in to comment