LumaPictures/pymel

Wrong result from attr.source()

zewt opened this issue · 1 comments

zewt commented

attr.source() returns incorrect attributes:

print pm.PyNode('initialShadingGroup').surfaceShader.source()
initialShadingGroup.outColor

It's attaching the attribute to the wrong node (it should be lambert1.outColor, not initialShadingGroup.outColor).

zewt commented

Not sure if anyone's reading, but it looks like Attribute.source gets the right result from _f.getProxyResult, but then _f.ApiArgUtil._castResult moves it to the wrong node.

I'm not sure what the intended fix would be. _MPlugOut is being passed a node and an MPlug on a different node. Maybe if _MPlugOut's "x" argument is an MPlug, it should ignore self and just create an Attribute directly from the MPlug. That way the boilerplate _f.ApiArgUtil._castResult calls don't need special cases, and it seems like any time those arguments aren't on the same node, the MPlug argument should be the correct one.