static INode *FindObjectsNode(ReferenceTarget *ths, Object *obj) { if (NULL == ths) { return NULL; } DependentIterator di(ths); ReferenceMaker* maker = NULL; while ((maker = di.Next()) != NULL) { if (maker->SuperClassID()==BASENODE_CLASS_ID) { // Verify that we are this node's object INode *node = (INode*)maker; Object *nobj = node->GetObjectRef(); if (nobj) nobj = nobj->FindBaseObject(); if (nobj==obj) return (INode*)maker; } if (maker->IsRefTarget()) { INode *node = FindObjectsNode((ReferenceTarget*)maker, obj); if (node) return node; } } return NULL; }
void mrGeomShaderObject::UserDlgProc::SetThingToOwner(IParamMap2 *map) { if(map != NULL) { ReferenceMaker* owner = map->GetParamBlock()->GetOwner(); if(owner->IsRefTarget()) { SetThing(static_cast<ReferenceTarget*>(owner)); } else { DbgAssert(false); SetThing(NULL); } } else { SetThing(NULL); } }