Plugin SDK: Adding Material / Surface groups crash
Cross22
Posts: 66
Here is a question for you SDK developers out there. If the user has selected some polygons and I have a pointer to the mesh, I can create a new face group like so:
mesh->beginEdit();
mesh->createFaceGroup( "NewGroupName" );
mesh->addSelectedFacetsToGroup( "NewGroupName" );
mesh->finishEdit();
Easy-peasy. Now if I try the same approach to create a new material/Surface group then all I get is a crash inside Daz:
mesh->beginEdit();
int newGroupNum= mesh->createMaterialGroup( "NewGroupName" );
mesh->addSelectedFacetsToMaterialGroup( newGroupNum );
mesh->finishEdit();
Any thoughts on how to fix this?
Post edited by Cross22 on
Comments
Moved to the SDK forum.
Tried to file a bug report for this, but it's blocked by "Tech Support" trying to find out how to reproduce this with "Visual Basic"...
DAZ really needs a way to reach the dev team directly or at least file a bug report.
I'm getting a similar crash using DzShape
As I understand it, in Daz Studio not all nodes have geometry, so you must check if shape have geom.
In my code i do like this:
Thanks LpProject that worked great
C++:
Script:
-Rob
(sorry, been a little busy)