It's annoying and I'd rather see the word "Collection" instead of None.
There was an article on xsisupport.com about it explaining something of
why it wasn't changed to say so. Just one of those things you should
just learn at this point.
On Thursday, November 07, 2013 11:59:35 AM, Sergio Mucino wrote:
Ah, I see. In other applications, collections come out as an array.
The "None" made me think something went boom.
Thanks Eric! Something new learned... and before lunch time! Cheers!
On 07/11/2013 11:56 AM, Eric Thivierge wrote:
You're printing out collections. When you do a print on a collection
it prints "None".
Instead if you want to get at the objects it would be better to
iterate over the items in the collection:
for eachItem in chainRoot.Bones:
Application.LogMessage(eachItem)
On Thursday, November 07, 2013 11:46:11 AM, Sergio Mucino wrote:
So, I'm trying to do something pretty simple and straightforward.
Create a 1-bone joint chain, and get back all of its elements. Turns
out this is not being as straight-forward as it should be. Here's the
little snippet of this part of my script...
si = Application
chainRoot = si.Create2DSkeleton(0, 0, 0, 10, 0, 0, -90, 0, 0, 4)
print chainRoot
print chainRoot.Children # Not working
print chainRoot.Bones # Not working
print chainRoot.Effector
'''
Properties taken from here
http://download.autodesk.com/global/docs/softimage2013/en_us/sdkguide/index.html
'''
As you can see, I'm printing out the properties I'd need, but two of
them (the two I'd actually care about) are 'not working' (they return
'None'). Why is this? Are they broken, or am I missing something? Any
help is appreciated. Thanks!
--