Hi everyone,
I’m building a Character Creator 5 Python/OpenPlugin export tool for a Maya rigging pipeline, and I’m trying to automate LOD exports from a CC5 character.
For the character body, subdivision switching works through the Python API:
avatar.SwitchSubdivMeshLevel(level)
avatar.SetRenderSubdivMeshLevel(level)
However, clothing, hair, and accessories seem to have their own Smooth Mesh settings in the Modify panel:
- Smooth Mesh enabled
- Level for Real Time / Preview
- Level for Final Render
I haven’t found a Python API method to set these values on RICloth, RIHair, or RIAccessory. They do not appear to expose methods equivalent to SwitchSubdivMeshLevel() or SetRenderSubdivMeshLevel().
I also tried RIObject.GetControl() with likely names such as:
SmoothMesh
SmoothMeshPreviewLevel
PreviewSubdivLevel
RenderSubdivLevel
LevelForRealTimePreview
LevelForFinalRender
but those returned None.
What I’m trying to automate is:
- LOD0: body SubD2, clothing/accessories Smooth Mesh level 2
- LOD1: body SubD1, clothing/accessories Smooth Mesh level 1
- LOD2: body SubD0, clothing/accessories Smooth Mesh level 0
I’m also looking for the correct Python call/signature for exporting quad-based OBJ files with the Subdivided Mesh option enabled, if that is exposed through:
RLPy.RFileIO.ExportObjFile(...)
Has anyone found a supported way to set clothing/accessory Smooth Mesh levels through Python, or know the internal control names/API calls for those sliders?
Any sample code or pointers would be hugely appreciated.