-
Notifications
You must be signed in to change notification settings - Fork 214
EMSUSD-946 axis in import UI and command #3925
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
Conversation
1153d34 to
ae19651
Compare
ae19651 to
47d7df5
Compare
- Add -upAxis (-upa) and -axisAndUnitMethod (-aum) flags to the base import command. - Document the new flags in the import command read-me file. - Add upAxis and axisAndUnitMethod tokens to the import job args tokens. - Add the rotateScale, addTransform and overwritePrefs tokens to the import job args token. - Add the upAxis and axisAndUnitMethod data to the UsdMayaJobImportArgs structure. - Handle parsing the new user args to build the UsdMayaJobImportArgs. - Expose the upAxis and axisAndUnitMethod data to Python. - Add the new UI related to upAxis and axisAndUnitMethod in the import UI. - Add documentation about how to add a new import or export option. Implement import rotation - Add axis conversion helper to the UsdMaya_ReadJob class. - Determine the Maya up-axis and USD up-axis. - Do nothing if they match. - Do nothing if the user requested to leave things as-is. - Otherwise either change the Maya prefs or rotate the root imported objects. - When rotating objects, group them under a group and rotate the group. - The ungroup them if the user did not want to keep the group. - Add original up axis attribute to the root nodes. - Report success or failure of axis conversion. Cleanup import code by refactoring into smaller functions to avoid code duplication. Add unit tests for all three methods.
47d7df5 to
d16663f
Compare
| _DoImportPrimIt(primIt, usdRootPrim, readCtx, primReaderMap); | ||
| } | ||
| } | ||
| _ImportPrimRange(range, usdRootPrim); |
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.
While in import, I refactor some code that was duplicated and moved the instance prototype cleanup to its own function for clarity.
| } | ||
| } | ||
|
|
||
| bool UsdMaya_ReadJob::_CleanupPrototypes(const UsdPrim& usdRootPrim) |
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.
Ignore whitespace difference will simplify the diff here. Most code is the same, just with one level less of indentation.
|
Nice work, thanks for adding the readme. |
Implement import rotation
Cleanup import code by refactoring into smaller functions to avoid code duplication.
Add unit tests for all three methods.