Blur offset and blur scale

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 27/01/2010 at 10:09, xxxxxxxx wrote:

User Information:
Cinema 4D Version:   11 
Platform:   Windows  ;   
Language(s) :     C++  ;

---------
I'm sure this is easy to do ,   I just can't figure it out.  How do I change the BLUR OFFSET and BLUR SCALE in a material for the color channel?

Thanks,

~Shawn

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 27/01/2010 at 10:31, xxxxxxxx wrote:

Here's what I am trying.  Is this even in the right ballpark?

BaseChannel * bchan = surfaceTag->GetMaterial()->GetChannel(CHANNEL_COLOR);
          bchan->GetData().SetReal(BASECHANNEL_BLUR_OFFSET,.05);

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 28/01/2010 at 06:50, xxxxxxxx wrote:

The use of BaseChannels is not recommended anymore. Please use PluginShader instead. Here a little example how to change the MIP Blur and Scale:

  
BaseContainer *matdata = mat->GetDataInstance(); //mat is a Basematerial  
  
PluginShader *shd = (PluginShader* )matdata->GetLink(MATERIAL_COLOR_SHADER, doc, Xbase); //get the shader of the color channel  
  
if (shd)  
{  
  BaseContainer *shddata = shd->GetDataInstance();  
  shddata->SetReal(SHADER_MIPOFFSET, 1.0);  
  shddata->SetReal(SHADER_MIPSCALE, 1.0);  
  
  shd->Message(MSG_UPDATE);  
  mat->Update(TRUE, TRUE);  
  EventAdd();  
}  

cheers,
Matthias