Why do Splines not have a DeformCache?

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 28/09/2008 at 17:20, xxxxxxxx wrote:

User Information:
Cinema 4D Version:   10.1 
Platform:   Windows  ; Mac  ;  
Language(s) :     C++  ;

---------
Hi,

I am trying to get the points of a deformed spline here, so my plugin object can work with a deformed spline.

Everything would be so easy, if op->GetDeformCache() would not always return 0x00000000 when "op" is a SplineObject.

Now I have to use CurrentStateToObject and clone the spline including hierarchy (because if I use COPY_NO_HIERARCHY, the deformers are of course gone). The problem is: When the user puts my plugin object as a child object of the Spline, Cinema crashes. I guess, it's recursion. Sounds logical.

So my question is:
How can I get the deformed points of a spline without cloning the spline's hierarchy?
or
How can I prevent either that the user puts my plugin object as a child under the spline,
or
how can I recognize if the spline is a parent of my plugin object?

There has to be a solution. But which?

Thanks for any help!!

Greetings,
Jack

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 29/09/2008 at 01:08, xxxxxxxx wrote:

Quote: How can I get the deformed points of a spline without cloning the spline's hierarchy?
>
> * * *
>
> * * *

You can't at least not in GetVirtualObjects(). You have to use CurrentStateToObject with a temporary document.

> Quote: How can I pr event either that the user puts my plugin object as a child under the spline
>
> * * *
>
> * * *

You can't.

> Quote: how can I recognize if the spline is a parent of my plugin object?
>
> * * *
>
> * * *

I would say check in GetVirtualObjects() if the spline (I guess you got it from a link field) is the same as the parent of your object. I think pointer comparing should be enough.

cheers,
Matthias