Exemple #1
0
RefTargetHandle Plate::Clone(RemapDir &remap) {
	Plate *mnew = new Plate();
	*((MtlBase*)mnew) = *((MtlBase*)this);  // copy superclass stuff
	mnew->ReplaceReference(0,remap.CloneRef(pblock));
	mnew->do_nth = do_nth;
	mnew->applyBlur = applyBlur;
	mnew->ivalid.SetEmpty();	
	BaseClone(this, mnew, remap);
	return (RefTargetHandle)mnew;
	}
RefTargetHandle FloatLimitCtrl::Clone(RemapDir& remap)
{
	// Make a new float limit controller and give it our param values.
	FloatLimitCtrl *newCtrl = new FloatLimitCtrl;

	if (newCtrl) {
		// Clone limited controller
		newCtrl->ReplaceReference(BASELIMIT_LIMITEDCTRL_REF, 
			remap.CloneRef(GetLimitedControl()));

		// Clone parameter blocks
		newCtrl->ReplaceReference(BASELIMIT_PBLOCK_REF, remap.CloneRef(m_pblock));
		newCtrl->ReplaceReference(FLOATLIMIT_PBLOCK_REF, remap.CloneRef(m_pfloatBlock));
		newCtrl->mLocked = mLocked;
		CloneControl(newCtrl, remap);
		BaseClone(this, newCtrl, remap);
	}
	return newCtrl;
}
Exemple #3
0
RefTargetHandle TapeHelpObject::Clone(RemapDir& remap)
{
    TapeHelpObject* newob = new TapeHelpObject();
    newob->ReplaceReference(0,remap.CloneRef(pblock));
    newob->specLenState = specLenState;
    newob->ivalid.SetEmpty();
    newob->enable = enable;
    BaseClone(this, newob, remap);
    return(newob);
}
Exemple #4
0
RefTargetHandle Gradient::Clone(RemapDir &remap) 
	{
	Gradient *mnew = new Gradient();
	*((MtlBase*)mnew) = *((MtlBase*)this);  // copy superclass stuff
	mnew->ReplaceReference(0,remap.CloneRef(uvGen));
	mnew->ReplaceReference(TEXOUT_REF,remap.CloneRef(texout));
	mnew->ReplaceReference(1,remap.CloneRef(pblock));
	mnew->col[0] = col[0];
	mnew->col[1] = col[1];
	mnew->col[2] = col[2];	
	mnew->ivalid.SetEmpty();	
	for (int i = 0; i<NSUBTEX; i++) {
		mnew->subTex[i] = NULL;
		if (subTex[i])
			mnew->ReplaceReference(i+2,remap.CloneRef(subTex[i]));
		mnew->mapOn[i] = mapOn[i];
		}
	BaseClone(this, mnew, remap);
	return (RefTargetHandle)mnew;
	}
Exemple #5
0
RefTargetHandle plCompositeMtl::Clone(RemapDir &remap)
{
    plCompositeMtl *mnew = new plCompositeMtl(FALSE);
    *((MtlBase*)mnew) = *((MtlBase*)this); 
    mnew->ReplaceReference(kRefPasses, remap.CloneRef(fPassesPB));

    mnew->fIValid.SetEmpty();   
    BaseClone(this, mnew, remap);

    return (RefTargetHandle)mnew;
}
Exemple #6
0
RefTargetHandle StraussShader::Clone( RemapDir &remap )
{
   StraussShader* mnew = new StraussShader();
   mnew->ExposureMaterialControl::operator=(*this);
   mnew->ReplaceReference(0, remap.CloneRef(pblock));
   mnew->ivalid.SetEmpty();   
   mnew->diffuse = diffuse;
   mnew->glossiness = glossiness;
   mnew->metalness = metalness;
   BaseClone(this, mnew, remap);
   return (RefTargetHandle)mnew;
}
Exemple #7
0
RefTargetHandle
ProxSensorObject::Clone(RemapDir& remap)
{
    ProxSensorObject* ts = new ProxSensorObject();
    ts->ReplaceReference(0, remap.CloneRef(pblock));
    ts->objects.SetCount(objects.Count());
    for(int i = 0; i < objects.Count(); i++)
        ts->ReplaceReference(i+1, objects[i]->node);
    
	BaseClone(this, ts, remap);
    return ts;
}
Exemple #8
0
RefTargetHandle Noise::Clone(RemapDir &remap) {
	Noise *mnew = new Noise();
	*((MtlBase*)mnew) = *((MtlBase*)this);  // copy superclass stuff
	mnew->ReplaceReference(XYZGEN_REF,remap.CloneRef(xyzGen));
	mnew->ReplaceReference(TEXOUT_REF,remap.CloneRef(texout));
	mnew->ReplaceReference(PBLOCK_REF,remap.CloneRef(pblock));
	mnew->col[0] = col[0];
	mnew->col[1] = col[1];
	mnew->noiseType = noiseType;
	mnew->size = size;
	mnew->avgValue = avgValue;
	mnew->ivalid.SetEmpty();	
	mnew->cacheValid.SetEmpty();
	for (int i = 0; i<NSUBTEX; i++) {
		mnew->subTex[i] = NULL;
		if (subTex[i])
			mnew->ReplaceReference(i+2,remap.CloneRef(subTex[i]));
		mnew->mapOn[i] = mapOn[i];
		}
	BaseClone(this, mnew, remap);
	return (RefTargetHandle)mnew;
	}
