// --- 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(); newSpeckle->mapValid.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 M3Mat::Clone(RemapDir &remap) { M3Mat *mtl = new M3Mat(FALSE); *((MtlBase*)mtl) = *((MtlBase*)this); int i; for(i=0;i<101;i++) { if (mTex[i]) mtl->ReplaceReference(i,remap.CloneRef(mTex[i])); } for (i=0; i<100; i++) mtl->mapOn[i] = mapOn[i]; //mtl->morphp = morphp; mtl->ReplaceReference(101,remap.CloneRef(pblockMat)); mtl->ReplaceReference(102,remap.CloneRef(morphp)); MorphR3 *mp = (MorphR3 *) mtl->GetReference(102); if(mp) mp->morphmaterial = mtl; mtl->obName = obName; BaseClone(this, mtl, remap); return (RefTargetHandle)mtl; }
RefTargetHandle FExtrudeMod::Clone(RemapDir& remap) { FExtrudeMod *mod = new FExtrudeMod(); mod->ReplaceReference(kFEX_PBLOCK_REF,remap.CloneRef(mp_pblock)); mod->ReplaceReference(kFEX_POINT_REF,remap.CloneRef(mp_base)); BaseClone(this, mod, remap); return mod; }
// --- Methods inherited from ReferenceTarget --- // This method is called to have the plug-in clone itself. RefTargetHandle Water::Clone(RemapDir &remap) { // Create a new instance of the plug-in class Water *newWater = new Water(); // Copy superclass stuff *((MtlBase *)newWater) = *((MtlBase *)this); // Clone the items we reference newWater->ReplaceReference(0, remap.CloneRef(xyzGen)); newWater->ReplaceReference(1, remap.CloneRef(pblock)); newWater->col[0] = col[0]; newWater->col[1] = col[1]; newWater->count = count; newWater->size = size; newWater->minperiod = minperiod; newWater->maxperiod = maxperiod; newWater->amp = amp; newWater->phase = phase; newWater->type = type; newWater->randSeed = randSeed; newWater->texValidity.SetEmpty(); for (int i = 0; i < NUM_SUB_TEXMAPS; i++) { newWater->subTex[i] = NULL; newWater->mapOn[i] = mapOn[i]; if (subTex[i]) newWater->ReplaceReference(i+2, remap.CloneRef(subTex[i])); } BaseClone(this, newWater, remap); // Return the new cloned texture return (RefTargetHandle)newWater; }
void plPassMtl::ICloneRefs( plPassMtlBase *target, RemapDir &remap ) { target->ReplaceReference(kRefBasic, remap.CloneRef(fBasicPB)); target->ReplaceReference(kRefAdv, remap.CloneRef(fAdvPB)); target->ReplaceReference(kRefLayers, remap.CloneRef(fLayersPB)); target->ReplaceReference(kRefAnim, remap.CloneRef(fAnimPB)); }
//+--------------------------------------------------------------------------+ //| From ReferenceMaker | //+--------------------------------------------------------------------------+ RefTargetHandle PFOperatorForceSpaceWarp::Clone(RemapDir &remap) { PFOperatorForceSpaceWarp* newOp = new PFOperatorForceSpaceWarp(); newOp->ReplaceReference(0, remap.CloneRef(pblock())); newOp->ReplaceReference(1, remap.CloneRef(scriptPBlock())); BaseClone(this, newOp, remap); return newOp; }
RefTargetHandle MonoFlector::Clone(RemapDir& remap) { MonoFlector* newob = new MonoFlector(); if (pblock2) newob->ReplaceReference(pbType_subani,remap.CloneRef(pblock2)); if (pbComplex) newob->ReplaceReference(pbComplex_subani,remap.CloneRef(pbComplex)); BaseClone(this, newob, remap); return newob; }
//From ReferenceTarget RefTargetHandle plStaticEnvLayer::Clone(RemapDir &remap) { plStaticEnvLayer *mnew = new plStaticEnvLayer(); *((MtlBase*)mnew) = *((MtlBase*)this); // copy superclass stuff mnew->ReplaceReference(kRefBitmap, remap.CloneRef(fBitmapPB)); mnew->ReplaceReference(kRefUVGen, remap.CloneRef(fUVGen)); BaseClone(this, mnew, remap); return (RefTargetHandle)mnew; }
RefTargetHandle HLSLShaderMaterial::Clone(RemapDir &remap) { HLSLShaderMaterial *mnew = new HLSLShaderMaterial(FALSE); *((MtlBase*)mnew) = *((MtlBase*)this); mnew->ReplaceReference(HLSLShaderMaterial::k_RefParam,remap.CloneRef(m_pblock)); ReferenceTarget * targ = GetReference(k_RefPhen); mnew->ReplaceReference(k_RefPhen,remap.CloneRef(targ)); BaseClone(this, mnew, remap); return (RefTargetHandle)mnew; }
RefTargetHandle CellTex::Clone(RemapDir &remap) { CellTex *map = new CellTex; *((MtlBase*)map) = *((MtlBase*)this); // copy superclass stuff map->ReplaceReference(0,remap.CloneRef(pblock)); map->ReplaceReference(1,remap.CloneRef(xyzGen)); map->ReplaceReference(2,remap.CloneRef(texout)); for (int i=0; i<NSUBTEX; i++) { if (subTex[i]) map->ReplaceReference(3+i,remap.CloneRef(subTex[i])); } BaseClone(this, map, remap); return map; }
RefTargetHandle Texmaps::Clone(RemapDir &remap) { Texmaps *tm = new Texmaps(NULL); for (int i = 0; i<STD2_NMAX_TEXMAPS; i++) { tm->txmap[i].amount = txmap[i].amount; tm->txmap[i].mapOn = txmap[i].mapOn; tm->txmap[i].map = NULL; if (txmap[i].amtCtrl) tm->ReplaceReference(2*i,remap.CloneRef(txmap[i].amtCtrl)); if (txmap[i].map) tm->ReplaceReference(2*i+1,remap.CloneRef(txmap[i].map)); } BaseClone(this, tm, remap); return tm; }
RefTargetHandle Output::Clone(RemapDir &remap) { Output *mnew = new Output(); *((MtlBase*)mnew) = *((MtlBase*)this); // copy superclass stuff mnew->ReplaceReference(1,remap.CloneRef(texout)); mnew->ivalid.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]; } BaseClone(this, mnew, remap); return (RefTargetHandle)mnew; }
RefTargetHandle StressTexmap::Clone(RemapDir &remap) { StressTexmap *mnew = new StressTexmap(); *((MtlBase*)mnew) = *((MtlBase*)this); // copy superclass stuff mnew->ReplaceReference(NSUBTEX,remap.CloneRef(pblock)); mnew->ivalid.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]; } return (RefTargetHandle)mnew; }
RefTargetHandle CVDModifier::Clone(RemapDir& remap) { CVDModifier* newmod = new CVDModifier(); newmod->ReplaceReference(0,remap.CloneRef(pblock)); BaseClone(this, newmod, remap); return(newmod); }
RefTargetHandle PasteSkinWeights::Clone(RemapDir& remap) { PasteSkinWeights* newmod = new PasteSkinWeights(); newmod->ReplaceReference(0,remap.CloneRef(pblock)); BaseClone(this, newmod, remap); return(newmod); }
RefTargetHandle PFOperatorSimpleSpeed::Clone(RemapDir &remap) { PFOperatorSimpleSpeed* newOp = new PFOperatorSimpleSpeed(); newOp->ReplaceReference(0, remap.CloneRef(pblock())); BaseClone(this, newOp, remap); return newOp; }
//+--------------------------------------------------------------------------+ //| From ReferenceMaker | //+--------------------------------------------------------------------------+ RefTargetHandle PFTestSplitBySource::Clone(RemapDir &remap) { PFTestSplitBySource* newTest = new PFTestSplitBySource(); newTest->ReplaceReference(0, remap.CloneRef(pblock())); BaseClone(this, newTest, remap); return newTest; }
// --- Methods inherited from ReferenceTarget --- // This method is called to have the plug-in clone itself. RefTargetHandle Planet::Clone(RemapDir &remap) { // Create a new instance of the plug-in class Planet *newPlanet = new Planet(); // Copy superclass stuff *((MtlBase *)newPlanet) = *((MtlBase *)this); // Clone the items we reference newPlanet->ReplaceReference(0, remap.CloneRef(xyzGen)); newPlanet->ReplaceReference(1, remap.CloneRef(pblock)); newPlanet->col[0] = col[0]; newPlanet->col[1] = col[1]; newPlanet->col[2] = col[2]; newPlanet->col[3] = col[3]; newPlanet->col[4] = col[4]; newPlanet->col[5] = col[5]; newPlanet->col[6] = col[6]; newPlanet->col[7] = col[7]; newPlanet->size = size; newPlanet->island = island; newPlanet->percent = percent; newPlanet->seed = seed; newPlanet->texValidity.SetEmpty(); BaseClone(this, newPlanet, remap); // Return the new cloned texture return (RefTargetHandle)newPlanet; }
RefTargetHandle Matte::Clone(RemapDir &remap) { Matte *mtl = new Matte(FALSE); *((MtlBase*)mtl) = *((MtlBase*)this); // copy superclass stuff mtl->ReplaceReference(PB_REF,remap.CloneRef(pblock)); mtl->fogBG = fogBG; mtl->shadowBG = shadowBG; mtl->shadowAlpha = shadowAlpha; mtl->opaque = opaque; mtl->fogObjDepth = fogObjDepth; mtl->useReflMap = useReflMap; if (reflmap) mtl->ReplaceReference(REFLMAP_REF,remap.CloneRef(reflmap)); BaseClone(this, mtl, remap); return mtl; }
RefTargetHandle NormalMod::Clone(RemapDir& remap) { NormalMod* newmod = new NormalMod(); newmod->ReplaceReference(0,remap.CloneRef(pblock)); BaseClone(this, newmod, remap); return newmod; }
RefTargetHandle PFOperatorComments::Clone(RemapDir &remap) { PFOperatorComments* newOp = new PFOperatorComments(); newOp->ReplaceReference(0, remap.CloneRef(pblock())); BaseClone(this, newOp, remap); return newOp; }
RefTargetHandle TriPatchObject::Clone(RemapDir& remap) { TriPatchObject* newob = new TriPatchObject(); newob->ReplaceReference(0,remap.CloneRef(pblock)); newob->ivalid.SetEmpty(); BaseClone(this, newob, remap); return(newob); }
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; }
// --- Interhited virtual methods of ReferenceTarget // This method makes a new BendMod and copies the state of this modifier // to the new modifier. // This method is called when the user makes a copy of // an object in the scene or when they press the make unique // button in the modfier stack rollup page. RefTargetHandle BendMod::Clone(RemapDir& remap) { BendMod* newmod = new BendMod(); newmod->ReplaceReference(SIMPMOD_PBLOCKREF,remap.CloneRef(pblock2)); newmod->SimpleModClone(this, remap); BaseClone(this, newmod, remap); return(newmod); }
RefTargetHandle RelaxMod::Clone(RemapDir& remap) { RelaxMod* newmod = new RelaxMod(); newmod->ReplaceReference(0,remap.CloneRef(pblock)); newmod->version = version; BaseClone(this, newmod, remap); return(newmod); }
RefTargetHandle SolidifyPW::Clone(RemapDir& remap) { SolidifyPW* newmod = new SolidifyPW(); newmod->ReplaceReference(PBLOCK_REF,remap.CloneRef(pblock)); BaseClone(this, newmod, remap); return(newmod); }
RefTargetHandle SmoothMod::Clone(RemapDir& remap) { SmoothMod* newmod = new SmoothMod(); newmod->ReplaceReference (REF_SMOOTH_PBLOCK, remap.CloneRef(pblock)); newmod->version = version; BaseClone(this, newmod, remap); return newmod; }
RefTargetHandle PatchDeformPW::Clone(RemapDir& remap) { PatchDeformPW* newmod = new PatchDeformPW(); newmod->ReplaceReference(PBLOCK_REF,remap.CloneRef(pblock)); BaseClone(this, newmod, remap); return(newmod); }
RefTargetHandle bhkRigidBodyModifier::Clone(RemapDir& remap) { bhkRigidBodyModifier *mod = new bhkRigidBodyModifier(); mod->ReplaceReference(0,remap.CloneRef(GetReference(0))); mod->ReplaceReference(1,remap.CloneRef(GetReference(1))); BaseClone(this, mod, remap); return mod; }
RefTargetHandle BerconTile::Clone(RemapDir &remap) { BerconTile *mnew = new BerconTile(); *((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(PBMAP_REF,remap.CloneRef(pbMap)); mnew->ivalid.SetEmpty(); for (int i = 0; i<TILE_NSUBTEX; i++) { mnew->subtex[i] = NULL; if (subtex[i]) mnew->ReplaceReference(i+2,remap.CloneRef(subtex[i])); } BaseClone(this, mnew, remap); return (RefTargetHandle)mnew; }