Board index FlightGear Development

Blender 2.6 AC3D Importer & Exporter

FlightGear is opensource, so you can be the developer. In the need for help on anything? We are here to help you.
Forum rules
Core development is discussed on the official FlightGear-Devel development mailing list.

Bugs can be reported in the bug tracker.

Re: Blender 2.6 AC3D Importer & Exporter

Postby hvengel » Thu Jun 05, 2014 3:36 pm

This exchange is a perfect illustration of what I was trying to get at above in the post just before this exchange. I have no problems with the script failing if some object is not textured but it should do this in a graceful way that gives the user some feed back about what just happened. If the script had displayed a message box saying something like:

The export was terminated because one or more objects selected for export is not fully textured.


gooneybird would not have had to come here for help and would have known what to do. Even better would be a message like this:

"The export was terminated because the following objects selected for export are not fully textured.

Object1
Object2
Object3


This would allow the user to focus in very quickly on what needs to be done to get the export working.

It is very poor UI design to allow something to fail with such poor feedback to the user particularly when the error is caused by something the user did or, like this case, didn't do. I know that other Blender export and import scripts give feedback in a user friendly way (IE. message boxes that describe the issue in user terms). So it is possible to create the needed UI elements and make this a little more user friendly.

Also I have seen at least a half dozen similar posts where users are asking about this and there are probably more than that. One of those posts was from me when I ran into this issue the first time. So this indicates that this is a common issue for users.

I am in the process of UV mapping a very complex model (about 220 objects) and on a regular basis I select the UV mapped objects and export them so I can have a look at things in FlightGear. Yesterday evening I ran into this issue when I unintentionally selected an internal object that had not yet been UV mapped for export. Since I knew what the error was about I was able to correct my selection and do the export but it still caused more disruption then it would have with better feedback and if I was new to this I would have been more or less stuck with no idea how to correct the issue because what output there is when this happens is more or less meaningless to users.

It is obvious that the script fails at line 155 with an "AttributeError: 'NoneType' object has no attribute 'data'" so all that needs to happen is to add a check just before line 155 to see if the Attribute is OK and if not pop up a message and when the message is dismissed close the script. Someone who knows python could probably create a fix for this in a matter of minutes.
hvengel
Retired
 
Posts: 1127
Joined: Sun Dec 24, 2006 4:35 am
Location: Minden Nevada

Re: Blender 2.6 AC3D Importer & Exporter

Postby gooneybird » Thu Jun 05, 2014 3:39 pm

Problem solved :D

It was the transparent objects, canopy and lamps, they were not uv mapped, once they were mapped to a non texture everything exported ok.
Now I can proceed with things, until the next problem arises.

Thanks for the help.
gooneybird
 
Posts: 3011
Joined: Sat May 31, 2008 1:57 pm

Re: Blender 2.6 AC3D Importer & Exporter

Postby gooneybird » Thu Jun 05, 2014 4:04 pm

hvengel wrote in Thu Jun 05, 2014 3:36 pm:If the script had displayed a message box saying something like:

The export was terminated because one or more objects selected for export is not fully textured.


gooneybird would not have had to come here for help and would have known what to do. Even better would be a message like this:

"The export was terminated because the following objects selected for export are not fully textured.

Object1
Object2
Object3


This would allow the user to focus in very quickly on what needs to be done to get the export working.


Just a simple thing like this would have saved me hours of work. As the imported texture and model appeared to be ok I naturally assumed the problem lay with the objects that I was working on and not the untouched parts of the model, I'll know different next time.

It is obvious that the script fails at line 155 with an "AttributeError: 'NoneType' object has no attribute 'data'" so all that needs to happen is to add a check just before line 155 to see if the Attribute is OK and if not pop up a message and when the message is dismissed close the script. Someone who knows python could probably create a fix for this in a matter of minutes.


I would be eternally grateful, and probably many others too, If someone could create a fix for this.
gooneybird
 
Posts: 3011
Joined: Sat May 31, 2008 1:57 pm

Re: Blender 2.6 AC3D Importer & Exporter

Postby arb65912 » Fri Dec 12, 2014 1:06 am

helijah wrote in Wed Jun 04, 2014 10:33 pm:Hi gooneybird

I use always the same script since a long time : http://helijah.free.fr/blender/io_scene_ac.tar.gz

With Blender 2.70a (and I have tested on Blender 2.71 prebuild :) ) without problem.

Regards Emmanuel


Hello,

