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
    • Recent
    • Tags
    • Users
    • Login

    c4d.IsCommandChecked(430000021) returns False

    Scheduled Pinned Locked Moved PYTHON Development
    3 Posts 0 Posters 334 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

      On 19/07/2016 at 16:20, xxxxxxxx wrote:

      I'm checking if the Interactive Render Region option is on by using the command:

      c4d.IsCommandChecked(430000021)

      from within the Execute method of my tag.
      It returns False, even if the Interactive Render Region is on.
      And it only returns True if I drag an object or change the view from the viewport camera.
      Shouldn't it ALWAYS return True if the command is checked?

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

        On 19/07/2016 at 16:36, xxxxxxxx wrote:

        Ok, I found a way:

        sh=doc.FindSceneHook(430000000)
        if sh!=None:
             bc=sh.GetDataInstance()
             irr_on=bc.GetBool(c4d.IRR_ENABLE)

        Although, I still think that the IsCommandChecked should return consistent results.

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

          On 20/07/2016 at 02:04, xxxxxxxx wrote:

          Hello,
          _
          IsCommandChecked()_ (like the other "Command" related functions) can only be executed from the main thread. The "Execute" function of a tag is mostly not executed from the main thread but from a different thread so you cannot use such "Command" functions in this context.

          Best wishes,
          Sebastian

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