On 03/06/2014 at 09:18, xxxxxxxx wrote:
I am trying to figure out how to take a shader such as the fusion or layer shader and save the output as a an image file. I've noticed the c4d.BaseShader has an example in the doc but does not work with any shaders other than Xbitmap.
material = doc.GetFirstMaterial()
shader = material[c4d.MATERIAL_COLOR_SHADER]
irs = render.InitRenderStruct()
if shader.InitRender(irs)==c4d.INITRENDERRESULT_OK:
bitmap = shader.GetBitmap()
shader.FreeRender()
if bitmap is not None:
bitmaps.ShowBitmap(bitmap)
Does anyone know of any examples that show how this can be done?