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

    Character object handles

    Scheduled Pinned Locked Moved PYTHON Development
    5 Posts 0 Posters 378 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 10/07/2016 at 06:12, xxxxxxxx wrote:

      Hi all,

      I'm trying to improve my piton script knowledge.
      Is there a way to retrieve a list of all character object handles?

      Thank you
      mad

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

        On 11/07/2016 at 01:41, xxxxxxxx wrote:

        Hello and welcome,

        the Character object does not provide a dedicated API so there might be certain tasks that cannot be done in Python. Can you tell us what exactly you mean with "character object handles"?

        Best wishes,
        Sebastian

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

          On 11/07/2016 at 08:25, xxxxxxxx wrote:

          I mean this:

          _<_img src="http://c4dgames.com/imgs_ext_for/tmp/handles.jpg" height="563" width="435" border="0" /_>_

          Thank you

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

            On 11/07/2016 at 08:48, xxxxxxxx wrote:

            Hello,

            the "Objects" parameter of this "Character Component" tag is just an ordinary InExclude parameter. You can access it like any other parameter. The returned data is InExcludeData.

              
            # access "Object" parameter on the Component tag  
            data = tag[c4d.ID_CA_RIGPART_TAG_HANDLES_INCLUDE]  
              
            # get number of elements in list  
            count = data.GetObjectCount()  
              
            # loop list  
            for i in xrange(count) :  
              # get element at the given index  
              obj = data.ObjectFromIndex(doc, i)  
              print(obj)  
            

            Best wishes,
            Sebastian

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

              On 11/07/2016 at 14:46, xxxxxxxx wrote:

              Hi Sebastian,

              thank you very much for your help.

              mad

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