Skip to content
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

[BUGFIX] Do not set orientation based on file ext if default attributes provided, overrides default config for orientation. #1439

Merged

Conversation

jturner65
Copy link
Contributor

Motivation and Context

This PR fixes an issue when someone loads an asset with a particular extension that we have hardcoded internally to have a certain orientation (for backwards compatibility). If the desired asset does not have that orientation, it is impossible to set the orientation via default attributes settings in scene dataset configuration file.

This fix is a stopgap measure for now, and should work mostly, but the only foolproof solution to this is going to be getting rid of the hardcoded asset setting based on extension. As we get more dataset assets, we cannot assume anything orientation-wise about assets solely on their extension. To do this, we need to rework the tests to use config-backed assets.

How Has This Been Tested

Locally c++ and python.

Types of changes

  • Docs change / refactoring / dependency upgrade
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have completed my CLA (see CONTRIBUTING)
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@facebook-github-bot facebook-github-bot added the CLA Signed Do not delete this pull request or issue due to inactivity. label Aug 13, 2021
@@ -164,7 +164,8 @@ StageAttributes::ptr StageAttributesManager::initNewObjectInternal(
// copy
StageAttributes::ptr newAttributes =
this->constructFromDefault(attributesHandle);
if (nullptr == newAttributes) {
bool createNewAttributes = (nullptr == newAttributes);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
bool createNewAttributes = (nullptr == newAttributes);
const bool createNewAttributes = (nullptr == newAttributes);

@jturner65 jturner65 merged commit b9175f7 into facebookresearch:master Aug 13, 2021
@jturner65 jturner65 deleted the BUGFIX_stageDefaultsBasedOnExt branch August 13, 2021 22:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed Do not delete this pull request or issue due to inactivity.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants