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

    How is NBIT_CKEY_ACTIVE used?

    Cinema 4D SDK
    python s22 sdk
    2
    3
    254
    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.
    • ?
      A Former User
      last edited by

      How does one use NBIT_CKEY_ACTIVE? I see in the documentation that it's the "Active point of animation path in editor." I couldn't find any examples that use it successfully however. I found it used in this old post on CGSociety by Per-Anders from 2013, but I couldn't get it to work. Here's the code I'm using to test it:

      import c4d
      
      def main():
          tracks = op.GetCTracks()
          for track in tracks:
              print "*"*100
              print track.GetName()
              curve = track.GetCurve()
              count = curve.GetKeyCount()
              for x in range(0,count):
                  key = curve.GetKey(x)
                  print "Key %s: NBIT_CKEY_ACTIVE: %s"%(x,key.GetNBit(c4d.NBIT_CKEY_ACTIVE))
      
      if __name__=='__main__':
          main()
      

      Thank you.

      1 Reply Last reply Reply Quote 0
      • r_giganteR
        r_gigante
        last edited by

        Hi @blastframe the NBIT_CKEY_ACTIVE is set when the animation path key is selected in the viewport (and not in the Timeline)

        12105b34-3e1b-4f93-a259-d0301dd2f3b5-image.png

        Cheers, R

        ? 1 Reply Last reply Reply Quote 0
        • ?
          A Former User @r_gigante
          last edited by

          @r_gigante Ahhhhhhhh, okay, I get it now. Thank you 😄

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