-
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
MAYA-127758 add edit routing for attributes #2951
Conversation
pierrebai-adsk
commented
Mar 17, 2023
- Add a helper funtion to restore all edit routers to their default.
- Add a getAttrEditRouterLayer helper function to route attribute editions.
- The routing operation for attribute is named... 'attribute'
- It receives the attribute name in the routing context under the 'attribute' key.
- Add the routing operation name in the routing context under the 'operation' key.
- Declare tokens used in edit routing globally.
- This avoid typos and avoid creating them on each call.
- Use attribute routing in UFE Object3d setVisibility implementation.
- Use attribute routing in UFE attribute holder inplementation for setMetadata, set, clearMetadata.
- Use routed layer when checking editability.
- Allow cancelling routed operations by throwing an exception.
- Add unit tests for attribute routing.
- Add a unit test for canceling a command from within an edit router
- Add a helper funtion to restore all edit routers to their default. - Add a getAttrEditRouterLayer helper function to route attribute editions. - The routing operation for attribute is named... 'attribute' - It receives the attribute name in the routing context under the 'attribute' key. - Add the routing operation name in the routing context under the 'operation' key. - Declare tokens used in edit routing globally. - This avoid typos and avoid creating them on each call. - Use attribute routing in UFE Object3d setVisibility implementation. - Use attribute routing in UFE attribute holder inplementation for setMetadata, set, clearMetadata. - Use routed layer when checking editability. - Allow cancelling routed operations by throwing an exception. - Add unit tests for attribute routing. - Add a unit test for canceling a command from within an edit router
// | ||
// clang-format off | ||
#define MAYA_USD_EDIT_ROUTING_TOKENS \ | ||
/* Tokens shared by multiple edit routers */ \ |
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.
I took the time to declare the edit routing tokens to avoid typos in the future. This means some existing code changed to use these new declaration, related to cache-to-USD for example. That is why there are more file changed then just the new router.
@@ -26,6 +27,22 @@ using namespace boost::python; | |||
|
|||
namespace { | |||
|
|||
std::string handlePythonException() | |||
{ |
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 extract the exception text to be able to log it in Maya.
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.
Looks good
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.
Good work. Thanks for putting all those hard-coded values into tokens.
4e4f086