Is it possible to copy pixels from the active BaseDraw to a bitmap?
I might be overlooking or misunderstanding something here, but you can render the document with Cinema's OpenGL renderer (via
c4d.documents.RenderDocument). If you set the render data accordingly to the frame of the
BaseDraw you are interested in, you can sort of mimic what you want to do.
This would be obviously much slower than directly accessing the frame buffer of the viewport, due to all the overhead that comes with rendering a scene - even it is with the OpenGL renderer.
So this would probably not be suitable to do, for example, some real time computer vision stuff on a viewport (which would be quite a stretch in Python in the first place) or something equally demanding, but totally fine, if you just need now and then a representation of the users active viewport.
MAXON SDK Specialist
Thank you @m_adam and @zipit . I am specifically interested in copying the Viewport pixels for speed.
Thank you both for your help.