-
Notifications
You must be signed in to change notification settings - Fork 201
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
EMSUSD-204 Material binding strength in AE #3736
Conversation
pierrebai-adsk
commented
Apr 23, 2024
- Move the custom control class to its own file.
- Add an option menu to control the material binding strength in the attribute editor (AE).
- Change the binding strength when the user select a new value in the option menu.
- Hide the menu when the material in inherited and there is no direct material.
- Disable the menu when there is a stronger inherited material and a direct material.
- Show a tooltip that explain why it is disabled.
- Update children when material strength is changed.
- Don't change selection when going to the prim from which the material in inherited.
- Don't use italics.
- Move the custom control class to its own file. - Add an option menu to control the material binding strength in the attribute editor (AE). - Change the binding strength when the user select a new value in the option menu. - Hide the menu when the material in inherited and there is no direct material. - Disable the menu when there is a stronger inherited material and a direct material. - Show a tooltip that explain why it is disabled. - Update children when material strength is changed. - Don't change selection when going to the prim from which the material in inherited. - Don't use italics.
Note: the custom control class does not derive from AttributeCustomControl because it does not handle UFE attributes but "generated" data derived from the material assignment. It does not need any of the function provided by that base class. |
@@ -127,119 +127,6 @@ def onReplace(self, *args): | |||
# Nothing needed here since we don't create any UI. | |||
pass | |||
|
|||
class MaterialCustomControl(object): |
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.
Moved to its own file
self.strengthMenu = self._createDropDownField( | ||
'strength', 'kLabelMaterialStrength', | ||
['kLabelWeakerMaterial', 'kLabelStrongerMaterial']) | ||
|
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.
The class was moved from the other file, the only changes are about this strength option menu, most of the code is unchanged.
self.item.path().segments[0], | ||
ufe.PathSegment(fromPath, mayaUsd.ufe.getUsdRunTimeId(), '/')]) | ||
ufePathStr = ufe.PathString.string(ufePath) | ||
melCommand = 'updateAE "%s"' % ufePathStr |
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.
Another important change is using updateAE
here instead of cmds.select
. Thanks!