Determine whether Pivot is currently set

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

On 03/12/2012 at 14:51, xxxxxxxx wrote:

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

---------
Hello;

it seems that the R14 made another undocumented change in the navigation department. In R13, the state of the pivot / point of interest could be determined by looking at the preferences:

Bool pivotSet = GetWorldContainerInstance()->GetBool(ID_CAMERA_SET_PIVOT);
(as stated in a previous thread from a while ago).

Now under R14 this call returns only FALSE all the time, regardless of whether I have set a pivot or not. But there is no other method to get this state either. I tried to get it from the camera:

Bool pivotSet = cameraData->GetBool(ID_CAMERA_SET_PIVOT);
to no avail, it's not stored there either. I tried to compare the actual vector of the pivot against NULL:

Bool pivotSet = NULL != cameraData->GetVector(ID_CAMERA_POINT_OF_INTEREST,NULL);
however this vector is not reset to NULL when the pivot is unset - it stays set in the camera, pivot or not.

So, how can I see in R14 whether the pivot is currently set or not? Since the pivot is a toggling command, this is fairly essential in navigation.

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

On 05/12/2012 at 07:05, xxxxxxxx wrote:

no one has an idea? This is a really central navigation concept, I can't believe the only method to access the information is just gone...

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

On 05/12/2012 at 09:50, xxxxxxxx wrote:

...and before somebody tries it, IsCommandChecked() doesn't work either on ID_CAMERA_SET_PIVOT. Both this and IsCommandEnabled() are always returning FALSE. This is pretty strange since you can actually embed the command ("Set Camera Pivot") in a toolbar - not only there IS an icon for that, it also changes to the Checked state properly! So, it behaves like a proper command except for the API which pretends that it doesn't exist at all.

And since I'm reaching for straws here already, I did get that GetWorldContainer() and GetWorldContainerInstance() apparently don't behave completely equal, but I checked this as well, and ID_CAMERA_SET_PIVOT is returned by neither. (For R13, by both...)

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

On 06/12/2012 at 08:57, xxxxxxxx wrote:

Hi,

ID_CAMERA_SET_PIVOT is stored in the settings, not the world container:

doc->GetSettingsInstance(DOCUMENTSETTINGS_MODELING)->GetBool(ID_CAMERA_SET_PIVOT)

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

On 06/12/2012 at 11:31, xxxxxxxx wrote:

Indeed, that does it... thanks.

For the record: Only in R14 though; for R13 it does not work although DOCUMENTSETTINGS_MODELING exists in that version already. Here, I have to use the Prefs, as mentioned in the original post.

BTW, the documentation for DOCUMENTSETTINGS_MODELING does not mention that value. It lists only "MDATA_Options and toolsnapping.h.", the latter of which not even exists in the R14 any more.

Are ID_CAMERA_SET_PIVOT and whatever other option may be available in fact unsupported values that we shouldn't rely on? ...and therefore perhaps not listed on purpose?