예제 #1
0
LocalModData *EditPolyData::Clone() {
	EditPolyData *d = new EditPolyData;
	d->mVertSel = mVertSel;
	d->mFaceSel = mFaceSel;
	d->mEdgeSel = mEdgeSel;
	d->mVertHide = mVertHide;
	d->mFaceHide = mFaceHide;

	// Copy the Operation linked list:
	PolyOperationRecord *clone=NULL;
	for (PolyOperationRecord *pop = mpOpList; pop != NULL; pop = pop->Next())
	{
		if (clone == NULL) {
			clone = pop->Clone ();
			d->mpOpList = clone;
		} else {
			clone->SetNext (pop->Clone ());
			clone = clone->Next ();
		}
	}

	// Copy any current operation data:
	if (mpPolyOpData != NULL) {
		d->SetPolyOpData (mpPolyOpData->Clone());
	}

	return d;
}
예제 #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);
}
예제 #3
0
	void Redo () { mpData->SetPolyOpData (mOpID); }