Set values in DzWeightMap in DazScript?

shoei321shoei321 Posts: 113

I'm trying to create a figure with a skeleton and a series of bones from DazScript. I am able to create the skeleton and the geometry without issue, and am now trying to bind parts of the geometry to each bone. Reading through the API it appears that I need do this with DzBoneBinding objects. DzBoneBinding carries a DzWeightMap, which I think is how you specify which vertices are influenced by the bone and at what strength. Is this process correct?

Assuming it is, here's the problem I'm running in to : I can create a DzWeightMap object but from DzScript there doesn't seem to be any way to set values within it. The DS 4.5 SDK docs show a setWeight() method, but the same method isn't there in DazScript. Any thoughts on how to get around this?

Thanks

Comments

  • shoei321shoei321 Posts: 113
    edited December 1969

    I ended up working around this problem by writing a plugin that subclasses DzWeightMap and exposes the setWeight() method, then exports the subclass to make it available to the scripting environment.

    Presumably DzWeightMap.setWeight(int, short) is either private or protected in the DazScript environment. Without being able to set values in a DzWeightMap I wasn't able to see how to bind bones to geometry. It seems to me this was an oversight and should probably
    be addressed in a future release. Without it folks aren't going to be able to create boned/skinned figures from DazScript unless they do my plugin workaround.

    Thanks

Sign In or Register to comment.