Skip to content
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

Merged
merged 1 commit into from
Apr 24, 2024

Conversation

pierrebai-adsk
Copy link
Collaborator

  • 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.
@pierrebai-adsk pierrebai-adsk added the adsk Related to Autodesk plugin label Apr 23, 2024
@pierrebai-adsk pierrebai-adsk self-assigned this Apr 23, 2024
@pierrebai-adsk
Copy link
Collaborator Author

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):
Copy link
Collaborator Author

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'])

Copy link
Collaborator Author

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.

@pierrebai-adsk pierrebai-adsk added the ready-for-merge Development process is finished, PR is ready for merge label Apr 24, 2024
self.item.path().segments[0],
ufe.PathSegment(fromPath, mayaUsd.ufe.getUsdRunTimeId(), '/')])
ufePathStr = ufe.PathString.string(ufePath)
melCommand = 'updateAE "%s"' % ufePathStr
Copy link
Collaborator

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!

@neilh-adsk neilh-adsk added the workflows Related to in-context workflows label Apr 24, 2024
@neilh-adsk neilh-adsk merged commit 55dc7d8 into dev Apr 24, 2024
11 checks passed
@neilh-adsk neilh-adsk deleted the bailp/EMSUSD-204/material-strength-AE branch April 24, 2024 20:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
adsk Related to Autodesk plugin ready-for-merge Development process is finished, PR is ready for merge workflows Related to in-context workflows
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants