Missing classes in DazScript?
shoei321
Posts: 113
I'm writing DazScript in DS 4.5, latest version as of this writing. I am unable to instantiate a number of classes that are listed in the DazScript documentation.
For example, DzSkeleton, DzPolyMesh, and DzSubDMesh all give me a script error "Can't find variable: ". Are these classes not exposed to the scripting environment, are the docs I'm using wrong, or is there something else going on?
I presume these classes are accessible from within the SDK. What if I wrote a plugin that subclassed the classes in question and then exported them into the scripting environment?
Thanks
Comments
I believe those items, particularly DzPolyMesh have been deprecated/removed/renamed...are you sure you are referring to the 4.5 docs?
Looks like you're right. I couldn't find a set of docs for DazScript in 4.5 so I'm using the ones from DS 3.
Some of those classes still exist in the 4.5 SDK, however it seems their constructors are protected. I'm able to instantiate the needed subclass just fine though.
Thanks
DzSkeleton is a virtual "class" (remember that they aren't officially described as classes in script, but as objects) - in DS4 the real figures you can create are either DzFigure (TriAx) or DzLegacyFigure (Poser figure). Those inherit DzSkeleton, but you can't create a plain DzSkeleton as such. I think the same is true of the other objects you mention - they are containers for derivative objects which you can create, but not creatable items in their own right.
Possibly related to the subject of this thread:
I've been trying to put together a prototype for a small utility. Doing this as a script seemed like the easiest way to try different things and get something running quickly; however, I've hit a snag. While trying to retrieve the URI associated with a DzFacetMesh object, I received the following error message:
As far as I can tell, the type hasn't been registered with the scripting engine. Is this an isolated bug, or are there known holes in the 4.5 script API that aren't being actively supported? Thanks.