GithubHelp home page GithubHelp logo

x-plane / xplane2blender Goto Github PK

View Code? Open in Web Editor NEW
197.0 197.0 67.0 54.44 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%
addon blender python x-plane

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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

xplane2blender's Issues

No objects to export, aborting...

Try to export standard cube. Blender version 32340, Mac OSX 10.6.4

  1. File -> Export -> XPlane object
  2. File directory opens.
  3. File name same as blend file
  4. Change name to .obj
  5. Nothing created.

Console says:
scanning Cube
No objects to export, aborting...

Add support for face modes

XPlaneCommands should handle those together with XPlaneFaces in a way that minimum state changes and a minimum of "TRIS" commands is required

Face modes include:

  • ATTR_hard Hard Polygon On
  • ATTR_no_hard Hard Polygon Non-Off*
  • ATTR_shade_flat Shading Flat
  • ATTR_shade_smooth Shading Smooth*
  • ATTR_no_depth Depth Check Off
  • ATTR_depth Depth Check On*
  • ATTR_no_cull Two-Sided Geometry Two-sided
  • ATTR_cull Two-Sided Geometry One-sided*
  • ATTR_no_blend Blending Off
  • ATTR_blend Blending On*
  • ATTR_solid_camera Camera plane Enable
  • ATTR_no_solid_camera Camera plane Disable*
  • ATTR_draw_enable Draw plane Enable*
  • ATTR_draw_disable

Slowly and Worng Polys

Hello, when I export from Blender 2.55, the plugin take a lot of time to build the objects (about 15 minutes) and the .obj have problems with normals direction and a lot of wrong polys. I'm using the Nov 18 plugin version

MacOS cannot export.

Traceback (most recent call last):
File "/Applications/darwin-x86_64/blender_31671.app/contents/MacOS/2.53/scripts/addons/io_xplane2blender/xplane_export.py", line 501, in invoke
wm = context.window_manager
AttributeError: 'Context' object has no attribute 'window_manager'

Dataref search popup

Add a button to each Dataref-input that opens up a Popup where you can search for datarefs by path or description. When clicking on a path there it will be pasted into the dataref-input-

Error during cockpit Export

My Concorde_cockpit_OUT.blend gets stuck during export using Blender 2.48a and xp2b script 3.10 at this line:

        #Ondrej: Set cockpit Attribute depending on Texture used in uv-face
        elif hasPanelTexture:
            self.file.write("%sATTR_cockpit\n" % self.anim.ins())
        elif self.iscockpit:
            self.file.write("%sATTR_no_cockpit\n" % self.anim.ins())

The line highlighted was "elif hasPanelTexture:"

There is no panel texture assigned that I know of.

Usingy this trick with the 747 wing flex attempt I get this:
# Need to unset resting position of parent armature
object.getData().restPosition=False
# But grandparent armature (if any) need to be resting, since
# getMatrix('localspace') doesn't account for rotation due to pose
a=object.parent
while a:
a.getData().restPosition=True
a=a.parent

Where "a.getData().restPosition=True" is the line highlighted.

Export Layers instead of Empties

in Scene - Tab there should be all 20 Layers listed within X-Plane Panel as collapsibles and they should contain the X-Plane export functionality currently found in Empties.

When exporting all visible Layers from the current scene should be taken for export.

bpy.context.blend_data not available in Mac OS

Traceback (most recent call last):
File "/Applications/darwin-x86_64/blender_31671.app/contents/MacOS/2.53/scripts/addons/io_xplane2blender/xplane_export.py", line 467, in execute
filepath = bpy.context.blend_data.filepath
AttributeError: 'Context' object has no attribute 'blend_data'

Support for custom Attributes/Commands

Empties, Faces, Lamps and Materials should allow custom Xplane commands/attributes that will be written as-is into the OBJ-File using XPlaneCommands or in case of the Empty XPlaneHeader

Materials with no texture or no UV mapping

WIll cause no UV coordinates to be exported at all. This is coming from the old style of texture handling. Solution is to get the UV-texture of a blender object independent from the texture and ignore the material texture at all.