Exemple #9
0
RefTargetHandle Composite::Clone(RemapDir &remap) 
	{
	Composite *mnew = new Composite();
	*((MtlBase*)mnew) = *((MtlBase*)this);  // copy superclass stuff	
	mnew->ivalid.SetEmpty();	
	mnew->subTex.SetCount(subTex.Count());
	mnew->ReplaceReference(0,remap.CloneRef(pblock));

	mnew->offset = offset;
	mnew->mapOn.SetCount(subTex.Count()); //DS 3/8/99  this seems necessary due to the param block 2 changes.

	for (int i = 0; i<subTex.Count(); i++) {
		mnew->subTex[i] = NULL;
		if (subTex[i]) {
			mnew->ReplaceReference(i+1,remap.CloneRef(subTex[i]));
		//	GetCOREInterface()->AssignNewName(mnew->subTex[i]);
			}
//		mnew->mapOn[i] = mapOn[i];
		}
	BaseClone(this, mnew, remap);
	return (RefTargetHandle)mnew;
	}
Exemple #10
0
RefTargetHandle Wood::Clone(RemapDir &remap) 
{
	Wood *mnew = new Wood();
	*((MtlBase*)mnew) = *((MtlBase*)this);  // copy superclass stuff
	mnew->ReplaceReference(0,remap.CloneRef(xyzGen));
	mnew->ReplaceReference(1,remap.CloneRef(pblock));
	mnew->col[0] = col[0];
	mnew->col[1] = col[1];
	mnew->r1 = r1;
	mnew->r2 = r2;
	mnew->size = size;
//	mnew->seed = seed;
//	mnew->InitNoise();
	mnew->ivalid.SetEmpty();	
	for (int i = 0; i<NSUBTEX; i++) {
		mnew->subTex[i] = NULL;
		if (subTex[i])
			mnew->ReplaceReference(i+2,remap.CloneRef(subTex[i]));
		mnew->mapOn[i] = mapOn[i];
		}
	BaseClone(this, mnew, remap);
	return (RefTargetHandle)mnew;
}
Exemple #11
0
// --- Methods inherited from ReferenceTarget ---
// This method is called to have the plug-in clone itself.
RefTargetHandle Speckle::Clone(RemapDir &remap) {
	// Create a new instance of the plug-in class
	Speckle *newSpeckle = new Speckle();

	// Copy the superclass stuff
	*((MtlBase *)newSpeckle) = *((MtlBase *)this);

	// Clone the items we reference
	newSpeckle->ReplaceReference(0,remap.CloneRef(xyzGen));
	newSpeckle->ReplaceReference(1,remap.CloneRef(pblock));
	newSpeckle->col[0] = col[0];
	newSpeckle->col[1] = col[1];
	newSpeckle->size = size;
	newSpeckle->texValidity.SetEmpty();	
	for (int i = 0; i < NUM_SUB_TEXMAPS; i++) {
		newSpeckle->subTex[i] = NULL;
		newSpeckle->mapOn[i] = mapOn[i];
		if (subTex[i])
			newSpeckle->ReplaceReference(i+2, remap.CloneRef(subTex[i]));
	}
	BaseClone(this, newSpeckle, remap);
	// Return the new cloned texture
	return (RefTargetHandle)newSpeckle;
}
RefTargetHandle mrTwoSidedShader::Clone(RemapDir &remap) {

	mrTwoSidedShader* pNew = new mrTwoSidedShader(true);
    
	int count = NumRefs();
	for(int i = 0; i < count; ++i) {
		ReferenceTarget* refTarg = GetReference(i);
		pNew->ReplaceReference(i, ((refTarg != NULL) ? remap.CloneRef(refTarg) : NULL));
	}

	pNew->MtlBase::operator=(*this);

	BaseClone(this, pNew, remap);

	return pNew;
}
RefTargetHandle OrientConstRotation::Clone(RemapDir& remap)
	{
	OrientConstRotation *p = new OrientConstRotation(TRUE);

    p->ReplaceReference(ORIENT_ROT_PBLOCK_REF, remap.CloneRef(pblock));

	p->flags      = flags;
	p->curRot     = curRot;
	p->baseRotQuatLocal = baseRotQuatLocal;
	p->baseRotQuatWorld = baseRotQuatWorld;
	p->InitialOrientQuat = InitialOrientQuat;
	p->oldTargetNumber = oldTargetNumber;
	p->ivalid.SetEmpty();
	p->mLocked = mLocked;
	BaseClone(this, p, remap);
	return p;
	}
