Digital Art Zone

 
     
Changing mesh resolution/subd parameters from Daz Script/SDK
Posted: 14 July 2013 09:33 PM   [ Ignore ]
Member
Rank
Total Posts:  54
Joined  2010-09-22

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

Profile
 
 
Posted: 15 July 2013 05:36 AM   [ Ignore ]   [ # 1 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  14312
Joined  2003-10-09

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.

 Signature 

DAZ Studio Frequently Asked Questions

Index of free DAZ Studio scripts and plugins list

Profile
 
 
Posted: 15 July 2013 05:55 AM   [ Ignore ]   [ # 2 ]
Member
Rank
Total Posts:  54
Joined  2010-09-22

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

 

Profile
 
 
Posted: 21 July 2013 03:15 PM   [ Ignore ]   [ # 3 ]
Member
Rank
Total Posts:  54
Joined  2010-09-22

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. 

Profile