GetContour and GetVirtualObjects in one Plugin



  • I got a plugin which returns, base on its settings a mesh or a spline. If i create an instance from my plugin using only GetVirtualObjects the Instance of my spline doesn't work.

    so is there a way to use both in one plugin?



  • Hi @pyr first of all, in Cinema 4D there is no object that behaves like that. So it's not officially supported but you can get it to work.

    With that's said I would like to ask for more information.

    • Do you need input objects?
    • Should your object be considered as a spline object or only returning a spline is enough (aka returning a spline into a null)?

    Note that few examples in the GitHub repository can help you:

    Cheers,
    Maxime.



  • @pyr You can have both. GetVirtualObjects() is called first, and if you return nullptr GetContour() is called.

    But you need to register your object with OBJECT_GENERATOR | OBJECT_ISSPLINE.



  • @rsodre works flawless!


Log in to reply