循环

作者: N景波 | 来源:发表于2018-02-11 21:26 被阅读0次

一句话遍历场景

for obj in doc.GetActiveObjects():
    print obj

使用while循环

obj = doc.GetFirstObject()
while(obj):
   print obj.GetName()
   obj = obj.GetNext()

用while时,弄成死循环,c4d就不会动了。obj=obj.GetNext()是关键,及时使用break之类跳出。

相关文章

网友评论

      本文标题:循环

      本文链接:https://www.haomeiwen.com/subject/ibjenttx.html