New Native Redshift camera via Python
-
Hi there,
my matchmoving software is using python scripting to export the camera data to C4D.
This works great but the script is not able to create a Native Reshift camera even though the scene is configured to use the new camera as default.Having a look at the Python API I was not able to find a specific command to set the c4d.CameraObject() to use the newer Redshift Camera Object.
So my question is this: What is the correct way to create a Native Redshift Camera via Python script ?
Attached is an example script from my matchmove software ( ignore the missing Footage). Just execute the script in an empty scene and it should create the trackers, the camera and a camera screen.
Any help is appreciated.
-
Hello @mschnell ,
Welcome to the Plugin Café forum and the Cinema 4D development community, it is great to have you with us!
Getting Started
Before creating your next postings, we would recommend making yourself accustomed with our Forum and Support Guidelines, as they line out details about the Maxon SDK Group support procedures. Of special importance are:
- Support Procedures: Scope of Support: Lines out the things we will do and what we will not do.
- Support Procedures: Confidential Data: Most questions should be accompanied by code but code cannot always be shared publicly. This section explains how to share code confidentially with Maxon.
- Forum Structure and Features: Lines out how the forum works.
- Structure of a Question: Lines out how to ask a good technical question. It is not mandatory to follow this exactly, but you should follow the idea of keeping things short and mentioning your primary question in a clear manner.
About your First Question
CameraObject
is the type for the standard camera. The RS Camera must be instantiated withc4d.BaseObject(c4d.Orscamera)
. We have this C++ Manual but I never got to translating it for Python. But it might be helpful anyways.Cheers,
Ferdinand -
Thank you. I got it working thanks to your hints.