Object Plugin: hide child object

On 25/02/2018 at 07:34, xxxxxxxx wrote:


I try to script an object generator that takes a spline as a child, break apart the spline by disconnecting each point and jitter the points of these newly created segments.

Two problems:
- The original spline is always visible along with the jittered cloned one I generate and if I hide it when the user moves it apart from the object generator it stays invisible
- I tried to use c4d.utils.DisjointMesh to break apart the spline in multiple segments but it doesn't work.

Thank you for your help,

On 26/02/2018 at 09:27, xxxxxxxx wrote:

Hi Francis,

first of all, I'm wondering if the final result of the ObjectData is a spline or a polygon object?

Usually hiding of input objects of a generator in the viewport is automatically handled, when registering the ObjectData with OBJECT_INPUT flag.

DisjointMesh() is probably not what you want. At least from your description SendModelingCommand(MCOMMAND_EXPLODESEGMENTS) sounds better fitting to me.