RefTargetHandle mrGeomShaderObject::Clone(RemapDir &remap) {

    mrGeomShaderObject* newObject = new mrGeomShaderObject(true);

    int count = NumRefs();
    for(int i = 0; i < count; ++i) {
        ReferenceTarget* refTarg = GetReference(i);
        newObject->ReplaceReference(i, remap.CloneRef(refTarg));
    }

    newObject->m_box = m_box;
    newObject->m_mesh = m_mesh;
    newObject->m_meshValid = m_meshValid;
    newObject->m_creating = m_creating;

	BaseClone(this, newObject, remap);
    return newObject;
}
Exemple #15
0
RefTargetHandle WardShader::Clone( RemapDir &remap )
{
	WardShader* mnew = new WardShader();
	mnew->ExposureMaterialControl::operator=(*this);
	mnew->ReplaceReference(0, remap.CloneRef(pblock));
	mnew->ivalid.SetEmpty();	
	mnew->ambient = ambient;
	mnew->diffuse = diffuse;
	mnew->specular = specular;
	mnew->glossinessX = glossinessX;
	mnew->glossinessY = glossinessY;
	mnew->specLevel = specLevel;
	mnew->diffLevel = diffLevel;
	mnew->lockDS = lockDS;
	mnew->lockAD = lockAD;
	mnew->lockADTex = lockADTex;
	mnew->normalizeOn = normalizeOn;
	BaseClone(this, mnew, remap);
	return (RefTargetHandle)mnew;
}
Exemple #16
0
RefTargetHandle OrenNayarBlinnShader::Clone( RemapDir &remap )
{
	OrenNayarBlinnShader* mnew = new OrenNayarBlinnShader();
	mnew->ExposureMaterialControl::operator=(*this);
	mnew->ReplaceReference(0,remap.CloneRef(pblock));
	mnew->ivalid.SetEmpty();	
	mnew->ambient = ambient;
	mnew->diffuse = diffuse;
	mnew->specular = specular;
	mnew->glossiness = glossiness;
	mnew->specularLevel = specularLevel;
	mnew->diffLevel = diffLevel;
	mnew->diffRough = diffRough;
	mnew->diffRho = diffRho;
	mnew->softThresh = softThresh;
	mnew->selfIllum = selfIllum;
	mnew->selfIllumClr = selfIllumClr;
	mnew->selfIllumClrOn = selfIllumClrOn;
	mnew->lockDS = lockDS;
	mnew->lockAD = lockAD;
	mnew->lockADTex = lockADTex;
	BaseClone(this, mnew, remap);
	return (RefTargetHandle)mnew;
}
Exemple #17
0
RefTargetHandle BerconNoise::Clone(RemapDir &remap) {
	BerconNoise *mnew = new BerconNoise();
	*((MtlBase*)mnew) = *((MtlBase*)this); // copy superclass stuff
	mnew->ReplaceReference(COORD_REF,remap.CloneRef(pbXYZ));
	mnew->ReplaceReference(OUTPUT_REF,remap.CloneRef(texout));
	mnew->ReplaceReference(PBLOCK_REF,remap.CloneRef(pblock));
	mnew->ReplaceReference(CURVE_REF,remap.CloneRef(curve));
	mnew->ReplaceReference(CURVEPB_REF,remap.CloneRef(pbCurve));
	mnew->ReplaceReference(PBMAP_REF,remap.CloneRef(pbMap));
	mnew->ivalid.SetEmpty();		
	for (int i = 0; i<NOISE_NSUBTEX; i++) {
		mnew->subtex[i] = NULL;
		if (subtex[i])
			mnew->ReplaceReference(i+2,remap.CloneRef(subtex[i]));
		mnew->mapOn[i] = mapOn[i];
		}
	BaseClone(this, mnew, remap);
	return (RefTargetHandle)mnew;
}
Exemple #18
0
RefTargetHandle BerconGradient::Clone(RemapDir &remap) {	
	int keys = countKeys();

	BerconGradient *mnew = new BerconGradient();
	*((MtlBase*)mnew) = *((MtlBase*)this);	

	mnew->pblock->SetCount(pb_submaps, keys);		
	for (int i = 0; i<keys; i++) {		
		mnew->ReplaceReference(i+REF_OFFSET+SUBMAPCOUNT, remap.CloneRef(gradient->getSubtex(i)));
	}

	mnew->ReplaceReference(MAPTEX_REF, remap.CloneRef(p_maptex));
	mnew->ReplaceReference(DISTEX_REF, remap.CloneRef(p_distex));

	mnew->ivalid.SetEmpty();
	mnew->ReplaceReference(PBLOCK_REF,remap.CloneRef(pblock));
	mnew->ReplaceReference(COORD_REF,remap.CloneRef(pbXYZ));
	mnew->ReplaceReference(OUTPUT_REF,remap.CloneRef(texout));	
	mnew->ReplaceReference(CURVE_REF,remap.CloneRef(curve));
	mnew->ReplaceReference(CURVEPB_REF,remap.CloneRef(pbCurve));

	BaseClone(this, mnew, remap);
	return (RefTargetHandle)mnew;
}
Exemple #19
0
		// --- Interhited virtual methods of ReferenceTarget
		RefTargetHandle Clone(RemapDir& remap)
		{
			RefTargetHandle newmod = (new BendWSM((BendMod*)remap.CloneRef(mod)))->SimpleOSMToWSMClone(this,remap);
			BaseClone(this, newmod, remap);
			return newmod;
		}