Assign Datarefs to Bones

This must be possible. So Instead of bones using the datarefs from the armature, make it possible to assign datarefs to each bone within the bone-tab.

Dataref keyframes and keyframe values

Allow Dataref keyframes to be spread around the timeline. No need to add keyframe on frame 1, 2 etc. but can be 1 and 100, so you can actually see in blender how things move.
For each keyframe allow setting a keyframe for the dataref. In the old script you had to add _v1, _v2 etc. to add values to the keyframes, but now animating the dataref value should be enough.

Objects with 'Axis' enabled mess up normal length in X-plane

When an object in Blender has the "Axis" button enabled, the exported .obj spits out an error in X-Plane's "log.txt" file. The error states that the exported object has normals of incorrect length. It has been known to cause system-wide crashes.

Optimize Vertex table

At the moment for each face 3 vertices are written.

Possible optimization:

  • remove duplicate vertices with same location, normal and uv and rewrite indices

XPlaneCommands: Optimizations

  • Only write commands that need to be written (store already written commands).
  • Also use reseters of custom attributes
  • Implement Ben's state-change optimizations

XPlaneCommands must work on a per-face base

XPlaneCommands is the class writing the commands table. It should work on a per-face base, so commands are possible for faces also, not only for objects. This is important for face rendering modes for example.

The task is to make command output so optimized that a face will be drawn only once, and there and state changes will occur as little as possible.

Filesize increases with every export

Seems like we are adding all vertices with each export on top of the previously exported. Maybe the Converted MeshData is not emptied after export?

Export when only one Texture is used

If we have only one Texture in use, Lights and Lines should be exported into the file with meshes in it, to avoid having two files: one with lights and lines only and one with meshes.

2nd Video with explanation of all the settings

  • layers and their settings in the scene Tab
  • object settings
  • material settings
  • lamp settings
  • usage of bones for animations and what to be aware of
  • object data (double sided)
  • edge split

Feature: Nested Primitives

Allow export of nested primitives and nested animations.

Problem: How to export an animated child object whos parent might be exported to another obj because it has another texture?

Feature: defining 1st or 2nd cockpit texture in blender

It should be possible to define wich cockpit texture to use for an object (no matter if it is a manipulator or not) by setting either the panel.png or the *_cockpit.png as image in the uvimage-editor for the object. The Export should add the appropriate Attributes (ATTR_cockpit or ATTR_no_cockpit or ATTR_cockpit_region) depending on the chosen texture.

Add XPlane Settings to Scenes also

Scenes should be threaded as Empties and are containers for a OBJ-File. Decide if keeping Empties is still usefull (in case when having 10 assets in one file that each have to go to a single obj maybe?)

Error when trying to export a move/hide animation

WARNING - dataref sim/flightmodel2/lights/landing_lights_brightness_ratio is too long for key frame table
WARNING - dataref sim/flightmodel2/lights/landing_lights_brightness_ratio is too long for key frame table
Traceback (most recent call last):
File "/home/michael/blender-2.49b-linux-glibc236-py26-i386/.blender/scripts/XPlaneAnimObject.py", line 437, in doapply
action.renameChannel(oldnames[boneno], 'TmpChannel%d' % boneno)
ValueError: channel target name alredy exists

Feature: Lighting groups

allow Blender to store ATTR_light_level information to swap LIT textures with daytime textures through datarefs.

Combine Rotation axes into one ANIM block

Using the axis multiplicator in ANIM_rotate_begin x y z makes it possible to rotate all axes at once by multiplying a fixed angle by a factor. Fixed angle could be 360 to make it possible to rotate once with a unit vector.

ATTR_cockpit added to non-cockpit objects

This is a bug in 3.10 final. The ATTR_cockpit is applied indiscriminately to every .obj export. It SHOULD be applied only to actual cockpit objects.

The manifestation of this bug consists of draw errors on meshes that are textured with a transparent texture. The sim can't seem to order the transparency properly.

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.