-
Notifications
You must be signed in to change notification settings - Fork 203
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-123462 usdEditAsMaya set doesn't disappear when cancelling editi… #2397
Conversation
…ng as Maya Fix crash related to unsupported !invert! + remove duplicated declaration of Bool
@@ -120,9 +132,11 @@ Ufe::Attribute::Ptr UsdAttributes::attribute(const std::string& name) | |||
}; | |||
|
|||
#undef ADD_UFE_USD_CTOR | |||
auto ctorIt = ctorMap.find(newAttrType); |
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.
Avoid crash when type is not found like it was before.
@@ -108,7 +121,6 @@ Ufe::Attribute::Ptr UsdAttributes::attribute(const std::string& name) | |||
ADD_UFE_USD_CTOR(Float3), | |||
ADD_UFE_USD_CTOR(Double3), | |||
ADD_UFE_USD_CTOR(Generic), | |||
ADD_UFE_USD_CTOR(Bool), |
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.
Bool was added twice.
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 to me.
lib/mayaUsd/ufe/UsdAttributes.cpp
Outdated
{ | ||
PXR_NS::TfToken tok(name); | ||
bool isInverseOp = _IsInverseOp(tok); | ||
static size_t invertPrefixLen = strlen(invertPrefix); |
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 rather like
static constexpr size_t invertPrefixLen(sizeof(invertPrefix)/sizeof(invertPrefix[0]));
for fully const strings.
…ng as Maya
Fix crash related to unsupported !invert!