Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware 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

    Python c4d.CheckIsRunning(type) returning None

    Cinema 4D SDK
    python
    3
    4
    544
    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.
    • P
      pe_matthewalexander
      last edited by Manuel

      So the c4d function c4d.CheckIsRunning(type) is supposed to return a True or False depending if the given type is running.
      Yet no matter how often I run it, I'm always being given back the same thing, None.

      Not True or False, but no return at all, it's as if the function is not actually executing anything but instead doing nothing.
      Anyone else experiencing this?

      In fact looking further it appears that almost none of the "miscelanious" functions are working as they should here.

      1 Reply Last reply Reply Quote 0
      • ManuelM
        Manuel
        last edited by

        Hello,
        First, for your next threads, please help us keeping things organised and clean. I know it's not your priority but it really simplify our work here.

        • Q&A New Functionality.
        • How to Post Questions especially the tagging part.

        I've added the tags and marked this thread as a question so when you considered it as solved, please change the state 🙂


        It's difficult to answer your question if we don't have a bit more context. Are you calling that in a script, tag, objectdata etc..
        If you could share, it can be a bug but we need to know how to reproduce it.

        Also what version of cinema4D are you using ? (that's why tags are important for us also)

        Cheers,
        Manuel

        MAXON SDK Specialist

        MAXON Registered Developer

        1 Reply Last reply Reply Quote 0
        • ferdinandF
          ferdinand
          last edited by ferdinand

          Hi,

          c4d.CheckIsRunning() seems to work just fine. As Manuel pointed out, the context is important. When invoking the method in a threaded context the results might not always be what you expect them to be.

          Here is a very small example for a Python Scripting Tag:

          import c4d
          #Welcome to the world of Python
          
          def main():
              check = c4d.CheckIsRunning(c4d.CHECKISRUNNING_VIEWDRAWING)
              print "CHECKISRUNNING_VIEWDRAWING from main(): %d" % (check) 
          
          def draw(bd):
              """
              """
              check = c4d.CheckIsRunning(c4d.CHECKISRUNNING_VIEWDRAWING)
              print "CHECKISRUNNING_VIEWDRAWING from draw(): %d" % (check) 
              return True
          

          Cheers
          zipit

          MAXON SDK Specialist
          developers.maxon.net

          1 Reply Last reply Reply Quote 0
          • ManuelM
            Manuel
            last edited by

            hello,

            without any news, i'll pass this thread to solved.

            Cheers,
            Manuel

            MAXON SDK Specialist

            MAXON Registered Developer

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