ian-m-carr / xplane2blender Goto Github PK
View Code? Open in Web Editor NEWThis project forked from x-plane/xplane2blender
Scenery & Aircraft export addon for Blender and X-Plane
License: GNU General Public License v3.0
This project forked from x-plane/xplane2blender
Scenery & Aircraft export addon for Blender and X-Plane
License: GNU General Public License v3.0
Originally posted here: X-Plane#728 (comment)
Issue:
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.
@ian-m-carr's reply:
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)
Continuation:
Blend file path:
/home/[username]/untitled.blend
Imported file path:
/media/X-Plane/X-Plane_12_Main/Aircraft/AddOn_Aircraft/B737-800X/objects/rain_glass.obj
How many importer infrastructure changes would be required to get rid of the "must be the same hierachy" requirement?
Originally posted here: X-Plane#728 (comment)
Issue:
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.
@ian-m-carr's reply:
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!
Continuation:
Strict extension handling either requires converting the textures of the model to be imported into the required format or editing the OBJ file with a text editor and thus adds another step to the process.
Sticking to the standard supplied by X-Plane since release 11 (?), i.e. agnosticism towards file extensions in the OBJ file as long as they are in a supported format - DDS or PNG is preferable for me.
Hello mate. I am sorry if my request is so basic.
I am fairly new to the use of GitHub and git so I have no idea how this works. I am trying to get your branch of the importer into the plugin but I have not been successful.
What I am doing so far is downloading the .zip of your branch and just replacing the files from the .zip in the plugin directory of io_xplane2blender.
I am adding it to the original 4.2.0 alpha release which had the last "official" importer in Blender 2.93 and adding it to the latest 4.2.0 rc 3 in Blender 4.0 but I have not been able to make it work. I am getting errors of installation.
If you can help me with what I need to do to try your importer it will be great.
Thank you in advance.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.