Python-Generated Splines are not recognized by Cloner Object
-
Hi,
I have a Python Generator Object that returns a Spline Object. I want to use this spline for the distribution of a Cloner Object, but it does not generate any clones on the spline.
The spline works fine when used for Generators such as Sweep, Extrude, Loft etc.The Python Generator Code:
import c4d def main(): spline = c4d.SplineObject(pcnt=4, type=c4d.SPLINETYPE_LINEAR) spline.ResizeObject(pcnt=4, scnt=1) spline.SetPoint(id=0, pos=c4d.Vector(0, 0, 0)) spline.SetPoint(id=1, pos=c4d.Vector(100, 100, 100)) spline.SetPoint(id=2, pos=c4d.Vector(200, 200, 200)) spline.SetPoint(id=3, pos=c4d.Vector(300, 300, 300)) spline.SetSegment(id=0, cnt=4, closed=False) spline.Message(type=c4d.MSG_UPDATE) return spline
The Scene File:
PyGenSplineAndCloner.c4dI would appriciate it if you could check to see if it is a bug or I am missing somthing in the code.
-
Hi @kng_ito,
Thanks for reaching out to us. In general one doesn't expect Python Generator behaving the same way as native c4d generators, hence such issues are more or less expected.
If you really like to make it work, as a direction for your further investigation, you can try inserting spline into the document and execute passes.
Let me know if you have any further questions.
Cheers,
Ilia -
hi @i_mazlov ,
I understand that it is not supported, so I will use Scene Nodes to generate the spline this time.
No other questions, thank you very much.