This is my first post so please be patient with me.

Helijah, I was looking for that script totally in the blind.

By accident, I have ran on your reply.

I made a very quick test and it works great ( as far as I can tell as a newbie) in Blender 2.71

I am just curios, did you edited the original script?
I tested it and no luck in version 2.71

I would like o send you PM but I guess I am too new here to do anything but reply.

Maybe after few replies I will be able to.

This is my lucky day.

Thank you.

Cheers, AJ :D
arb65912
 
Posts: 6
Joined: Fri Dec 12, 2014 12:39 am

Re: Blender 2.6 AC3D Importer & Exporter

Postby ZA-4U2 » Wed Feb 04, 2015 6:51 am

Can anyone confirm wether the import and export scripts work with Blender 2.73.

I have tried both version of the script and they give me errors both when importing and exporting.
Screen shots of the errors when importing are linked to here
https://www.dropbox.com/s/y752tivn3eqrufv/AC3D-Import-error.jpg?dl=0
https://www.dropbox.com/s/7ye7gxan71ajmco/AC3D-Import-error-02.jpg?dl=0

The first was for a model exported from SketchUp and the second for a model from the Aircraft directory.

System is running Windows 7 SP1
and of course Blender 2.73
ZA-4U2
 
Posts: 4
Joined: Thu Jan 15, 2015 6:20 am
Location: South Africa
Callsign: ZA-4U2
Version: 3.4
OS: Windows 7

Re: Blender 2.6 AC3D Importer & Exporter

Postby helijah » Wed Feb 04, 2015 8:16 am

ZA-4U2 wrote in Wed Feb 04, 2015 6:51 am:Can anyone confirm wether the import and export scripts work with Blender 2.73.


Hi ZA-4U2

I just tested with Blender 2.73a without any problems (Import and Export)

The mistakes you watches are a classic. The .ac used are just poorly designed.

Some rules known but sometimes forgotten.

1 - All objects MUST necessarily have a definition UV Map. The assignment of a texture is not mandatory

2 - Using groups, multiples "materials" are discouraged.

Regards Emmanuel

P.S. Test the import with the Sikorsky S-38 for example (in my hangar or on SVN). You will see that the import and Export works perfectly :)
Some planes (and other) for FlightGear
http://helijah.free.fr
and
http://embaranger.free.fr
User avatar
helijah
 
Posts: 1109
Joined: Wed Dec 27, 2006 12:35 pm
Location: Chartres (France)
Callsign: helijah
IRC name: helijah
Version: GIT
OS: GNU/Linux

Re: Blender 2.6 AC3D Importer & Exporter

Postby helijah » Wed Feb 04, 2015 8:20 am

arb65912 wrote in Fri Dec 12, 2014 1:06 am:I would like o send you PM but I guess I am too new here to do anything but reply.


Hi arb65912

New or old does not change anything :) If you write in PM (or via my email address available in the ReadMe.txt file in all my models), you will receive a reply from me :)

Regards Emmanuel
Some planes (and other) for FlightGear
http://helijah.free.fr
and
http://embaranger.free.fr
User avatar
helijah
 
Posts: 1109
Joined: Wed Dec 27, 2006 12:35 pm
Location: Chartres (France)
Callsign: helijah
IRC name: helijah
Version: GIT
OS: GNU/Linux

Re: Blender 2.6 AC3D Importer & Exporter

Postby Gijs » Wed Feb 04, 2015 9:16 am

arb65912 wrote in Fri Dec 12, 2014 1:06 am:I would like o send you PM but I guess I am too new here to do anything but reply.

Maybe after few replies I will be able to.
Just one is what you need. Welcome! ;-)
Airports: EHAM, EHLE, KSFO
Aircraft: 747-400
User avatar
Gijs
Moderator
 
Posts: 9353
Joined: Tue Jul 03, 2007 2:55 pm
Location: Delft, the Netherlands
Callsign: PH-GYS
Version: Git
OS: Windows 10

Re: Blender 2.6 AC3D Importer & Exporter

Postby Catalanoic » Wed Feb 25, 2015 8:44 pm

HI!! How can i install this plugin on Blender 2.72? I downloaded the folder with python the scripts from the first post and copied it to C:/Programs Files/Blender/2.72/scripts/ folder but i can't see any .ac option on Import/Export menu. Thankyou!!
User avatar
Catalanoic
 
