On 18/12/2014 at 12:55, xxxxxxxx wrote:
Hi, I hope someone can help. I have a Python node in Xpresso. It has 2 input ports: Count (from a cloner) and Iteration (from an iterator). I am trying to enable and disable 100 Tracer objects based on the count in the cloner. I am using this code in the Python node but nothing is happening. (The list of tracers goes from cord Tracer_01 to cord Tracer_100)
import c4d from c4d import utils from c4d import documents mydoc = documents.GetActiveDocument() ctl = doc.SearchObject('cord Tracer') bc = c4d.BaseContainer() print ctl def main() : if Count <= Iteration: ctl[c4d.ID_BASEOBJECT_GENERATOR_FLAG == 1] else: ctl[c4d.ID_BASEOBJECT_GENERATOR_FLAG == 0] c4d.EventAdd() if __name__=='__main__': main()
Any help would be greatly appreciated. Thanks.