THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 28/07/2010 at 05:01, xxxxxxxx wrote:
Cinema 4D Version: R11.5
Platform: Windows ; Mac ;
Language(s) : C++ ;
Hi, how can I find out if an object is being affected by a deformer or not.
On 28/07/2010 at 08:27, xxxxxxxx wrote:
Check this out:
I'd say if it's not NULL, there has been some deformation going on
On 28/07/2010 at 08:49, xxxxxxxx wrote:
While that is correct, GetDeformCache() may return NULL for other reasons (and the object in question still be affected by a deformer) such as cache not yet built.
A better approach might be to see if the object's children are deformers as an additional test:
Bool deformed = (obj->GetDeformCache() != NULL);
for (BaseObject* child = obj->GetDown(); child; child = child->GetNext())
info = child->GetInfo();
if (child->GetDeformMode() && ((info == OBJECT_MODIFIER) || (info == OBJECT_HIERARCHYMODIFIER)))
deformed = TRUE;
On 28/07/2010 at 09:30, xxxxxxxx wrote:
Thanks all. The only problem with checking for deformers as children is that a deformer can affect it's parent object and the hierarchy below that parent, which means I will have to traverse the whole hierarchy from the top level parent, which I was trying to avoid.