-
Notifications
You must be signed in to change notification settings - Fork 129
Maya: Look assigner UI improvements #3208
Maya: Look assigner UI improvements #3208
Conversation
try: | ||
cmds.sets(filtered_nodes, forceElement=id_shading_engines[0]) | ||
except RuntimeError as rte: | ||
log.error("Error during shader assignment: {}".format(rte)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you describe the errors you were facing that needed this to solve it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was a case we had with outsourcing files, where the 'initialShadingGroup' node was locked.
# Traceback (most recent call last):
# File "D:\dev\OpenPype\openpype\tools\mayalookassigner\app.py", line 253, in on_process_selected
# assign_look_by_version(nodes, version_id=version["_id"])
# File "D:\dev\OpenPype\openpype\hosts\maya\api\lib.py", line 1608, in assign_look_by_version
# apply_shaders(relationships, shader_nodes, nodes)
# File "D:\dev\OpenPype\openpype\hosts\maya\api\lib.py", line 1724, in apply_shaders
# cmds.sets(filtered_nodes, forceElement=id_shading_engines[0])
# RuntimeError: # Connection not made: 'wesley_shield_03_geoShape.instObjGroups[0]' -> 'initialShadingGroup.dagSetMembers[88]'. Destination is locked.
Error while parsing arguments.
#
The point of this change is so that the whole process won't abort the first time there's an error. If it happens that the first piece of geo gives an error, Look assigner probably still should try for the rest.
Hey @antirotor, I see you assigned this back to me, is there something I need to address still? |
No, just that it's your PR :) so whenever someone comments on it or request changes you'll get notified (you'll probably get them anyway, it renders your avatar next to the PR title and that's worth it :)) |
Probably I'm not used to how you guys run the PR process. I see the 'assignee' is the person to take the next step of a PR. So I'm a bit confused when you assigned this to me. Do I get merge privilege somehow? :P |
Assignee is the person responsible for the PR. That's not always the author, but most often it is. Reviewers are the ones to act on it unless they already did. Assignee monitors what needs to be done....and usually also does it. Assignee can and should also poke people and remind the PR is ready if nobody seems to be reviewing it. |
|
Task linked: OP-3350 Maya: Look assigner UI improvements |
@icyvapor we'll merge this into an intermediary branch so all the commit history is kept and it doesn't require any more work from you and so we can have it show in the Changelog properly. we have some small issue on the CI front with external PRs |
Hope it's not me? .. |
Nope. it's just our rudimentary CI, that needs to be improved, so I wanna test what it does if we go through 2 PRs. You're just a good guinea pig right now ;) |
24cb024
into
ynput:feature/OP-3350_Maya-Look-assigner-UI-improvements
Look assigner now handles RuntimeError and continues with material assignment; also some UI usability improvements for host tools.
Add a bit error handling so LookAssigner doesn't abort when there's any single RuntimeError.
Also we noticed LookAssigner is not docked as a sub-window of the main Maya window, and once it's opened, clicking the menu item(or icon) wouldn't bring up the UI to the default size. So I added
showNormal()
call. Did the same for couple of other UI tools.Note: Please squash my commits when merging!
Thanks!