Notifications
Clear all

[Closed] SDK Weld Threshold

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

Never mind, found it out

Why don’t you post the solution then? Others might look for the same later on

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

does it really make sense for you? in my opinion it shouldn’t be a part of “weld” mechanics

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.