void Noise::Init() { if (xyzGen) xyzGen->Reset(); else ReplaceReference( XYZGEN_REF, GetNewDefaultXYZGen()); if (texout) texout->Reset(); else ReplaceReference( TEXOUT_REF, GetNewDefaultTextureOutput()); ivalid.SetEmpty(); cacheValid.SetEmpty(); macroRecorder->Disable(); // disable macrorecorder during reset SetColor(0, Color(0.0f,0.0f,0.0f), TimeValue(0)); SetColor(1, Color(1.0f,1.0f,1.0f), TimeValue(0)); noiseType = NOISE_REGULAR; #ifndef RENDER_VER RegisterDistanceDefault(_T("Noise Params"), _T("Size"), DEFAULT_NOISE_SIZE, IN_TO_M(DEFAULT_NOISE_SIZE)); float size = GetDistanceDefault(_T("Noise Params"), _T("Size")); SetSize(size, TimeValue(0)); #else SetSize(DEFAULT_NOISE_SIZE, TimeValue(0)); #endif SetPhase(.0f,TimeValue(0)); SetLevels(3.0f,TimeValue(0)); pblock->SetValue(noise_hithresh,0,1.0f); macroRecorder->Enable(); for (int i=0; i<NSUBTEX; i++) mapOn[i] = 1; }
void Output::Init() { ivalid.SetEmpty(); if (texout) texout->Reset(); else ReplaceReference( 1, GetNewDefaultTextureOutput()); texout->SetRollupOpen(1); mapOn[0] = 1; }
void CellTex::Init() { if (xyzGen) xyzGen->Reset(); else ReplaceReference(1, GetNewDefaultXYZGen()); if (texout) texout->Reset(); else ReplaceReference(2, GetNewDefaultTextureOutput()); RegisterDistanceDefault(_T("Cellular Params"), _T("Size"), 5.0f, IN_TO_M(5.0f)); float size = GetDistanceDefault(_T("Cellular Params"), _T("Size")); pblock->SetValue(cellular_size,0,size); /* pblock->SetValue(PB_CELLCOL,0,Point3(1,1,1)); pblock->SetValue(PB_DIVCOL1,0,Point3(.5f,.5f,.5f)); pblock->SetValue(PB_DIVCOL2,0,Point3(0,0,0)); pblock->SetValue(PB_SIZE,0,5.0f); pblock->SetValue(PB_SPREAD,0,0.5f); pblock->SetValue(PB_LOW,0,0.0f); pblock->SetValue(PB_MID,0,0.5f); pblock->SetValue(PB_HIGH,0,1.0f); pblock->SetValue(PB_FRACT,0,0); pblock->SetValue(PB_ITER,0,3.0f); pblock->SetValue(PB_USECELLMAP,0,1); pblock->SetValue(PB_USEDIV1MAP,0,1); pblock->SetValue(PB_USEDIV2MAP,0,1); pblock->SetValue(PB_SMOOTH,0,0.1f); pblock->SetValue(PB_ADAPT,0,1); if (paramDlg) paramDlg->pmap->SetParamBlock(pblock); */ fract = 0; ivalid.SetEmpty(); }
void Gradient::Init() { if (uvGen) uvGen->Reset(); else ReplaceReference( UVGEN_REF, GetNewDefaultUVGen()); if (texout) texout->Reset(); else ReplaceReference( TEXOUT_REF, GetNewDefaultTextureOutput()); ivalid.SetEmpty(); }