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

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

Anonymous
Not applicable
431 Views
1 Reply
Message 1 of 2

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

Anonymous
Not applicable

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.

 

 

0 Likes
432 Views
1 Reply
Reply (1)
Message 2 of 2

Anonymous
Not applicable

sorry, The image has not been loaded.

 

이미지 6.png

 

 

This image is the Modifier stack

0 Likes