Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong result from attr.source() #430

Open
zewt opened this issue Jun 20, 2020 · 1 comment
Open

Wrong result from attr.source() #430

zewt opened this issue Jun 20, 2020 · 1 comment

Comments

@zewt
Copy link

zewt commented Jun 20, 2020

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
Copy link
Author

zewt commented Apr 20, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant