Skip to content

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

Merged
jturner65 merged 1 commit intofacebookresearch:masterfrom
jturner65:BUGFIX_stageDefaultsBasedOnExt
Aug 13, 2021
Merged

[BUGFIX] Do not set orientation based on file ext if default attributes provided, overrides default config for orientation.#1439
jturner65 merged 1 commit intofacebookresearch:masterfrom
jturner65:BUGFIX_stageDefaultsBasedOnExt

Conversation

@jturner65
Copy link
Copy Markdown
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
StageAttributes::ptr newAttributes =
this->constructFromDefault(attributesHandle);
if (nullptr == newAttributes) {
bool createNewAttributes = (nullptr == newAttributes);
Copy link
Copy Markdown
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.

3 participants