Missing classes in DazScript?

shoei321shoei321 Posts: 106

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?



  • mjc1016mjc1016 Posts: 15,001
    edited December 1969

    I believe those items, particularly DzPolyMesh have been deprecated/removed/renamed...are you sure you are referring to the 4.5 docs?

  • shoei321shoei321 Posts: 106
    edited December 1969

    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.


  • Richard HaseltineRichard Haseltine Posts: 43,379
    edited December 1969

    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.

  • PeriastronPeriastron Posts: 35
    edited December 1969

    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:

    Script Error: Line 101
    TypeError: cannot call getUri(): unknown return type `DzUri' (register the type with qScriptRegisterMetaType())

    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.

Sign In or Register to comment.