hello,
as @mikeudin said you have to render the document using Software renderer.
Change the render setting to software/hardware renderer, use RenderDocument and retrieve the result.
After that, change back the render engine to what it was.
import c4d
from c4d import gui
# Main function
def main():
# Retrieves the current active render settings
rd = doc.GetActiveRenderData()
saved = rd[c4d.RDATA_RENDERENGINE]
rd[c4d.RDATA_RENDERENGINE] = c4d.RDATA_RENDERENGINE_PREVIEWHARDWARE
# Creates a Multi Pass Bitmaps that will store the render result
bmp = c4d.bitmaps.MultipassBitmap(int(rd[c4d.RDATA_XRES]), int(rd[c4d.RDATA_YRES]), c4d.COLORMODE_RGB)
if bmp is None:
raise RuntimeError("Failed to create the bitmap.")
# Adds an alpha channel
bmp.AddChannel(True, True)
# Renders the document
if c4d.documents.RenderDocument(doc, rd.GetData(), bmp, c4d.RENDERFLAGS_EXTERNAL) != c4d.RENDERRESULT_OK:
raise RuntimeError("Failed to render the temporary document.")
# Displays the render in the Picture Viewer
c4d.bitmaps.ShowBitmap(bmp)
rd[c4d.RDATA_RENDERENGINE] = saved
if __name__ == "__main__":
main()
Cheers,
Manuel