Export As: [ PDF | ODT ]

Scripting

This page is a WIP. There is likely to be incomplete and or missing information while the page is being built. A previous version of the DAZ Script documentation, which is largely compatible with the current API, can be found here.

Summary

DAZ Script 2 is a dynamically typed, interpreted, object-oriented scripting language that is tightly integrated with the DAZ Studio API. It is an extension of QtScript, which is itself an extension of ECMAScript as defined in the ECMAScript Language Specification (ECMA-262).

Syntactically, DAZ Script is very similar to JavaScript, JScript and ActionScript. If you have any familiarity with these languages, chances are you will find the transition to DAZ Script quite comfortable… though it may be a little unintuitive at first for developers more familiar with strongly typed, compiled languages.

Background

DAZ Script 1 was based on QSA (Qt Script for Applications), which derived from the ECMA-262 3rd edition standard and the 4th edition proposal. In QSA, most of the run-time logic, such as classes and scoping rules, were based on the 4th edition proposal, while the library implementation was based on the 3rd edition standard. The 4th edition proposal ended up not being accepted. So, in Qt4.51), Trolltech decided to end-of-life the QSA product and develop a new native scripting engine based on JavaScriptCore, that was compliant with the 3rd edition standard… and QtScript was born. As a result of these events it became essential that we adapt, so DAZ Script 2 finds its roots amidst the efforts of QtScript compliance with the ECMA-262 standard.

Resources

1) DAZ Studio 4.0.x is built on the Qt4.7 framework. DAZ Studio 4.5+ is built on the Qt4.8 framework