Parents of parents of MPlugs 2003-11-28 - By David Gordon
Back What is the best way of determining if the compute function of a dependency node is being asked to compute a plug that looks like this:
plug = nodeName.arrayPlug[0].childAttribute
I can detect arrayPlug by simply comparing plug with arrayPlugAttr (my static attribute MObject). I can detect arrayPlug[0] by comparing plug.parent() with arrayPlugAttr (after a call to MPlug::isElement()) But if I detect that the plug is a child plug, and that its parent is an element, I cannot get the parent of the parent. The only solution I can think of at the moment is doing a nasty string comparison on the name. Surely there is a neater way?
Thanks,
David
-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --- List-help: <mailto:listar@(protected)?Subject=help> List-archive: <http://www.highend3d.com/maya/devarchive/>
|
|