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

    Camera Commands

    PYTHON Development
    0
    5
    2.1k
    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
      Helper
      last edited by

      On 23/08/2018 at 08:52, xxxxxxxx wrote:

      I'm not sure how to activate/deactivate camera commands with python. Do I need to get the active basedraw and use c4d.BaseList2D.__setitem__() to set the state for things like Object Mode, Cursor Mode, etc?

      I see that in the symbols there is IDS_CAMERACOMMAND_OBJECTMODE but i'm not sure where to plug that into toggle on and off?

      Thank you

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

        On 24/08/2018 at 05:31, xxxxxxxx wrote:

        Hello,

        these commands are called with CallCommand(). But the ID you found is just the ID of the resource string, not the one of the actual command you need.
        The command IDs can be found either by opening the Script Log (menu Script) and afterwards calling the needed command from menu. Or you can use the Customize Commands dialog (menu Window -> Customization).
        For Object Mode it is:

        c4d.CallCommand(440000094) # camera object mode
        
        1 Reply Last reply Reply Quote 0
        • H
          Helper
          last edited by

          On 24/08/2018 at 07:32, xxxxxxxx wrote:

          Thanks for the reply Andreas. Is there a way to check if the Camera Object Mode is active too? I'm pretty sure that can't be done with the Call Commands correct?

          for example:
          if Camera Object Mode != Active:
          Make Active

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

            On 24/08/2018 at 07:36, xxxxxxxx wrote:

            You can use IsCommandChecked() for this.

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

              On 24/08/2018 at 09:21, xxxxxxxx wrote:

              Perfect, Thank You!

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