Sidor

Sunday, October 10, 2021

Scripting for version 1.6

It was more than a year since I last wrote about scripting the DAZ Importer, and some things have changed since then. In particular, the scripting interface now uses snake case like the official Blender API. In contrast, the DAZ Importer source code uses camel case. This was an unfortunate choice but it is too late to change that.

In particular, this means that

import_daz.setSelection(list_of_filepaths)

is replaced by

import_daz.set_selection(list_of_filepaths)

Apart from that change, most of the examples in the previous post should work without changes. A description of the available functions and operators are found in

All functions intended for external scripting are defined in the file api.py, so you could also look in that file.

I added a new repository with some sample scripts. It has a dual purpose: to provide some examples how you can script the DAZ Importer, and also to act as a test suite for future releases. The sample scripts are found in

https://bitbucket.org/Diffeomorphic/daz-importer-scripts/