Board index FlightGear Development Aircraft Cockpit development

Exporting to .ac format using the io_scene_ac3d addon files  Topic is solved

Discussion about creating 2d and 3d cockpits.

Exporting to .ac format using the io_scene_ac3d addon files

Postby skipper0802 » Mon Aug 06, 2018 8:56 pm

Greetings All,

I'm trying to modify a Blender file object (aircraft instrument) then export to an .ac file for use in Flightgear. Error script follows below. I've enabled the ac3d folder contents in separate attempts for the directory folders as such:

    /program files/blender foundation/blender/2.79/scripts/addons
      /program files/blender foundation/blender/2.79/scripts/addons_contrib

      I also tried enabling the addon within the Supported Level: Testing area

        Hardware: EliteBook 8770W laptop, Windows 10 Home, 10.0.17134, x64. Intel i7-3520M, 8GB ram, AMD Firepro M4000 1GB ram. 1920x1080x60 Hertz.
          Blender software: v2.79
            io_scene_ac3d folder contents: _ init _.py, AC3D.py, export_ac3d.py, import_ac3d.py

          When I try to export my Blender file to an .ac file format, I receive the following red-lined errors:

            Traceback (most recent call last):

              File "C:\Program Files\Blender Foundation\Blender\2.79\scripts\addons\io_scene_ac3d\__init__.py", line 266, in execute export_ac3d.ExportAC3D(self, context, **keywords)

                File "C:\Program Files\Blender Foundation\Blender\2.79\scripts\addons\io_scene_ac3d\export_ac3d.py", line 115, in __init__self.world.parse(self.ac_mats)

                  File "C:\Program Files\Blender Foundation\Blender\2.79\scripts\addons\io_scene_ac3d\AC3D.py", line 70, in parse child.parse(ac_mats, str_pre + ' ')

                    File "C:\Program Files\Blender Foundation\Blender\2.79\scripts\addons\io_scene_ac3d\AC3D.py", line 67, in parse self._parse(ac_mats, str_pre)

                      File "C:\Program Files\Blender Foundation\Blender\2.79\scripts\addons\io_scene_ac3d\AC3D.py", line 136, in _parse self._parseMesh(ac_mats)

                        File "C:\Program Files\Blender Foundation\Blender\2.79\scripts\addons\io_scene_ac3d\AC3D.py", line 141, in _parseMesh self._parseMaterials(mesh, ac_mats)

                          File "C:\Program Files\Blender Foundation\Blender\2.79\scripts\addons\io_scene_ac3d\AC3D.py", line 183, in _parseMaterials bl_im = bl_tex.image

                            AttributeError: 'NoneType' object has no attribute 'image'

                              location: <unknown location>:-1

                              I'm not familiar enough with the Python/C++ language to determine the cause of the error. Can anyone provide me some hints on how to fix/correct the export feature? Is this export error within Blender settings/config or is the error within the .py import-export files? (The content of this post is also listed on the Blender Stack Exchange for more exposure.)

                              Thanks in advance, Eric
                              V/r,
                              Eric
                              *******************************************************************
                              Intel Core i7-3520M CPU @ 2.9GHz, 16 GB RAM, 64-bit OS, x64-based processor
                              HP EliteBook 8770W
                              AMD FirePro M4000 1GB
                              Windows 10 Home
                              Flightgear 2018.2.2
                              skipper0802
                               
                              Posts: 24
                              Joined: Tue Apr 24, 2018 4:12 pm
                              Location: Seattle, Washington, USA
                              Callsign: 0802SK, skipper0802
                              Version: 2018.2.2
                              OS: Windows10 Home

                              Re: Exporting to .ac format using the io_scene_ac3d addon fi  

                              Postby ludomotico » Mon Aug 06, 2018 9:18 pm

                              AttributeError: 'NoneType' object has no attribute 'image'


                              This is the error.

                              Probably, you didn't assign a texture to an object or the plugin is looking for texture images in another directory. Check this thread: viewtopic.php?f=4&t=28551
                              User avatar
                              ludomotico
                               
                              Posts: 1269
                              Joined: Tue Apr 24, 2012 2:01 pm
                              Version: nightly
                              OS: Windows 10

                              Re: Exporting to .ac format using the io_scene_ac3d addon fi

                              Postby skipper0802 » Mon Aug 06, 2018 9:25 pm

                              Thanks ludomotico...checking it out...


                              Post-edit: the cause of the problem was the path (location) error. the new instrument is now rendering in the cockpit of my PC-21 :mrgreen:

                              Thanks very much!
                              V/r,
                              Eric
                              *******************************************************************
                              Intel Core i7-3520M CPU @ 2.9GHz, 16 GB RAM, 64-bit OS, x64-based processor
                              HP EliteBook 8770W
                              AMD FirePro M4000 1GB
                              Windows 10 Home
                              Flightgear 2018.2.2
                              skipper0802
                               
                              Posts: 24
                              Joined: Tue Apr 24, 2018 4:12 pm
                              Location: Seattle, Washington, USA
                              Callsign: 0802SK, skipper0802
                              Version: 2018.2.2
                              OS: Windows10 Home


                              Return to Cockpit development

                              Who is online

                              Users browsing this forum: No registered users and 0 guests