Exemplo n.º 1
0
void  StraussShaderDlg::LoadDialog(BOOL draw) 
{
   if (pShader && hRollup) {
      glSpin->SetValue( FracToPc( pShader->GetGlossiness() ),FALSE);
      glSpin->SetKeyBrackets(KeyAtCurTime(st_glossiness));
      
      mtSpin->SetValue( FracToPc( pShader->GetMetalness() ), FALSE);
      mtSpin->SetKeyBrackets(KeyAtCurTime(st_metalness));

      trSpin->SetValue(FracToPc(pMtl->GetOpacity(curTime)),FALSE);
      trSpin->SetKeyBrackets(pMtl->KeyAtTimeByID(OPACITY_PARAM, curTime));

      UpdateColSwatches();
      UpdateHilite();

      IParamBlock2 * shaderpblock = pShader->pblock;
      if ( shaderpblock ) {
		  cs[0]->UpdateEnableState( shaderpblock, shaderpblock->GetAnimNum( st_diffuse ) );
		  glSpin->UpdateEnableState( shaderpblock, shaderpblock->GetAnimNum( st_glossiness ) );
		  mtSpin->UpdateEnableState( shaderpblock, shaderpblock->GetAnimNum( st_metalness ) );
	  }
	  // trSpin: opacity is accessed through the material: only handle StdMat2.
	  EnableMtl2OpacityControl( pMtl, trSpin );
   }
}