Does inheritance work in DAZ Script
mpadubrin
Posts: 12
Hello,
after several experiences with DAZ Studio metadata I am considering writing a script to make handling my problems easier for me, especially for managing my own categorization and tags which I am using heavily. Currently I am experimenting with the scripting language. I really do like the effort going into it, but there are some gaps in the documentation which do make experimenting very time consuming. So I will start with a very basic question. Does DAZ script support inheritance and how would you do it?
Best regards
Michael
Comments
http://docs.daz3d.com/doku.php/public/software/dazstudio/4/referenceguide/scripting/start has a dead link to a page on ineritance, but the scripting language is derived from/compliant with ECMAScript 5.1 so searching for guides on inheritance in that should cover what you need. Inheritance in the Daz objects is shown in the Object index section of the docs.
This thead has some useful links:
https://www.daz3d.com/forums/discussion/231026/simple-explanation-for-a-c-developer-classes-inheritance
I know that inheritance used to work a few years ago. so it should work now. I tweaked MCasual's DAZ to Blender script. I extended one of his classes and modified some methods. I may have that on a backup somewhere.
Many thanks for all your responses. @Praxis, your thread helped clarifying a lot of my questions. I got the inheritance chain working, but could not do as I intended to do (subclassing Dz.....) .
Since I am a C++/Java developer DzScript is a bit of a culture clash and because I still need to work for a living there is not much spare time for experimenting. Nevertheless I think I have a basic idea now how to move forward.
In order to derive from a Dz* object you need to work in the SDK, then you can make the result available to script.