Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush Python API
      • ZBrush GoZ API
      • Code Examples on Github
    • Forum
    • Downloads
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Categories
      • Overview
      • News & Information
      • Cinema 4D SDK Support
      • Cineware SDK Support
      • ZBrush 4D SDK Support
      • Bugs
      • General Talk
    • Unread
    • Recent
    • Tags
    • Users
    • Login

    Determine whether Pivot is currently set

    Scheduled Pinned Locked Moved SDK Help
    5 Posts 0 Posters 426 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • H Offline
      Helper
      last edited by

      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.

      1 Reply Last reply Reply Quote 0
      • H Offline
        Helper
        last edited by

        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...

        1 Reply Last reply Reply Quote 0
        • H Offline
          Helper
          last edited by

          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...)

          1 Reply Last reply Reply Quote 0
          • H Offline
            Helper
            last edited by

            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)
            
            1 Reply Last reply Reply Quote 0
            • H Offline
              Helper
              last edited by

              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?

              1 Reply Last reply Reply Quote 0
              • First post
                Last post