Quantcast
Channel: Daz Script Developer Discussion - Daz 3D Forums
Viewing all articles
Browse latest Browse all 1036

Get selected faces

$
0
0

I'm trying to get hold of the selected faces, but the documentation on facets seems to be missing a lot of information, and so everything I've found has either been from the SDK documentation, or from just tapping around (for the last 6 hours) until something works. 

The only process that seems to work is to first add selected faces to a new face group, and then select them from there.

To do that (for anyone wanting to know how to do this in the future) I selected the current node, the shape and then the geometry. From there I use

oGeometry.createFaceGroup("GroupName");
oGeometry.addSelectedFacetsToGroup("GroupName");
var oFaceGroup= oGeometry.findFaceGroup("GroupName");

You can then use oFaceGroup.count and oFaceGroup.getIndex()

But this seems like a seriously round about way of doing things, and I suspect it can mess up your current face groups (I don't know how much of a problem that is because I've never used them, but I suspect it could be) Does anyone have an easier solution for getting hold of the currently selected faces? 

 

 


Viewing all articles
Browse latest Browse all 1036

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>