-
Notifications
You must be signed in to change notification settings - Fork 210
Fix layer editor path display and optimize rebuild model #4174
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
base: dev
Are you sure you want to change the base?
Conversation
…et the real path whenever possible
// to be empty for a brief time. | ||
if (rowCount() > 0) | ||
removeRows(0, rowCount()); | ||
clear(); |
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.
Is this change required? Like the comments said, clear() would cause multiple notifications of changes to be sent and cause flickers. Any reason why changing it to call clear?
// Here we choose the identifier only if the layer is anonymous | ||
std::string layerPath{usdLayer->IsAnonymous() ? usdLayer->GetIdentifier() : | ||
usdLayer->GetRealPath()}; | ||
cmd += quote(layerPath); |
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.
For cases like this where the same pattern is ued multiple times, it is better to put it in a function to avoid the repetition. Maybe a function named getLayerPathForEditorCommand()
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.
Yes I agree a function would be better.
We did not make one because we didn't know where in the package it would be best defined.
There are two requests in this pull request: