コード例 #1
0
void CompositeMat::Init()
	{
	ivalid.SetEmpty();
	Mtl *sm1 = NULL;
	Interval iv;
	pblock2->GetValue(compmat_mtls,0,sm1,iv,0);
	if (sm1 == NULL) {
//		pblock2->SetValue(compmat_mtls,0,m,i);
		HoldSuspend hs; // LAM - 6/12/04 - defect 571821
		Mtl* mtl = (Mtl*)GetStdMtl2Desc()->Create();
		hs.Resume();
		pblock2->SetValue(compmat_mtls,0, mtl ,0);
		}
	}
コード例 #2
0
ファイル: mtlmain.cpp プロジェクト: 2asoft/xray
void initClassDescArray(void)
{
#ifdef USE_STDMTL2_AS_STDMTL
		classDescArray[classDescCount++] =  GetStdMtl2Desc();
#else
		classDescArray[classDescCount++] = GetStdMtlDesc();
#endif
		classDescArray[classDescCount++] = GetMultiDesc();

#ifndef NO_MTL_TOPBOTTOM		
		classDescArray[classDescCount++] = GetCMtlDesc();
#endif // NO_MTL_TOPBOTTOM

		classDescArray[classDescCount++] = GetBMTexDesc();
		classDescArray[classDescCount++] = GetMaskDesc();
		
#ifndef NO_MAPTYPE_RGBTINT
		classDescArray[classDescCount++] = GetTintDesc();
#endif // NO_MAPTYPE_RGBTINT

		
		classDescArray[classDescCount++] = GetCheckerDesc();
		classDescArray[classDescCount++] = GetMixDesc();
		classDescArray[classDescCount++] = GetMarbleDesc();
		classDescArray[classDescCount++] = GetNoiseDesc();
		classDescArray[classDescCount++] = GetTexmapsDesc();
		classDescArray[classDescCount++] = GetDoubleSidedDesc();
		classDescArray[classDescCount++] = GetMixMatDesc();

#ifndef NO_MAPTYPE_REFLECTREFRACT
		classDescArray[classDescCount++] = GetACubicDesc();
#endif // NO_MAPTYPE_REFLECTREFRACT

#ifndef NO_MAPTYPE_FLATMIRROR 
		classDescArray[classDescCount++] = GetMirrorDesc();
#endif // NO_MAPTYPE_FLATMIRROR

#ifndef NO_MAPTYPE_GRADIENT		
		classDescArray[classDescCount++] = GetGradientDesc();
#endif // NO_MAPTYPE_GRADIENT


		classDescArray[classDescCount++] = GetCompositeDesc();

#ifndef NO_MTL_MATTESHADOW
		classDescArray[classDescCount++] = GetMatteDesc();
#endif // NO_MTL_MATTESHADOW

#ifndef NO_MAPTYPE_RGBMULT
		classDescArray[classDescCount++] = GetRGBMultDesc();
#endif // NO_MAPTYPE_RGBMULT
		
#ifndef NO_MAPTYPE_OUTPUT
		classDescArray[classDescCount++] = GetOutputDesc();
#endif // NO_MAPTYPE_OUTPUT
		
		classDescArray[classDescCount++] = GetFalloffDesc();

#ifndef	NO_MAPTYPE_VERTCOLOR
		classDescArray[classDescCount++] = GetVColDesc();
#endif // NO_MAPTYPE_VERTCOLOR

#ifndef USE_LIMITED_STDMTL 
		classDescArray[classDescCount++] = GetPhongShaderCD();
		classDescArray[classDescCount++] = GetMetalShaderCD();
#endif
		classDescArray[classDescCount++] = GetBlinnShaderCD();
		classDescArray[classDescCount++] = GetOldBlinnShaderCD();

#ifndef NO_MAPTYPE_THINWALL
		classDescArray[classDescCount++] = GetPlateDesc();
#endif // NO_MAPTYPE_THINWALL

		classDescArray[classDescCount++] = GetOldTexmapsDesc();

#ifndef NO_MTL_COMPOSITE
		classDescArray[classDescCount++] = GetCompositeMatDesc();
#endif // NO_MTL_COMPOSITE

#ifndef DESIGN_VER
#ifndef NO_PARTICLES // orb 07-11-01

#ifndef NO_MAPTYPE_PARTICLEMBLUR
		classDescArray[classDescCount++] = GetPartBlurDesc();
#endif  // NO_MAPTYPE_PARTICLEMBLUR

#ifndef NO_MAPTYPE_PARTICLEAGE
		classDescArray[classDescCount++] = GetPartAgeDesc();
#endif // NO_MAPTYPE_PARTICLEAGE


#endif // NO_PARTICLES
#endif // DESIGN_VER

		classDescArray[classDescCount++] = GetBakeShellDesc();



		}