Open MickCrozier opened 1 year ago
I have the exact same issue Blender 3.5, Windows 11
Are you guys using the feature branch with the importer code? There is no importer in the master branch code, It's an "experimental" feature as noted in the readme
I am using the latest release XPlane2Blender v4.2.0-rc-3 and installed from the zip file in the addons manager as instructed here in the wiki
The release versions do not contain the importer functionality, it's on the feature branch, check out init.py from master, no import registered:
def register():
xplane_export.register()
xplane_props.register()
xplane_ops.register()
xplane_ops_dev.register()
xplane_ui.register()
bpy.types.TOPBAR_MT_file_export.append(menu_func)
from the feature branch:
def register():
xplane_export.register()
xplane_import.register()
xplane_props.register()
xplane_ops.register()
xplane_ops_dev.register()
xplane_ui.register()
bpy.types.TOPBAR_MT_file_export.append(menu_func_export)
bpy.types.TOPBAR_MT_file_import.append(menu_func_import)
Thanks Ian.
Clear as mud. The readme says "An experimental importer has been added in 4.2.0-Alpha 1 and can be found here: https://github.com/X-Plane/XPlane2Blender/releases/tag/v4.2.0-alpha.1". One assumes it's also in the releases that follow.
Mike -
Would that were true, but I suspect not.
I may be wrong, but I think the driving force behind the creation of the Import function is no longer with Laminar.
That’s unfortunate, as the capability is very educational, as it provides a way to see and understand how other aircraft builders have done things.
Plane Maker is also long overdue for a major overhaul.
-df
On May 3, 2023, at 6:10 PM, Mick Crozier @.***> wrote:
Thanks Ian.
Clear as mud. The readme says "An experimental importer has been added in 4.2.0-Alpha 1 and can be found here: https://github.com/X-Plane/XPlane2Blender/releases/tag/v4.2.0-alpha.1 https://github.com/X-Plane/XPlane2Blender/releases/tag/v4.2.0-alpha.1". One assumes it's also in the releases that follow.
— Reply to this email directly, view it on GitHub https://github.com/X-Plane/XPlane2Blender/issues/728#issuecomment-1533902684, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABYAPEXMS6UK7L4PKWNU5WDXELXX7ANCNFSM6AAAAAAXQWK4DU. You are receiving this because you are subscribed to this thread.
Yeah, I was surprised myself, seemed to be in 4.2.0-alpha1, then moved out into the feat-importer branch, and was not present in 4.2.0-rc.1 and forward.
I forked (public) the feat-import branch and did some additional work on my copy to import a little more of the content, and have a version which works for me, round trips a cockpit OK. If you have some python/blender experience you should be able to get something working, but from my experience the importer code in this repository isn't 'complete' or 'final'.
I ended up installing the alpha just to see if it was worth trying the same thing as yourself. But it didn't import the objects at all. Maybe something I'm doing wrong, but not critcial. Ultimatley I was trying to import so I could paint liveries in a 3D envioronment with ArmourPaint. Sadly none of the other importers available are working properly either :(
@MickCrozier Not sure what issues you hit, but it's probably worth saying that the code from the repository worked at blender version 2.8.3 but required updates to work correctly in later versions particularly the 3.x releases of Blender (API changes and python version differences). The earlier versions of Blender remain available, downloading a 2.8.3 and trying may resolve some of your problems?
@ian-m-carr - I've resorted to having two versions of Blender on my system and using 2.93 with the 4.2.0 version of the Import-Export Add-on. Unfortunately, my coding skills are very limited, so I'm not going to be much help beyond testing. I'm under the impression that Ted Green has moved on and Ben isn't interested in continuing to develop the capability. That's really unfortunate, as its very useful for budding aircraft developers and aircraft rennovators.
@ian-m-carr Your fork is great, thank you!
I found these two bugs (posting them here because forks don't seemm to support issue tracking):
Only the literal texture filename in OBJ files is supported. E.g. if an OBJ file says "738fuselage_LIT.png", but only the equivalent "738fuselage_LIT.dds" is pressent in the folder, the importer will throw an error and quit. X-Plane looks for both PNG and DDS files with a given file name in an OBJ file, so it'd be nice if the importer could do this as well.
Opening a Blend file and then trying to import an object always end sin this error:
File "/home/[username]/.config/blender/4.0/scripts/addons/io_xplane2blender/xplane_import.py", line 63, in execute
x = xplane_imp_parser.import_obj(self.filepath)
File "/home/[username]/.config/blender/4.0/scripts/addons/io_xplane2blender/importer/xplane_imp_parser.py", line 91, in import_obj
relpath = Path(filepath).relative_to(Path(bpy.data.filepath).parent)
File "/media/X-Plane/X-Plane_Utilities/blender-4.0.1-linux-x64/4.0/python/lib/python3.10/pathlib.py", line 818, in relative_to
raise ValueError("{!r} is not in the subpath of {!r}"
ValueError: '/media/X-Plane/X-Plane_12/Aircraft/AddOn_Aircraft/B737-800X/objects/738fuselage.obj' is not in the subpath of '/home/[username]' OR one path is relative and the other is absolute.
The only thing I can do then is restart blender and importing into an empty Blender file.
@JT8D-17 Sorry, I had not enabled the issues list on the fork. It should be there now. But to address your points: 1) Yeah, I can take a look at it, but I am not sure I like the original behaviour :-) I think I prefer requiring the right extension! 2) The importer requires the blender file to be in the same heirarchy as the obj files it is importing. Looks from your error that this was not the case. Can you open an issue on the fork, and tell me the paths 1: to the blend file (must have been saved!) and 2: to the obj file you are importing (must be a path below the blend location, I often use a symbolic link or windows junction to arrange to have the aircraft folder appear below the blender modelling folder)
Blender 3.2 MacOS 13.3.1 Installed 4.2.0 rc3
Addon has loaded - I can see X-Plane Export and all the x-plane properties. But Import is not there.
Is there a trick to enabling it?