THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 23/10/2011 at 06:47, xxxxxxxx wrote:
Cinema 4D Version: 13
Platform: Windows ;
Language(s) : C++ ;
with R13 there are a lot of changes in the navigation department. The preferences have won some parameters, while the camera has lost a lot, and most of the settings have been unified.
I'm now looking for the new R13 way to set and get a camera's pivot / POI point. Earlier, the navigational pivot could be accessed through the camera's basecontainer (if the modes were set accordingly) :
BaseContainer* cameraData = camera->GetDataInstance();
Vector pivot = cameraData->GetVector(CAMERAOBJECT_PIVOT_POSITION);
This constant is gone (and the setting has been removed from the GUI anyway). I can see that there is a new type that holds the desired vectors:
But I can't find a way to get or set these vectors. In fact, even a textual search in the API files does not turn up any usage for these values. Thus:
1. How do I read these values? How do I write these values?
2. Are these values always accessible regardless of the mode set in the preferences? (Up to R12 I had to walk through a lot of switch/cases on the various modes, because the CAMERAOBJECT_PIVOT_POSITION value was only valid for a single mode, and for a mode like "pivot is selected object" I had to find out the selected object's axis myself.) So, if I set Camera Mode to Object, will I still be able to retrieve the POI (in this case, the object's center) through that vector?
3. What programmatical object is the POI bound to, Prefs or Camera? (Well, I guess that answers itself once I know how to retrieve it...)
4. It seems there are no shortcut-able commands to change the navigational preferences "on the fly" - I have to open the Preferences dialog every time...?
Thanks for any information.
On 24/10/2011 at 06:44, xxxxxxxx wrote:
ID_CAMERA_POINT_OF_INTEREST is a container entry of the camera object and is the POI in world coordinates. Keep in mind that the global navigation modes will change this value after each viewport interaction unless the POI is locked. The POI can be locked by the Lock Camera Pivot command or directly by setting the boolean world container entry ID_CAMERA_SET_PIVOT.
From the navigation preferences only the navigation modes can be set through commands (Cursor Mode, Center Mode, Object Mode, Camera Mode).
On 25/10/2011 at 03:49, xxxxxxxx wrote:
With a 3D mouse, naturally it is not possible to change the POI since there is neither a pointer nor an action that would start and end a movement, like a mouse click... so I will have to rely on the last POI that was set through the mouse, or a locked POI.