Polygonize() and scene camera
-
Hi folks,
whenever I use doc->Polygonize(), the selected camera gets ignored in the newly cloned scene. The cloned scene is viewed from the editor camera and not the original selected camera copy.
How can I keep the current/selected camera when Polygnize()'ing a document?
Edit: apologies, looks like I've selected the incorrect forum category, it should be in Cinema 4D Development, not the Cineware forum. I can't seem to edit this.
WP.
-
Hi,
the only way of doing it is to retrieve the current camera of your document with GetSceneCamera from the BaseDraw
Once you got the camera, clone it and move it to the document and set the camera in the new document with SetSceneCamera
Before that, you probably have to set the active document to the new one with SetActiveDocument
Of course, if the camera is animated trough its parent, you will have to copy it also or bake it before.
Cheers,
Manuel -
Thanks Manuel,
making a copy of the camera and inserting into the new scene should do.
Just out of interest, why would it not just keep and use the selected camera in the first place? Seems a bit odd.
WP.
-
hi,
i don't think there's a particular reason for not keeping the camera but the function description is :
Returns a copy of the document in which all objects are converted to polygon objects.
As a camera doesn't generate polygon, it just doesn't follow. I'm expecting the same for light, atmosphere, background, floor etc.
Cheers,
Manuel