On 13/04/2015 at 08:46, xxxxxxxx wrote:
Hello,
you have quite a lot questions there.
First, your iteration is not quite correct. You only get the next object with GetNext(). But in the scene graph objects can also have child objects so you must also check GetDown(). You find information on how to iterate through all the objects in the scene on the developer blog on "Recursive hierarchy iteration" and "Non-recursive hierarchy iteration".
Also, you don't check if the found camera is indeed the active camera. In Cinema 4D there can be multiple camera objects in a scene. The active scene camera can easily be obtained from GetSceneCamera(), the proper BaseDraw can be accessed using GetRenderBaseDraw(). See the "Look at Camera" example.
But in a VideoPostData plugin you don't need to do this. When the VolumeData is available you can call GetRayCamera() to get the active camera. With the "link" property you get the actual camera object. With that object you can search for your tag.
You cannot change how the camera is drawn since the camera is drawing itself in the viewport. But since you already add a tag to the camera you can use that tag's Draw() function to draw additional elements in the viewport. You can find multiple examples on how to use the Draw() function in the SDK example project.
To open the Render Settings dialog programmatically you just have to execute the command that opens that dialog. A command is executed with CallCommand(), the proper ID can be found in the "Customize Commands" dialog.
To make it easier for everyone to follow a topic and to search the forum please open a new thread for each new, unrelated question. Thanks.
Best wishes,
Sebastian