GithubHelp home page GithubHelp logo

ian-m-carr / xplane2blender Goto Github PK

View Code? Open in Web Editor NEW

This project forked from x-plane/xplane2blender

2.0 2.0 0.0 54.59 MB

Scenery & Aircraft export addon for Blender and X-Plane

License: GNU General Public License v3.0

Python 99.59% Rich Text Format 0.41%

xplane2blender's People

Contributors

amyinorbit avatar bsupnik avatar cristiano-maggi avatar danhedron avatar demetrix76 avatar der-on avatar farukeroglu2048 avatar jasongilholme avatar kant avatar kbrandwijk avatar outbaacker avatar tngreene avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

xplane2blender's Issues

Import issue with absolute/relative paths

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?

File extension handling too strict

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.

newbie help with fork merge for the importer modules.

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.