Changing mesh resolution/subd parameters from Daz Script/SDK

shoei321shoei321 Posts: 113
edited December 1969 in Daz SDK Developer Discussion

I need to set a scene object to Base resolution from a script/SDK plugin and can't seem to find out where to do this.

The Resolution Level property under the object (named lodLevel) doesn't show when I look through the list of properties on the node, and its also not listed as any of the modifiers on the node's object.

The only lead I've found is a snippet in the SDK docs referencing the classes DzSubDFigureShape and DzSubDPropShape, but these aren't documented anywhere I can find.


Thanks

Comments

  • Richard HaseltineRichard Haseltine Posts: 100,778
    edited December 1969

    You may need to get the geometry for the node (remember that for a figure that goes with the root) with getGeometry(), or even the shape for the geometry.

  • shoei321shoei321 Posts: 113
    edited December 1969

    That's what I suspected, but I see nothing for this under DzGeometry or any of its subclasses (DzVertexMesh, DzFacetMesh).

    In the SDK docs under DzFacetMesh::subdivideCatmullClark() this is mentioned :

    If you want to change the subdivision level of an item in the viewport or at render time, use the subdivision level controls - see DzSubDPropShape::getInteractiveLevelControl(), DzSubDPropShape::getRenderLevelControl, DzSubDFigureShape::getInteractiveLevelControl() and DzSubDFigureShape::getRenderLevelControl.

    These controls seem to be exactly what I need, but the classes aren't documented in the SDK docs and I can't find them in the SDK either.

    Thanks

  • shoei321shoei321 Posts: 113
    edited December 1969

    I eventually figured this out. The Subdivision properties for Mesh Resolution, Subdivision Level, etc are actually on the node's shape object, and not on the node or the node's DzObject.

    Calling node->getObject()->getCurrentShape()->findProperty(propName) will return the properties in question.

Sign In or Register to comment.