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

    Add IK tag via Python Script

    Scheduled Pinned Locked Moved PYTHON Development
    3 Posts 0 Posters 319 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 16/12/2016 at 14:46, xxxxxxxx wrote:

      Been searching for quite a while now and I can't find any way to add an IK tag to an object via python.  The only thing I've found is a 6 year old thread where it was indicated that a whole bunch of module tags were "left out" and just use the ID retrieved from the script log after adding one manually.

      Problems with that, currently:

      1.  They never added the missing tags (that's some crazy oversight right there!).
      2.  The tag id for the IK tag is (100004788, 50032)... python isn't liking the subid and keeps throwing errors.

      Other than changing my active object selection and doing a CallCommand what options do I have?

      Thanks!
      kvb

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

        On 17/12/2016 at 05:23, xxxxxxxx wrote:

            op.MakeTag(1019561)
            c4d.EventAdd()
        

        Working fine

        A better way for knowing ID is to create one on any object. Open the consol and jsut grab this tag to the console and press enter, you will have the following line appear (it's work with everything in c4d !)
        <c4d.BaseTag object called 'IK/IK' with ID 1019561 at 0x000001F4584F3A30>

        So you got the ID ! 🙂

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

          On 17/12/2016 at 19:09, xxxxxxxx wrote:

          Ah, yes! Forgot about grabbing the ID from the console!

          Thanks!

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