SetSceneCamera not working

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 12/08/2005 at 11:23, xxxxxxxx wrote:

User Information:
Cinema 4D Version:   9.1 
Platform:      
Language(s) :     C++  ;

---------
Hi,

I dont understand why the following snippet is not working. I am trying to change the camera and render the document.

This is what I am using

  
String s = clonedDoc->GetRenderBaseDraw()->GetSceneCamera(clonedDoc)->GetName();  
GePrint("Camera Name: " + s);  
GePrint("Op Name: " + op->GetName() + " " + LongToString(op->GetType()));  
clonedDoc->GetRenderBaseDraw()->SetSceneCamera(op);  
clonedDoc->Message(MSG_UPDATE);  
s = clonedDoc->GetRenderBaseDraw()->GetSceneCamera(clonedDoc)->GetName();  
GePrint("Camera Name: " + s);  

But the following is printed in the console

1. Camera Name: Camera
2. Op Name: MyRenderCamera 5103
3. Camera Name: Camera

Line 3 should be Camera Name: MyRenderCamera (which is the name of the camera object)

I dont understand why it doesn't use my camera

Any Ideas?

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 12/08/2005 at 11:36, xxxxxxxx wrote:

Nevermind, programmer error :)

It was to do with clonedDoc. As I was cloning the document, some other part of my code was using the original document