EMSUSD-3260 collection-based material-binding support - #4696
Merged
Conversation
Adding support for collection-based material assignment in the attribute editor (AE). Added support for collection-base material bindings to the collection widget: - Added `hasMaterialBinding`, `createMaterialBinding` and `removeMaterialBinding` function to the `CollectionData` interface. - Implemented those functions in `UsdCollectionData`. - Implemented those function in `MayaCollectionData` to use commands for undo/redo. - Added two new menu items to the collection widget menu: "Assign Material" and "Unassign Material". Modified the AE UI building: - Modified `AETemplate` to detect USD collections with corresponding material binding and make sure both UI sections are next to each other. - Added `isSuppressedAttr`, `isAddedAttr` and `isAttrAlreadyHandled` functions to `AETemplate` to simplify code. - Added creation of the collection sections for prims with collection-based bindings but without collections. - Made sure not to add material sections for attributes already handled. Modified `MaterialCustomControl` to support collection-base material bindings: - Refactored implementation details into their own functions so that the differences between direct binding and collection bindings can be abstracted away. - Renamed `hasMaterialBinding` to `hasCollectionMaterial`. - Added `CollectionMaterialCustomControl` sub-class that implements all the functions for collection-based material bindings. - Added `findCollectionMaterials` on `CollectionMaterialCustomControl` to find all collection bindings. Added UFE commands to manipulate collection-based material bindings with undo/redo: - Added `CreateCollectionMaterialBindingUndoableCommand`. - Added `BindCollectionMaterialUndoableCommand` . - Added `UnbindCollectionMaterialUndoableCommand`. - Modified `SetMaterialBindingStrengthCommand` to support collection-based bindings. - Wrapped the commands in Python. Added unit tests.
pierrebai-adsk
force-pushed
the
bailp/EMSUSD-3260/collection-material-bindings
branch
from
August 11, 2026 14:49
41d936a to
5835e74
Compare
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.
Adding support for collection-based material assignment in the attribute editor (AE).
Added support for collection-base material bindings to the collection widget:
hasMaterialBinding,createMaterialBindingandremoveMaterialBindingfunction to theCollectionDatainterface.UsdCollectionData.MayaCollectionDatato use commands for undo/redo.Modified the AE UI building:
AETemplateto detect USD collections with corresponding material binding and make sure both UI sections are next to each other.Modified
MaterialCustomControlto support collection-base material bindings:CollectionMaterialCustomControlsub-class that implements all the functions for collection-based material bindings.Added UFE commands to manipulate collection-based material bindings with undo/redo:
CreateCollectionMaterialBindingUndoableCommand.BindCollectionMaterialUndoableCommand.UnbindCollectionMaterialUndoableCommand.SetMaterialBindingStrengthCommandto support collection-based bindings.Added unit tests.