Notifications
Clear all
[Closed] SDK Weld Threshold
Aug 26, 2015 5:42 pm
Hi, I am using EPoly to weld my verts together, but I need to be able to change the Weld Threshold from my own spinner instead of changing it mannually. Any idea’s how ? Thanks
5 Replies
Aug 26, 2015 5:42 pm
Why don’t you post the solution then? Others might look for the same later on
Aug 26, 2015 5:42 pm
Sorry, I just didn’t have time to post it up yesterday ^^ The code is below:
PolyObject* firstobj = PolyObjectFromNode(node, t);
node->SetObjectRef(firstobj);
MNMesh mesh = firstobj->GetMesh();
EPoly *cd= (EPoly *)(firstobj->GetInterface(EPOLY_INTERFACE));
cd->getParamBlock()->SetValue(ep_weld_threshold, t, WeldThreshold->GetFVal());
BitArray Verts(mesh.numv);
Verts.SetAll();
cd->EpSetVertexFlags(Verts, MN_TARG, FALSE);
cd->EpfnWeldFlaggedVerts(MN_TARG);
This is the EPoly version, although, other versions should be quite similar
Aug 26, 2015 5:42 pm
does it really make sense for you? in my opinion it shouldn’t be a part of “weld” mechanics
Aug 26, 2015 5:42 pm
you have to make a decisions what level you want to work on…
my guess that is expected be on just an editable poly level.