THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 07/09/2003 at 02:23, xxxxxxxx wrote:
User Information:
Cinema 4D Version: 8.100
Platform: Windows ;
Language(s) : C++ ;
---------
Hi
i work on a deformer that uses another data from other objects. Similar to the Spline Deformer.
I wanted to access the DeformCache of this object, so the deformer works also if the object is deformed itself.But i can't determine when the DeformCache has changed. Here is the code
BaseContainer* data = op->GetDataInstance();
UVWTag *deftag = (UVWTag* )data->GetBaseLink(DEFUVW)->GetLink(doc,Tuvw);
BaseObject *defop = deftag->GetObject();
if( defop->GetDeformCache()
&& defop->GetDeformCache()->IsInstanceOf(Opolygon))
{
GePrint("checksum: "+LongToString(defop->GetDeformCache()->GetDirty(DIRTY_DATA | DIRTY_MATRIX))); // this doesn't change when the defop is deformed
if(defop->GetDeformCache()->GetDirty(DIRTY_DATA | DIRTY_MATRIX) != defop_checksum)
{
op->SetDirty(DIRTY_DATA);
defop_checksum = defop->GetDeformCache()->GetDirty(DIRTY_DATA | DIRTY_MATRIX);
}
}
else if(defop->GetDirty(DIRTY_MATRIX | DIRTY_DATA) != defop_checksum) {
op->SetDirty(DIRTY_DATA);
defop_checksum = defop->GetDirty(DIRTY_MATRIX | DIRTY_DATA);
}
defop_checksum is a member variable of my object class
best regards
Michael