THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 23/08/2005 at 20:14, xxxxxxxx wrote:
Cinema 4D Version: 9+
Platform: Windows ; Mac OSX ;
Language(s) : C++ ;
i need to get the LineObject* to a deformed Spline.
I tried to use GetDeformCache() but seem not to work.
How i do that?
On 24/08/2005 at 00:05, xxxxxxxx wrote:
At what point in the pipeline are you trying to get it? It is not always possible (or safe) try and use the cache (i.e. deformed states etc.).
On 24/08/2005 at 00:29, xxxxxxxx wrote:
i'm using it in a deformer (pathdeformer) in ModifyObject.
On 24/08/2005 at 10:11, xxxxxxxx wrote:
Sorry to say but you are going to have the same problems as with the currentstatetoobject. That function is running during the cache build, which means the spline deform may not be available (it depends on the hierarchy, it may have been built before your object is called).
You would have to do the same sort of workaround as with the currentstatetoobject, grabbing it before the cache build or dumping a clone of the spline into a dummy document.
The cache is not actually intended to be accessed other than in very specific parts of the pipeline (drawing is what it is actually for). Generally it can be very unsafe to try and access the cache as they could either be currently building, not available or invalid.
Making code work with the generators or deformed states is not easy (workarounds and overhead), hence why much of CINEMA actually only directly uses polygons or splines.
On 24/08/2005 at 11:09, xxxxxxxx wrote:
Ok David.. i need to find and understand your workaround about currentstateofobject
thanks for now, i'll put my head soon on this.
On 24/08/2005 at 12:17, xxxxxxxx wrote:
Just to make sure I was clear
If you want to try and use the object in the hierarchy itself then you will need to call CURRENTSTATETOOBJECT outside of the cache building (just before it).
If you want to do it during cache building (which is probably easier), then you need to clone your object first. With a clone you could call CURRENTSTATETOOBJECT or MAKEEDITABLE (for a clone either is fine).
I'm told the clone method is known to work ok and isn't much overhead.
On 24/08/2005 at 12:40, xxxxxxxx wrote:
ok thanks for these infos.