User Tools

Site Tools


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 Qt Script, which is an extension of ECMAScript as defined in the ECMAScript Language Specification (ECMA-262), 5.1 Edition.

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. However, 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 accepted1). So, in Qt 4.52), 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 Qt Script 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 Qt Script compliance with the ECMA-262 standard.

Porting

Information related to porting QSA based scripts to being Qt Script based can be found in the Moving from QSA to Qt Script document.

Resources

2)
Daz Studio 4.0.x is built on the Qt 4.7 framework. Daz Studio 4.5+ is built on the Qt 4.8 framework