Example #1
0
RefTargetHandle Mask::Clone(RemapDir &remap) {
	Mask *mnew = new Mask();
	*((MtlBase*)mnew) = *((MtlBase*)this);  // copy superclass stuff
	mnew->ReplaceReference(2,remap.CloneRef(pblock));
	mnew->ivalid.SetEmpty();	
	mnew->mapValid.SetEmpty();
	for (int i = 0; i<NSUBTEX; i++) {
		mnew->subTex[i] = NULL;
		if (subTex[i])
			mnew->ReplaceReference(i,remap.CloneRef(subTex[i]));
		mnew->mapOn[i] = mapOn[i];
		mnew->invertMask = invertMask;
		}
	BaseClone(this, mnew, remap);
	return (RefTargetHandle)mnew;
	}