Daz SDK vs Daz Script method availability
ainm.sloinneadh
Posts: 416
Are the SDK and the scripting language divergent on the class functions they expose? I've found functions in the SDK that are clearly labelled as less efficient and only there for scripting use, but I recently came across a class function that's missing from the SDK header but is documented as available in Daz Script.
Class function in question is DZERCLink DzERCLink::duplicate(DzNumericProperty): http://docs.daz3d.com/doku.php/public/software/dazstudio/4/referenceguide/scripting/api_reference/object_index/erclink_dz#a_1aaae65b8fc56adb5b1d67c95edb1e5402
I'd really like to explore that class function in the SDK but it's missing from the DzERCLink header
Comments
There is some divergence, but they remain very similar. The main issue is that the SDK was frozen with DS 4.5. You can access C++ methods added after the freeze, but they are not documented and no header files are available. You can call them by using QMetaObject::invokeMethod.
For a simple example of using invokeMethod, look at this commit where I call dzApp->getAppDataInstancePath() which was added after the SDK was frozen, but fallback to the value of dzApp->getAppDataPath() if the method is not available.
You can check which methods exist by doing something like this
Excellent - thank you so much for sharing this! Excited to try it out this evening
Some are in the scripting docs, though you would still have to work out the types of the variables to an extent.
You can see some examples of this in https://github.com/daz3d/StudioFbxImporter