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

    Setting Align in Constraint Tag [SOLVED]

    Scheduled Pinned Locked Moved PYTHON Development
    4 Posts 0 Posters 315 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 11/12/2014 at 08:16, xxxxxxxx wrote:

      I have an object with a Constraint Tag.
      Now I want set Clamp - Align = +Z

      If I look in the console what to set I get: Constraint[50004,3]
      How to set this value using Python (container)?

      -Pim

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

        On 11/12/2014 at 08:40, xxxxxxxx wrote:

        Hi Pim,
        you know how to ensure you get the right tag and object and so on.
        That´s why here is only the short form:

          
        contag =  op.GetTag(1019364)  
        contag[c4d.ID_CA_CONSTRAINT_TAG_CLAMP] = True  
        contag[50004,3] = 5  
        c4d.EventAdd()  
        

        Best wishes
        Martin

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

          On 11/12/2014 at 08:55, xxxxxxxx wrote:

          Hello,

          as always I suggest to use the proper constants, in this case c4d.ID_CA_CONSTRAINT_TAG_AXIS_ZP[URL-REMOVED] .

          Be aware that a constraint tag could have multiple clamp targets. To get the count of the targets simply access ID_CA_CONSTRAINT_TAG_CLAMP_TARGET_COUNT[URL-REMOVED].

          Best wishes,
          Sebastian


          [URL-REMOVED] @maxon: This section contained a non-resolving link which has been removed.

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

            On 11/12/2014 at 23:57, xxxxxxxx wrote:

            Thanks.
            Reading my question again, I realized I should have know this myself.
            After all Cube[c4d.ID_BASEOBJECT_REL_POSITION,c4d.VECTOR_Y] is about the same.
            I guess mixing c++ and python, mixes up my brain.

            -Pim

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