Character object handles

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

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

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

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

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

Hi Sebastian,

thank you very much for your help.

mad