THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 24/03/2011 at 06:56, xxxxxxxx wrote:
User Information:
Cinema 4D Version: R12
Platform: Mac ;
Language(s) :
---------
Hey guys,
just started learning Python and stumbled on a problem what is apparently a bug. When I render the image with my script and show it in the picture viewer, the resulting image is just black.
Here's the script I use:
import c4d
from c4d import bitmaps, documents
doc = documents.GetActiveDocument()
rd = doc.GetActiveRenderData().GetData()
res_x = 512 # image resolution x
res_y = 512 # image resolution y
bitdepth = 8 # image depth
bmp = bitmaps.BaseBitmap()
bmp.Init(x=res_x, y=res_y, depth=bitdepth)
documents.RenderDocument(doc, rd, bmp, c4d.RENDERFLAGS_EXTERNAL)
bitmaps.ShowBitmap(bmp)