[SDK(C++)] The update of the scene object is reset.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello. I'm trying to change the apex of the object.
There is no problem changing the vertices of a typical object.
However, problems arise from objects in the Modifier stack, as shown below.
The problem is that running 'update' through the MaxScript command returns to the original object.
My code is...
void TestSetVertPos(INode* objectNode) const
{
ObjectState os = objectNode->EvalWorldState(0);
Object* obj = os.obj;
PolyObject* poly = (PolyObject*)obj->ConvertToType(0, polyObjectClassID);
MNMesh* mnMesh = &poly->GetMesh();
MNVert* mnVerts = mnMesh->v;
mnVerts[0].p.x = 0;
mnVerts[0].p.y = 0;
mnVerts[0].p.z = 0;
mnMesh->InvalidateGeomCache(); //force geometry update
GetCOREInterface()->ForceCompleteRedraw(true);
}
I am a beginner at SDK. If you could explain it easily, I'd really appreciate it. Please help me.