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

    Python - How to add new link fields to Tags ?

    Scheduled Pinned Locked Moved SDK Help
    1 Posts 0 Posters 144 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

      THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

      On 06/12/2010 at 15:46, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   12 
      Platform:      
      Language(s) :       PYTHON  ;

      ---------
      I'm trying to setup an aim constraint with python.

      I know how to create the tag with :

      Tcaconstraint = 1019364
      constr = c4d.BaseTag(Tcaconstraint)

      and check the 'aim' box with :

      constr[c4d.ID_CA_CONSTRAINT_TAG_AIM] = 1

      I've worked out how to add link fields with :

      constr[c4d.ID_CA_CONSTRAINT_TAG_AIM_TARGET_COUNT] = 1

      But I'm stuck at accessing the properties of the links.
      When I try to use :

      constr[c4d.ID_CA_CONSTRAINT_TAG_AIM_AXIS] = 2

      to set the axis to Z+, nothing happens. I guess I need to access it by index, because there can be any number of links, but I don't know the syntax.
      The .H file, which I've used to get this far, mentions containers, so I guess maybe I have to change the properties in a variable and load it in but again, I don't know the syntax.

      If anyone could help me with an example of how to add a link, it would be greatly appreciated.

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