Example #1
0
void EditPolyMod::RevertPaintDeform( MeshPaintHost* host,BitArray *invalidVerts ) {
	EditPolyData* modData = static_cast<EditPolyData*>(host);

	// Make sure we're set to the right operation:
	//EpModSetOperation (ep_op_paint_deform);
	//modData->SetPolyOpData (ep_op_paint_deform);

	if (modData->GetPolyOpData() == NULL) return;
	if (modData->GetPolyOpData()->OpID() != ep_op_paint_deform) return;
	LocalPaintDeformData *pDeform = (LocalPaintDeformData *) modData->GetPolyOpData();
	pDeform->ClearVertices ();

	EpModLocalDataChanged (PART_DISPLAY);
}
Example #2
0
void EditPolyMod::ApplyPaintDeform( MeshPaintHost* host ,BitArray *invalidVerts) {
	EditPolyData* modData = static_cast<EditPolyData*>(host);

	// Make sure we're set to the right operation:
	EpModSetOperation (ep_op_paint_deform);
	modData->SetPolyOpData (ep_op_paint_deform);

	LocalPaintDeformData *pDeform = (LocalPaintDeformData *) modData->GetPolyOpData();
	pDeform->SetOffsets (host->GetPaintDeformCount(), host->GetPaintDeformOffsets(), modData->GetMesh());

	EpModLocalDataChanged (PART_DISPLAY);
}