transfer_material: preserve the user's selection and warn on per-face sources - #7
Merged
ruxinliang-dev merged 2 commits intoAug 24, 2026
Conversation
Owner
|
Thank you for the detailed report, the implementation, and the Maya testing. I really appreciate the time you put into identifying the issue and preparing this contribution. I’ve pushed a maintainer follow-up commit on top of your original work. Your original commit and authorship have been preserved. The follow-up changes:
All three automated tests pass. The full per-face material remapping will remain in #8. Thanks again for the contribution. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Addresses the first three problems from #6 (the proper per-face re-mapping is left for a follow-up).
cmds.select(obj)loop left only the last target selected; the original source+targets selection is now captured up front and restored in afinally.cmds.ls(selection=True, long=True), matchingcreate_and_assign_material/find_materials, so ambiguous short names under different parents can't select the wrong objects.cmds.hyperShade(assign=...)— faster, and a single undo entry (same approach asassign_selected_material).I have already installed it in Maya and tested it in my scenario — selection restore on multi-object transfers and the multi-material warning on a per-face source.