Sidor

Monday, November 27, 2023

Linux Revisited

DAZ Studio does not run natively under Linux, but it can still be used with Wine. However, although Wine emulates Windows, the underlying Linux file system is case sensitive, which causes some problems. Two file paths that differ only in casing, e.g. Runtime/Textures/ and runtime/textures/, are the same directory on Windows but two separate directories on Linux, and if the casing is wrong files may not be found.

Part of the early development of the DAZ Importer was carried out on a computer with Linux. At that time the global setting "Case-Sensitive Paths" was introduced, which by default is enabled on Linux and disabled on Windows and Mac. If this setting is turned on, some extra work was done to find the right Linux file path given a case-insensitive Windows path, see this blog post. However, this never worked very well, and sometimes files were missing. Therefore a new way to handle case-sensitive paths was introduced some time ago, which also can handle the case that several different Linux directories correspond to the same Windows directory.

Unfortunately, my Linux computer has since broken down, so I am not able to test this properly on a computer with a case-sensitive file system. Nevertheless, I think that it works, at least for the basic functionality.
If Case-Sensitive Paths is enabled but we haven't yet scanned the database, we get an error message when we try to import a DAZ file.
As the error message says, we must run the Scan Absolute Paths tool in the Utilities panel. This scans the entire database, so it may take a while.

All subdirectories of the content, MDL, and cloud directories are included in the scan. We can also specify the location of the json file where the result is stored.

Once the scan is completed, the result is save in a file called import_daz_scanned_absolute_paths.json (or whatever file path you specified above). We can now import scenes and morphs as usual.

We can even delete all root paths and still import files, because the DAZ Importer finds the assets from the scanned json file.

Important: The plugin does presently not check if the DAZ database has been updated. If you install new assets, the database must be scanned again, otherwise the new assets will not be found.