THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 13/12/2012 at 14:23, xxxxxxxx wrote:
Thanks to everyone for their patience as I stumble through this learning process.
So, could some one please tell me where my logic is flawed here?
I just want to step through all the children of my Python Generator (which has been a good learning vehicle for me) and print their names – just to test my hierarchical iterator (which apparently isn't)
==== START ====
import c4d
#Welcome to the world of Python
def init(op) :
for obj in op:
print(obj.GetName())
if (obj.GetChildren()) :
for child in obj.GetChildren() :
init(child)
def main() :
init(op.GetChildren())
===== END ====
Thanks!
Jim