How to Geometry Select By Face Groups in script?

I want to make a script to auto select Face Groups(by bone name), but I'm not sure how to do that in script, is it possible to select the Face Groups in script?

Attach images is how I do manually in Daz.

This pain me for month, any help would be appreciated crying.

1.jpg
1364 x 926 - 393K
2.jpg
1364 x 926 - 292K
3.jpg
1364 x 926 - 351K
4.jpg
1364 x 926 - 294K

Comments

  • CES3DCES3D Posts: 134

    For example, this is the script for selecting the "head" Face Group of Genesis 9.

    var oNode = Scene.findNode( "Genesis9" );var oMesh = oNode.getObject().getCurrentShape().getGeometry();var oFaceGroup = oMesh.findFaceGroup( "head" );oMesh.deselectAllFacets();oMesh.selectFacets( oFaceGroup );
  • Michal P.Michal P. Posts: 92

    NamelessxPeasant said:

    I want to make a script to auto select Face Groups(by bone name), but I'm not sure how to do that in script, is it possible to select the Face Groups in script?

    Attach images is how I do manually in Daz.

    This pain me for month, any help would be appreciated crying.

    Do you know how to do Weight Editing/Fill Selected using script? 

  • algovincianalgovincian Posts: 2,636

    Michal P. said:

    NamelessxPeasant said:

    I want to make a script to auto select Face Groups(by bone name), but I'm not sure how to do that in script, is it possible to select the Face Groups in script?

    Attach images is how I do manually in Daz.

    This pain me for month, any help would be appreciated crying.

    Do you know how to do Weight Editing/Fill Selected using script? 

    Wouldn't you need to have verts selected?

    Anyway, I'm on my phone atm so I can't test, but once you have verts selected, you could trigger the fill action. Have a look at the following example (it can be simplified):

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

    I think you could trigger the action using the following class:

    DzWeightMapBrushFillAction

    HTH.

    - Greg

Sign In or Register to comment.