Skip to content

EMSUSD-3260 collection-based material-binding support - #4696

Merged
seando-adsk merged 1 commit into
devfrom
bailp/EMSUSD-3260/collection-material-bindings
Aug 12, 2026
Merged

EMSUSD-3260 collection-based material-binding support#4696
seando-adsk merged 1 commit into
devfrom
bailp/EMSUSD-3260/collection-material-bindings

Conversation

@pierrebai-adsk

Copy link
Copy Markdown
Collaborator

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.

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.
  • Added CollectionMaterialCustomControl sub-class that implements all the functions for collection-based material 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.

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
pierrebai-adsk force-pushed the bailp/EMSUSD-3260/collection-material-bindings branch from 41d936a to 5835e74 Compare August 11, 2026 14:49

@AramAzhari-adsk AramAzhari-adsk left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@pierrebai-adsk pierrebai-adsk added the ready-for-merge Development process is finished, PR is ready for merge label Aug 11, 2026
@seando-adsk
seando-adsk merged commit 9f284cd into dev Aug 12, 2026
12 checks passed
@seando-adsk
seando-adsk deleted the bailp/EMSUSD-3260/collection-material-bindings branch August 12, 2026 16:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

materials ready-for-merge Development process is finished, PR is ready for merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants