Groups > Design > Autodesk MotionBuilder Python > Re: Materials not Deleting




Re: Materials not Deleting

Re: Materials not Deleting
Mon, 18 Jun 2007 06:22:59 +000
dcrosby, you hit it on the head.

All of the FBSystem and FBScene commands return 'tuples' not Python 'lists'.
Since tuples are immutable, whenever we delete something from them, Python is
creating a brand new tuple of the same name. This is throwing the iterators off
and it causes it to delete every OTHER object. The key is to iterate through the
tuple and append it to a pre-created list (defined by square brackets []). Then
we can delete from this list with either a FOR loop or the map function. 

Post Reply
about | contact