THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 09/07/2011 at 17:48, xxxxxxxx wrote:
That's what the GetData() function does.
If you want to loop through the container of an object and get all the container items you can do this:
import c4d
from c4d import gui
def main() :
obj = doc.GetActiveObject()
bc = obj.GetData() #Get the object's container data
for i in bc:
print i
if __name__=='__main__':
main()
And if you have your own custom container you can loop through it like this:
import c4d
from c4d import gui
def main() :
bc = c4d.BaseContainer()
bc.SetData(c4d.MDATA_OPTIMIZE_TOLERANCE, 30)
bc.SetData(c4d.MDATA_OPTIMIZE_POINTS, True)
for i in bc:
print i
if __name__=='__main__':
main()
I can't think of anything else you would do with a container. Other than getting and setting.
-ScottA