Posts: 1075
Joined: Mon Mar 05, 2012 12:33 am
Location: Barcelona (LEBL)
Callsign: Catalanoic
Version: 2017.3
OS: Lubuntu/Windows 7

Re: Blender 2.6 AC3D Importer & Exporter

Postby PH-JAKE » Thu Feb 26, 2015 7:17 am

Catalanoic wrote in Wed Feb 25, 2015 8:44 pm:HI!! How can i install this plugin on Blender 2.72? I downloaded the folder with python the scripts from the first post and copied it to C:/Programs Files/Blender/2.72/scripts/ folder but i can't see any .ac option on Import/Export menu. Thankyou!!

I think you've missed some details, see this article for more info.
PH-JAKE
 
Posts: 149
Joined: Tue Mar 11, 2014 11:53 pm
Callsign: PH-JAKE
Version: 2020.3.4
OS: Debian bullseye

Re: Blender 2.6 AC3D Importer & Exporter

Postby Catalanoic » Thu Feb 26, 2015 7:08 pm

PH-JAKE wrote in Thu Feb 26, 2015 7:17 am:
Catalanoic wrote in Wed Feb 25, 2015 8:44 pm:HI!! How can i install this plugin on Blender 2.72? I downloaded the folder with python the scripts from the first post and copied it to C:/Programs Files/Blender/2.72/scripts/ folder but i can't see any .ac option on Import/Export menu. Thankyou!!

I think you've missed some details, see this article for more info.

It worked! Thankyou so much!! I haven't found any information of this script on our FG Wiki (only external links), maybe someone can write about this (like the sketchup addon for the .ac converter). For Win 7 users maybe need to create the following folders \scripts\addons on C:\Users\%username%\AppData\Roaming\Blender Foundation\Blender\(VERSION OF YOUR BLENDER)\ because they were missing on my system, or creating a personnal folder containing the new addons and make Blender to recognize it.

Chao!
User avatar
Catalanoic
 
Posts: 1075
Joined: Mon Mar 05, 2012 12:33 am
Location: Barcelona (LEBL)
Callsign: Catalanoic
Version: 2017.3
OS: Lubuntu/Windows 7

Re: Blender 2.6 AC3D Importer & Exporter

Postby Catalanoic » Thu Feb 26, 2015 7:19 pm

I have the same loading problems that ZA-4U2 had reported, but i've imported models with and without material groups and the same problem persists. How can i load them in Blender? I don't have any UV maps on my .ac models, how can i made them easily? Thanks!
User avatar
Catalanoic
 
Posts: 1075
Joined: Mon Mar 05, 2012 12:33 am
Location: Barcelona (LEBL)
Callsign: Catalanoic
Version: 2017.3
OS: Lubuntu/Windows 7

Re: Blender 2.6 AC3D Importer & Exporter

Postby ZA-4U2 » Thu Feb 26, 2015 8:46 pm

Hi Emmanuel

Been busy since you posted your reply to my question about blender 2.73 and the import/export scripts.

I can confirm it does work but it was blackbox magic as I have no idea how it went from not working to working other than perhaps that I did a shutdown in between.

Regard
Alan
ZA-4U2
 
Posts: 4
Joined: Thu Jan 15, 2015 6:20 am
Location: South Africa
Callsign: ZA-4U2
Version: 3.4
OS: Windows 7

Re: Blender 2.6 AC3D Importer & Exporter

Postby Catalanoic » Sat Feb 28, 2015 10:43 am

This don't works on Blender 2.73a 32 bits version with Win7.
User avatar
Catalanoic
 
Posts: 1075
Joined: Mon Mar 05, 2012 12:33 am
Location: Barcelona (LEBL)
Callsign: Catalanoic
Version: 2017.3
OS: Lubuntu/Windows 7

Re: Blender 2.6 AC3D Importer & Exporter

Postby helijah » Sun Mar 01, 2015 8:51 pm

Catalanoic wrote in Sat Feb 28, 2015 10:43 am:This don't works on Blender 2.73a 32 bits version with Win7.


Oh, there are still people to use Win? condolences lol

Regards Emmanuel
Some planes (and other) for FlightGear
http://helijah.free.fr
and
http://embaranger.free.fr
User avatar
helijah
 
Posts: 1109
Joined: Wed Dec 27, 2006 12:35 pm
Location: Chartres (France)
Callsign: helijah
IRC name: helijah
Version: GIT
OS: GNU/Linux

PreviousNext

Return to Development

Who is online

Users browsing this forum: No registered users and 2 guests