Exemple #20
0
RefTargetHandle EChamferMod::Clone(RemapDir& remap) {
	EChamferMod *mod = new EChamferMod();
	mod->ReplaceReference(kECH_PBLOCK_REF,remap.CloneRef(m_pblock));
	BaseClone(this, mod, remap);
	return mod;
}
Exemple #21
0
RefTargetHandle SpherifyMod::Clone(RemapDir& remap) {
	SpherifyMod* newmod = new SpherifyMod();	
	newmod->ReplaceReference(0, remap.CloneRef(pblock));
	BaseClone(this, newmod, remap);
	return(newmod);
}
Exemple #22
0
RefTargetHandle ConvertToPoly::Clone(RemapDir& remap) {
	ConvertToPoly *mod = new ConvertToPoly();
	mod->ReplaceReference (0, remap.CloneRef(pblock));
	BaseClone(this, mod, remap);
	return mod;
}
Exemple #23
0
RefTargetHandle BombObject::Clone(RemapDir& remap) {
	BombObject* newob = new BombObject();	
   newob->ReplaceReference(0,remap.CloneRef(pblock));
	BaseClone(this, newob, remap);
	return(newob);
	}
Exemple #24
0
RefTargetHandle VWeldMod::Clone(RemapDir& remap) {
	VWeldMod *mod = new VWeldMod();
	mod->ReplaceReference(kVW_PBLOCK_REF,remap.CloneRef(mp_pblock));
	BaseClone(this, mod, remap);
	return mod;
}
Exemple #25
0
RefTargetHandle PinObject::Clone(RemapDir& remap) 
{	PinObject* newob = new PinObject();
	newob->ReplaceReference(0,remap.CloneRef(pblock));
	BaseClone(this, newob, remap);
	return newob;
}
RefTargetHandle VRayCamera::Clone(RemapDir& remap) {
  VRayCamera *mnew=new VRayCamera();
  BaseClone(this, mnew, remap);
  mnew->ReplaceReference(REFNO_PBLOCK, remap.CloneRef(pblock));
  return (RefTargetHandle) mnew;
}