-
Notifications
You must be signed in to change notification settings - Fork 202
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-1570 add a class-prims filter to USD UFE #3987
Conversation
8c37fe1
to
25fcdea
Compare
25fcdea
to
30aaaaf
Compare
30aaaaf
to
5a880b7
Compare
FilterSettings = collections.namedtuple('FilterSettings', ['filters', 'expecteditems']) | ||
filterSettings = [ | ||
FilterSettings( | ||
filters={ 'InactivePrims': False, 'ClassPrims': False }, |
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.
This is my thinking, that a full list of possibilities may not be known in case there's a need to include all.
Perhaps we can document the supported filters somewhere to be used as a reference.
@pierrebai-adsk Removed the ready-for-merge just until my questions are answered. |
5a880b7
to
72fe93c
Compare
- Add a getUsdPredicate helper function to UsdUfe to create the USD predicate corresponding to a list of UFE filters. - Add the "Class Prims" filter to the list of USD filters in the hierarchy handler. - Use the helper to create the USD predicate. - Rely on the USD predicate having a correct predicate for inactive prim instead of using an explicit flag. - Adjust the context menu for class prims. - Add a unit test for the class prims filter. Work around the problem that Maya does not correctly handle UFE filters. Maya only handles one UFE filter. If there are more than one filters, only one is handled. To work around this issue, we manually ask the outliner what are the desired settings and use these settings as the default values for the filters. When the outliner fails to handle multiple filters, it will end-up using the default values, which will be the desired values. - Add a CMake compiler definition on the project. - The script to update the filter need to be protected from infinite recursion, no need to run it on idle. - Running it on idle would be making the filter new value not always being applied at the proper time. Easily visible when reload a scene.
72fe93c
to
22d2dd6
Compare
I believe I answered Sean's concerns, so I'll mark this a ready for merge. |
Work around the problem that Maya does not correctly handle UFE filters. Maya only handles one UFE filter. If there are more than one filters, only one is handled.
To work around this issue, we manually ask the outliner what are the desired settings and use these settings as the default values for the filters. When the outliner fails to handle multiple filters, it will end-up using the default values, which will be the desired values.