Daz Script to hide specific parts of geometry on figures

I'm exporting my Daz characters for use in game engines.

I'd like to be able to create a script that allows me to delete certain parts of the model. This would include the cornea and pupil.

How would I go about querying for this in Daz Script? I've got a long history of programming professionally so don't worry about scaring me with code. Really anything you have would be marvellous.

Hope anyone can point me in the right direction.

Thanks,
James

Comments

  • algovincianalgovincian Posts: 2,664

    I'm also interested in doing some more scripting that includes editing/adding to the currently selected geometry, but am having trouble finding documentation. So, first of all, here's a couple of links to what I believe is the most up-to-date/complete info (if somebody knows differently, please chime in):

    Scripting API Object Refence:

    http://docs.daz3d.com/doku.php/public/software/dazstudio/4/referenceguide/scripting/api_reference/object_index/start

    Samples:

    http://docs.daz3d.com/doku.php/public/software/dazstudio/4/referenceguide/scripting/api_reference/samples/start

    That being said, I don't see the expected references to DzGeometry, DzVertexMesh, DzPolyMesh, etc. Anybody know if these classes been replaced with something new which is yet to be documented?

    Some of this was included in some much older documentation which I downloaded years ago (I believe the scripting reference was included as part of the plugin API IIRC).

    I do see some references to DzFacet, which references facetmesh_dz, which is undocumented. Also, may be worth checking out the docs for DzObject:

    http://docs.daz3d.com/doku.php/public/software/dazstudio/4/referenceguide/scripting/api_reference/object_index/object_dz

    I'll post back here if I find anything else out - please do the same.

    - Greg

     

     

  • FistyFisty Posts: 3,416

    I don't know how familiar you are with the more hidden aspects of DS, but there are fairly easy ways to do it without having to write a script.  For body parts that actually have their own bones like abdomen, thighs, etc, you can click the eye in the scene tab and when you export as obj it'll have an option to not export hidden geometry.  (at least with .obj, not 100% sure on .fbx)  You can save a properties preset to hide and show bones like that if you need to do it a bunch of times (I just saved some for myself for the hands for dforce sims).  For cornea and pupil since they don't have their own bones you make geometry editor tool active, go to tools tab, check plus by those two surfaces to select, then right click in the viewport and hide selected geometry, then right click again and delete hidden.  Very easy, and pretty quick, though I can understand if you need to do a whole pile of characters that it would be better to have a script.

Sign In or Register to comment.