On 01/12/2016 at 11:01, xxxxxxxx wrote:
Okay, I've modified your example and gotten it more-or-less working (I created a Frankenstein combo of it and my earlier experiments).
1. "GetVirtualObject" needed to become "GetVirtualObjects".
2. I needed to create a system that would convert input objects to Osplines so that it would work with primitive splines.
3. GetHierarchyClone doesn't seem to be working properly in Python, so I'm using GetAndCheckHierarchyClone instead.
4. I needed to create resource files in order to execute this, and the ID needed to be increased from 1000 to 10000 (as 1000 is within the protected range for IDs)
5. It was retrieving an Int instead of a Float for the offset value.
6. I added code to account for the transformation of source points back into generator space.
7. Updated the Spline copy code to account for splines with multiple segments.
8. Not compatible with Hair Render, but *is* compatible with Sketch.
For anyone trying to recreate this on their own, it seems like the key trick being used in Riccardo's example is to manually generate a SplineObject() to be returned by GetVirtualObjects instead of a c4d.BaseObject(c4d.Ospline).