Skip to content

Draped normal map decal 1 causes objects to fail to export #744

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

Open
Connor-Russell opened this issue Feb 14, 2025 · 0 comments
Open

Draped normal map decal 1 causes objects to fail to export #744

Connor-Russell opened this issue Feb 14, 2025 · 0 comments

Comments

@Connor-Russell
Copy link

Summary:

When attempting to export an object that has the first draped normal map decal set, the export will fail due to xplane_header attempting to access a property that doesn't exist. This causes an error to be thrown, and the export stopped (see error below).

I have fixed this issue in my own fork of the repository, and plan to create a pull request.

Cause:

On line 765 of xplane_header.py, the property self.xplaneFile.draped_normal_decal1_projected is accessed, which does not exist. The correct property is in self.xplaneFile.options.draped_normal_decal1_projected. This appears to be a simple typo. Changing the line to access the correct property resolves the issue, exporting the object correctly.

System Information:

Operating System: Windows 11
Blender Version: 3.6.0 (Windows, x64)

Reproduction Steps:

  • Create a blender file and save it.
  • Create a basic exportable collection (single cube and material is fine)
  • Set "Draped normal map detail texture 1" file path to anything but empty.
  • The export will always fail with the below error. This is the only decal field that throws this error

Error:

Error thrown to Blender Console:
Traceback (most recent call last): File "C:\Users\cmrbu\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\io_xplane2blender\xplane_export.py", line 107, in execute if not self._writeXPlaneFile(xplaneFile, export_directory): File "C:\Users\cmrbu\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\io_xplane2blender\xplane_export.py", line 217, in _writeXPlaneFile out = xplaneFile.write() File "C:\Users\cmrbu\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\io_xplane2blender\xplane_types\xplane_file.py", line 796, in write o += self.header.write() File "C:\Users\cmrbu\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\io_xplane2blender\xplane_types\xplane_header.py", line 1129, in write self._init() File "C:\Users\cmrbu\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\io_xplane2blender\xplane_types\xplane_header.py", line 765, in _init if self.xplaneFile.draped_normal_decal1_projected: AttributeError: 'XPlaneFile' object has no attribute 'draped_normal_decal1_projected'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant