Stripped runtime system

In version 1.3 of the Daz importer the face bones drivers use Custom Driver Functions. This represents a major improvement compared to the methods used in earlier versions, because

  • There is no limit to the number of driving properties.
  • Driver functions can be combined with other drivers.
  • Performance is much better than with handlers.

However, there is one caveat. The Daz Importer must always be enabled, because the drivers use the functions evalMorphLoc, evalMorphRot and evalMorphSca, which are defined by the add-on. This is not really a problem as long as you stay on the same computer, but if you open your blend file to another machine which does not have the Daz importer installed, the missing driver function will destroy the poses completely, especially in the fase. A typical situation where this problem may arise is if you send the blend files away to a render farm.

To the left we have created an animation. Then we disable the Daz Importer add-on and reload the file, or restart Blender. The pose has turned into total crap.

If you look in the DOS/terminal window, you find a lot of error messages of the form

Error in Driver: The following Python expression failed:
        '0.0+evalMorphsRot(self, 0)'

Traceback (most recent call last):
  File "<bpy driver>", line 1, in <module>
NameError: name 'evalMorphsRot' is not defined


Thus clearly the problem is that the drivers for the face bones call the function evalMorphRot, which is missing because it defined by the non-available import_daz add-on.

To solve this problem, the definition of evalMorphRot and its siblings, together with some necessary supporting code, has been duplicated in the file runtime_stripped_28x.py, located in the runtime_stripped folder in the import_daz directory.

To use this file when the import-daz add-on is disabled, follow these steps:

In the Scripting context, press Open to open a text file, and open the import_daz/runtime_stripped/runtime_stripped_28x.py script (in Blender 2.79, open runtime_stripped_27x.py instead).
 
Register the script with the Text > Register menu item.

Make the script internal with the Text > Make Internal menu item. This step does not seem to be absolutely necessary, because when the file is opened on another computer Blender complains that the file is missing, but uses the script that is saved in the blend file.

Then press the Run Script button.

 
Finally save the blend file.
Restart Blender and open the blend file again. Since it is the last file saved, it should be found at the top of the Open Recent... menu item.
 
And now the ugly face is replaced by a smile.

Since the blend file now works as a stand-alone file, without the need for the Daz Importer add-on, you should be able to send it to a render farm and get back reasonable results.