├── .gitignore
├── DataRefs.html.webloc
├── DataRefs.txt
├── Makefile
├── ReadMe-XPlane2Blender.html
├── XPlane3DCockpits.html
├── XPlaneAG.py
├── XPlaneAnimObject.py
├── XPlaneAnnotate.py
├── XPlaneExport.py
├── XPlaneExport7.py
├── XPlaneExport8.py
├── XPlaneExport8_ManipOptionsInterpreter.py
├── XPlaneExport8_util.py
├── XPlaneExportCSL.html
├── XPlaneExportCSL.py
├── XPlaneFacade.py
├── XPlaneHelp.py
├── XPlaneImport.py
├── XPlaneImportDSF.py
├── XPlaneImportMDL.py
├── XPlaneImportPlane.html
├── XPlaneImportPlane.py
├── XPlaneImport_util.py
├── XPlaneLib.py
├── XPlaneMacros.py
├── XPlaneMat2Tex.py
├── XPlaneMultiObj.py
├── XPlanePanelRegions.py
├── XPlaneRoads.py
├── XPlaneRoadsIn.py
├── XPlaneUtils.py
├── blender_props.txt
├── debug.py
├── delscripts.command
├── install.cmd
├── install.command
├── test
├── .gitignore
├── CoveRamp.blend
├── CoveRamp.obj
├── FS2X-palette.png
├── Frigate.blend
├── Frigate.obj
├── KSBD_example.blend
├── KSBD_example.obj
├── KSBD_example.png
├── KSBD_exampleLIT.bmp
├── KSBD_example_orig.obj
├── KSBD_example_orig_v8.obj
├── Nimitz.blend
├── Nimitz.obj
├── XEL_cockpit.blend
├── XEL_cockpit.obj
├── animalpha.blend
├── animalpha.obj
├── animcompound.blend
├── animcompound.obj
├── animerrs.blend
├── animkey.blend
├── animkey.obj
├── animmulti.blend
├── animmulti.obj
├── animoverride.blend
├── animoverride.obj
├── animreuse.blend
├── animreuse.obj
├── animskip.blend
├── animskip.obj
├── connected.blend
├── gmaxTest
│ ├── EnvMap09.png
│ ├── FS2X-palette.png
│ ├── Panel.png
│ ├── beach_envmap.png
│ ├── blank.png
│ ├── gmaxTest.MDL
│ ├── gmaxTest.blend
│ ├── gmaxTest.gmax
│ ├── gmaxTest.x
│ └── palette.png
├── hardtest.blend
├── hardtest.obj
├── hidetest.blend
├── hidetest.obj
├── horizon_vac80.blend
├── horizon_vac80.nogrp.obj
├── horizon_vac80.obj
├── jetway.obj
├── lights.blend
├── lights.obj
├── lights_custom.blend
├── lights_custom.obj
├── mattest.blend
├── mattest.obj
├── mirror.blend
├── mirror.obj
├── modifiers.blend
├── modifiers.obj
├── propsman_horizon_vac.png
├── propsman_horizon_vac80.obj
├── propsman_horizon_vac80.obj.orig
├── propsman_horizon_vac_LIT.png
├── simple.blend
├── simple.obj
├── simple_manual.obj
├── stick.blend
├── stick.obj
├── test.blend
├── test.obj
├── test2.blend
├── test2.obj
├── test3.blend
├── test3.obj
├── test3_manual.obj
├── test4.blend
├── test4.obj
├── throttle.blend
├── throttle.obj
├── throttle_int.blend
├── throttle_int.obj
├── transtest.blend
├── transtest.obj
├── wingflex.blend
├── wingflex.obj
├── yoke.blend
└── yoke.obj
├── uvFixupACF.py
└── uvResize.py
/.gitignore:
--------------------------------------------------------------------------------
1 | *.bak
2 | *.pyc
3 | *.pyo
4 | *.zip
5 |
6 | *.blend1
7 | *.blend2
8 | *.blend3
9 | *.blend4
10 | *.blend5
11 |
12 | .DS_Store
13 | Thumbs.db
14 |
--------------------------------------------------------------------------------
/DataRefs.html.webloc:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | URL
6 | http://www.xsquawkbox.net/xpsdk/docs/DataRefs.html
7 |
8 |
9 |
--------------------------------------------------------------------------------
/DataRefs.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Marginal/XPlane2Blender/07195742afe93cea307b6a15e9a2c4d4aac50985/DataRefs.txt
--------------------------------------------------------------------------------
/Makefile:
--------------------------------------------------------------------------------
1 | TARGET=XPlane2Blender.zip
2 |
3 | FILES=install.cmd install.command DataRefs.txt ReadMe-XPlane2Blender.html XPlane3DCockpits.html XPlaneAG.py XPlaneAnimObject.py XPlaneAnnotate.py XPlaneExport.py XPlaneExport8.py XPlaneExport8_ManipOptionsInterpreter.py XPlaneExport8_util.py XPlaneExportCSL.html XPlaneExportCSL.py XPlaneFacade.py XPlaneHelp.py XPlaneImport.py XPlaneImportMDL.py XPlaneImportPlane.html XPlaneImportPlane.py XPlaneImport_util.py XPlaneLib.py XPlaneMacros.py XPlaneMultiObj.py XPlanePanelRegions.py XPlaneUtils.py uvFixupACF.py uvResize.py
4 |
5 | all: $(TARGET)
6 |
7 | clean:
8 | rm $(TARGET)
9 |
10 | $(TARGET): $(FILES)
11 | rm -f $(TARGET)
12 | zip -MM $(TARGET) $+
13 |
--------------------------------------------------------------------------------
/XPlane3DCockpits.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | XPlane2Blender
8 |
9 |
23 |
24 |
25 |
32 |
33 |
34 | 3D Cockpits
35 | X-Plane 3D cockpits are just normal scenery objects except that cockpits can contain some additional features, but can't contain multiple Levels of Detail so only objects in Blender layer 1 are exported. If you want to keep objects in your Blender scene for reference but which you don't want to export - e.g. the plane fuselage - then put them in layer 4 or greater before exporting.
36 | Choose File → Save As and save the blender file in the same folder as your plane's .acf
file with the name airplane_cockpit.blend
, airplane_cockpit_INN.blend
or airplane_cockpit_OUT.blend
(where airplane
is the name of your plane's .acf
file):
37 |
38 | - X-Plane displays
airplane_cockpit.obj
in both internal and external views.
39 | - X-Plane displays
airplane_cockpit_INN.obj
only in internal views.
40 | - X-Plane displays
airplane_cockpit_OUT.obj
only in external views.
41 | If you create an airplane_cockpit_INN.obj
and/or airplane_cockpit_OUT.obj
then you should not create airplane_cockpit.obj
.
42 |
43 | You will usually want to import your plane into Blender to act as a reference and/or starting point for your cockpit. Delete any plane parts that you don't need in creating your cockpit - you only need to keep the fuselage itself plus any relevant Misc Bodies. After import, your cockpit uses the same texture file as your plane, ie airplane_paint
. Choose Image → Replace in a UV/Image Editor window to use a different texture file, which can be named anything you like (but no spaces) and which should live in the same folder as your plane's .acf
file.
44 | To make your 3D cockpit appear in X-Plane, on the Standard → Viewpoint → View screen in PlaneMaker, check the show cockpit object in: INSIDE views, exact forwards option. To hide the 2D cockpit altogether, also check the show cockpit object in: PANEL views, exact forwards option; hiding the 2D cockpit means that you no longer have to leave a large part of the Panel Texture transparent to represent the windscreen, which gives you more room on the Panel Texture for instruments.
45 |
46 | Cockpit instruments
47 | To construct moving cockpit instruments paint the …/cockpit/-PANELS-/Panel.png
texture in an image editor application and place instuments in PlaneMaker as as you would for a 2D panel (but bear in mind that only the top 768 lines of the Panel Texture can be used in the 3D cockpit in X-Plane versions prior to 8.20).
48 | The Panel Texture can by 1024×any size in X-Plane v8, and any size up to 2048×2048 in X-Plane v9. Normally you can only use a single file to texture your X-Plane objects. But when constructing a 3D cockpit you can additionally use this …/cockpit/-PANELS-/Panel.png
file - the instruments that X-Plane draws on the 2D panel will also appear in your 3D model.
49 | The …/cockpit/-PANELS-/Panel.png
texture doesn't contain any instruments when you load it into Blender (unless you've painted them on yourself). This makes it hard to tell in Blender where X-Plane will draw the instruments. So it's easier if you use a screenshot of the panel with the instruments drawn on it, instead of the real Panel Texture. If your display is larger than your Panel Texture, then this is simple:
50 |
51 | - Run PlaneMaker.
52 | - Choose Background → Rendering Options and set the size to be equal to the size of your Panel Texture.
53 |
- Restart PlaneMaker
54 | - Choose Standard → Panel
55 | - Take a screenshot: Press Alt PrintScreen (PC) or Shift cmd 3 (Mac).
56 | - Paste (PC) or load (Mac) the screenshot into an image editor application.
57 | - Crop the window borders etc from the screenshot so that the image is
58 | exactly the same size as your Panel Texture.
59 | - Save the screenshot as
ScreenshotPanel.png
(or any
60 | filename ending in *panel.*
) in the same folder as your
61 | plane's .acf
file.
62 | - Use the
ScreenshotPanel.png
texture on those faces
63 | that you want to display moving cockpit instruments in X-Plane.
64 | - The screenshot file does not need to be distributed with your
65 | finished plane.
66 |
67 | If your Panel Texture is larger than your display then you cannot take a screenshot of the whole panel. In this case you'll need to take multiple screenshots of the panel in PlaneMaker and stich them together in an image editing application.
68 | If you later want to resize your Panel Texture then use the procedure described here.
69 | Note that X-Plane versions prior to 8.20 only display the 3D cockpit when running at the default 1024x768 resolution. You may want to mention this in the Readme with your plane if your plane is intended to work in X-Plane versions prior to 8.20.
70 |
71 | v9: Cockpit Panel Regions
72 | The cockpit Panel Texture uses a lot of video memory, much of which is wasted when the 3D cockpit is being displayed:
73 |
74 | - X-Plane has to round up the height and width of your Panel Texture to be powers of two. eg if your Panel Texture is 1600×1200 pixels then X-Plane rounds this up to 2048×2048 pixels, which requires 16MB of video memory. More if you also supply a LIT Panel Texture.
75 | - Typically up to half of your Panel Texture represents your plane's windscreen, which is fully transparent. You can't make use of this part of the texture in any useful way in a 3D cockpit, so the memory that it consumes is wasted. (Note: You can construct a tinted windscreen in your 3D cockpit quite cheaply by using a small semi-transparent part of the non-panel texture).
76 | - The Panel Texture contains an alpha channel for transparency. The alpha channel accounts for ¼ of the memory that the texture consumes. But often your only need for transparency in the Panel Texture is to represent the 2D windscreen, which is of no use in a 3D cockpit, so the memory that the alpha channel consumes is wasted.
77 |
78 | A "Panel Region" is a new texture which is cut out from your Panel Texture:
79 |
80 | - You can create up to 4 Panel Regions (which can overlap).
81 | - The height and width of a Panel Region texture must be a power of two
82 | eg 128, 256, 512, 1024 or 2048, but it doesn't have to be square.
83 | - Panel Region textures are opaque - they don't contain an alpha channel.
84 |
85 | When you use Panel Regions instead of the Panel Texture to texture your 3D cockpit, X-Plane discards the Panel Texture's alpha channel and also discards all areas of the Panel Texture other than the pieces that you cut out to make the Panel Regions. This reduces video memory requirements and improves performance.
86 |
87 | Creating a Panel Region
88 |
89 | - In the UV/Image Editor window, select your Panel Texture from the pop-up menu.
90 | - Choose Image → X-Plane panel regions → Create new region
91 | - Enter the co-ordinates in your Panel Texture where you want the bottom-left pixel of the new Panel Region to start, and the width and height of the new Panel Region.
92 |
93 | Any faces that you've textured using the Panel Texture which are contained inside the new Panel Region are transferred over to use the new Panel Region.
94 | Any areas that are fully transparent in the Panel Texture are coloured sky blue in the new Panel Region. You'll get undefined (i.e. weird) results in X-Plane if you use these sky blue areas to texture your faces.
95 | (Note: When you create a Panel Region, Blender also creates a hidden object named "PanellRegionHandler" to store accounting information. Don't mess with this object).
96 |
97 | Deleting a Panel Region
98 |
99 | - In the UV/Image Editor window, select your Panel Region from the pop-up menu.
100 | - Choose Image → X-Plane panel regions → Delete this region
101 |
102 | Any faces that you've textured using this Panel Region are transferred back to using the Panel Texture.
103 | The deleted Panel Region will remain in the UV/Image Editor
104 | window's pop-up menu for a while until Blender figures out that it can remove it. But the deleted Panel Region won't count towards your maximum of four Panel Regions.
105 |
106 | Re-loading the Panel Regions
107 | The Panel Regions aren't automatically updated when you edit your Panel Texture in an image editor application and then reload it in Blender, or when you reload your .blend
file.
108 |
109 | - In the UV/Image Editor window, select your Panel Texture from the pop-up menu.
110 | - Choose Image → X-Plane panel regions → Reload all regions
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 | Version 3.11 © 2004-2013 Jonathan Harris
119 |  |
120 |
121 |
122 |
123 |
124 |
125 |
126 |
--------------------------------------------------------------------------------
/XPlaneAnnotate.py:
--------------------------------------------------------------------------------
1 | #!BPY
2 | """ Registration info for Blender menus:
3 | Name: 'X-Plane Annotation'
4 | Blender: 249
5 | Group: 'Import'
6 | Tooltip: 'Import an OBJ annotation.'
7 | """
8 | __author__ = "Ben Supnik"
9 | __email__ = "Ben Supnik, Ben Supnik "
10 | __url__ = "developer.x-plane.com"
11 | __version__ = "3.11"
12 | __bpydoc__ = """\
13 | This script imports X-Plane object annotations.
14 | """
15 |
16 | #
17 | # Copyright (c) 2012-2013 Ben Supnik
18 | #
19 | # This code is licensed under version 2 of the GNU General Public License.
20 | # http://www.gnu.org/licenses/gpl-2.0.html
21 | #
22 | # See ReadMe-XPlane2Blender.html for usage.
23 | #
24 |
25 | import sys
26 | import os
27 | import Blender
28 | from Blender import Armature, Object, Mesh, NMesh, Lamp, Image, Material, Texture, Draw, Window, Text, Registry
29 | from Blender.Mathutils import Matrix, RotationMatrix, TranslationMatrix, Vector
30 | from XPlaneUtils import *
31 | from Blender.Window import GetCursorPos
32 | from XPlaneExport import ExportError
33 | from XPlaneImport_util import OBJimport, ParseError
34 | from XPlaneLib import *
35 |
36 | def set_pref_key(container, key, value):
37 | dict = Blender.Registry.GetKey(container)
38 | if not dict:
39 | dict={}
40 | dict[key]=value
41 | Blender.Registry.SetKey(container,dict)
42 |
43 | def get_pref_key(container, key):
44 | dict = Blender.Registry.GetKey(container)
45 | if not dict:
46 | return None
47 | if not key in dict:
48 | return None
49 | return dict[key]
50 |
51 |
52 | def make_relative_path(path_to_child, path_to_parent_dir):
53 | child = path_to_child.split('/')
54 | par = path_to_parent_dir.split('/')
55 | while len(par) > 0 and len(child) > 0 and par[0] == child[0]:
56 | child.pop(0)
57 | par.pop(0)
58 | ret = []
59 | for x in par:
60 | ret.append('..')
61 | ret.extend(child)
62 | return '/'.join(ret)
63 |
64 | def append_to_inner(list, item):
65 | if len(list) == 0:
66 | list.append(item)
67 | elif type(list[-1][1]) != type([]):
68 | list.append(item)
69 | else:
70 | append_to_inner(list[-1][1], item)
71 |
72 | def extend_pop_for(items, segments):
73 | if len(segments) != 0:
74 | if len(items) == 0 or type(items[-1][1]) != type([]) or segments[0] != items[-1][0]:
75 | items.append((segments[0], []))
76 | extend_pop_for(items[-1][1],segments[1:])
77 |
78 | try:
79 | baseFileName=Blender.Get('filename')
80 | l = baseFileName.lower().rfind('.blend')
81 | if l==-1: raise ExportError('Save this .blend file first')
82 | root = locate_root(baseFileName)
83 | packs = get_scenery_packs(root[0])
84 | objs = get_local_assets(root[1],'.obj')
85 | items = get_library(root[0],'.obj')
86 |
87 | items.extend(objs)
88 |
89 | items = [(i[0],i[1],i[2],i[0]) for i in items]
90 |
91 | items.sort(key=lambda item: item[0])
92 |
93 | last_item = get_pref_key('xplane.tools','annotate.last_item')
94 | if last_item:
95 | #pop_list.append((last_item[0],len(items)))
96 | #items.append(last_item)
97 | vpath='/'.join(last_item[0].split('/')[:-1])
98 | new_items = []
99 | for i in items:
100 | if i[0].startswith(vpath):
101 | new_items.append([i[0],i[1],i[2],"recent items/"+i[0].split('/')[-1]])
102 | items.extend(new_items)
103 |
104 |
105 | pop_list=[]
106 |
107 | for i in items:
108 | path=i[3].split('/')[:-1]
109 | extend_pop_for(pop_list,path)
110 | if len(path):
111 | append_to_inner(pop_list,(i[3].split('/')[-1],items.index(i)))
112 | else:
113 | pop_list.append((i[3].split('/')[-1],items.index(i)))
114 |
115 |
116 | r = Draw.PupTreeMenu(pop_list)
117 | if r >= 0:
118 | print items[r]
119 | set_pref_key('xplane.tools','annotate.last_item',items[r])
120 | cur = Window.GetCursorPos()
121 | mm = TranslationMatrix(Vector([0,0,0])).resize4x4()
122 | #mm = TranslationMatrix(Vector(Window.GetCursorPos())).resize4x4()
123 | importer=OBJimport(items[r][1],mm)
124 | importer.verbose=1
125 | try:
126 | sel = Blender.Scene.GetCurrent().objects.selected
127 | old_objs = set(Blender.Scene.GetCurrent().objects)
128 | obj_list = importer.doimport()
129 | new_objs = set(Blender.Scene.GetCurrent().objects)
130 | wrapper=Blender.Object.New('Empty','OBJ%s' % items[r][0].split('/')[-1])
131 | Blender.Scene.GetCurrent().objects.link(wrapper)
132 | added = new_objs-old_objs
133 | wrapper.makeParent(list(added),1,0)
134 | if len(sel) == 1:
135 | sel[0].makeParent([wrapper],1,0)
136 | base = sel[0].getLocation('worldspace')
137 | cur[0] -= base[0]
138 | cur[1] -= base[1]
139 | cur[2] -= base[2]
140 | wrapper.setLocation(cur[0], cur[1], cur[2])
141 | rel_path = items[r][0]
142 | if items[r][2]=='lcl':
143 | rel_path = make_relative_path(items[r][1],os.path.dirname(baseFileName))
144 | wrapper.addProperty('external',rel_path,'STRING')
145 |
146 | #for ob in obj_list:
147 | # ob.setLocation(cur[0], cur[1], cur[2])
148 |
149 | except ParseError, e:
150 | Window.WaitCursor(0)
151 | Window.DrawProgressBar(0, 'ERROR')
152 | if e.type == ParseError.HEADER:
153 | msg='This is not a valid X-Plane v6, v7 or v8 OBJ file'
154 | elif e.type == ParseError.PANEL:
155 | msg='Cannot read cockpit panel texture'
156 | elif e.type == ParseError.NAME:
157 | msg='Missing dataref or light name at line %s\n' % obj.lineno
158 | elif e.type == ParseError.MISC:
159 | msg='%s at line %s' % (e.value, importer.lineno)
160 | else:
161 | thing=ParseError.TEXT[e.type]
162 | if e.value:
163 | msg='Expecting a %s, found "%s" at line %s' % (thing, e.value, obj.lineno)
164 | else:
165 | msg='Missing %s at line %s' % (thing, obj.lineno)
166 | print "ERROR:\t%s\n" % msg
167 | Draw.PupMenu("ERROR%%t|%s" % msg)
168 | Window.RedrawAll()
169 | Window.DrawProgressBar(1, 'ERROR')
170 |
171 |
172 | #print result
173 | Window.RedrawAll()
174 | #Window.DrawProgressBar(1, 'ERROR')
175 | except ExportError, e:
176 | print "%s" % e.msg
177 | Draw.PupMenu("ERROR: %s" % e.msg)
178 |
--------------------------------------------------------------------------------
/XPlaneExport7.py:
--------------------------------------------------------------------------------
1 | #!BPY
2 | """ Registration info for Blender menus:
3 | Name: 'X-Plane v7 Object (.obj)'
4 | Blender: 243
5 | Group: 'Export'
6 | Tooltip: 'Export to X-Plane v7 format object (.obj)'
7 | """
8 | __author__ = "Jonathan Harris"
9 | __email__ = "Jonathan Harris, Jonathan Harris "
10 | __url__ = "XPlane2Blender, http://marginal.org.uk/x-planescenery/"
11 | __version__ = "3.11"
12 | __bpydoc__ = """\
13 | This script exports X-Plane v7 objects.
14 | """
15 |
16 | #
17 | # Copyright (c) 2004-2007 Jonathan Harris
18 | #
19 | # This code is licensed under version 2 of the GNU General Public License.
20 | # http://www.gnu.org/licenses/gpl-2.0.html
21 | #
22 | # See ReadMe-XPlane2Blender.html for usage.
23 | #
24 |
25 | import Blender
26 | from Blender import Draw, Window
27 | from XPlaneExport import OBJexport7, ExportError
28 |
29 | if Window.EditMode(): Window.EditMode(0)
30 | try:
31 | obj=None
32 | scene = Blender.Scene.GetCurrent()
33 |
34 | baseFileName=Blender.Get('filename')
35 | l = baseFileName.lower().rfind('.blend')
36 | if l==-1: raise ExportError('Save this .blend file first')
37 | baseFileName=baseFileName[:l]
38 | obj=OBJexport7(baseFileName+'.obj', __version__, False)
39 | obj.export(scene)
40 | except ExportError, e:
41 | for o in scene.objects: o.select(0)
42 | if e.objs:
43 | layers=[]
44 | if isinstance(e.objs, tuple):
45 | (o,mesh,faces)=e.objs
46 | o.select(1)
47 | layers=o.layers
48 | for f in mesh.faces: f.sel=0
49 | if faces:
50 | for f in faces: f.sel=1
51 | for i in range(len(mesh.faces)):
52 | if mesh.faces[i]==faces[0]:
53 | mesh.activeFace=i
54 | break
55 | else:
56 | for o in e.objs:
57 | o.select(1)
58 | for layer in o.layers:
59 | if (layer<=3 or not o.Layers&7) and not layer in layers:
60 | layers.append(layer)
61 | Window.ViewLayers(layers)
62 | Window.RedrawAll()
63 | if e.msg:
64 | Window.WaitCursor(0)
65 | Window.DrawProgressBar(0, 'ERROR')
66 | print "ERROR:\t%s.\n" % e.msg
67 | Draw.PupMenu("ERROR%%t|%s" % e.msg)
68 | Window.DrawProgressBar(1, 'ERROR')
69 | if obj and obj.file: obj.file.close()
70 |
--------------------------------------------------------------------------------
/XPlaneExport8.py:
--------------------------------------------------------------------------------
1 | #!BPY
2 | """ Registration info for Blender menus:
3 | Name: 'X-Plane Object (.obj)'
4 | Blender: 245
5 | Group: 'Export'
6 | Tooltip: 'Export to X-Plane object'
7 | """
8 | __author__ = "Jonathan Harris"
9 | __email__ = "Jonathan Harris, Jonathan Harris "
10 | __url__ = "XPlane2Blender, http://marginal.org.uk/x-planescenery/"
11 | __version__ = "3.11"
12 | __bpydoc__ = """\
13 | This script exports to X-Plane v8, v9 or v10 object format.
14 | """
15 |
16 | #
17 | # Copyright (c) 2007 Jonathan Harris
18 | #
19 | # This code is licensed under version 2 of the GNU General Public License.
20 | # http://www.gnu.org/licenses/gpl-2.0.html
21 | #
22 | # See ReadMe-XPlane2Blender.html for usage.
23 | #
24 |
25 | from XPlaneExport8_util import *
26 | from XPlaneUtils import *
27 |
28 | #------------------------------------------------------------------------
29 | if Window.EditMode(): Window.EditMode(0)
30 | try:
31 | obj=None
32 | sl = Blender.Scene.Get()
33 |
34 | scene = Blender.Scene.GetCurrent()
35 |
36 | baseFileName=Blender.Get('filename')
37 | l = baseFileName.lower().rfind('.blend')
38 | if l==-1: raise ExportError('Save this .blend file first')
39 | baseFileName=baseFileName[:l]
40 |
41 | if len(sl) > 1 and scene.getName() != 'Scene':
42 | scene_name = scene.getName()
43 | if scene_name[-4:].lower() == '.obj':
44 | scene_name = scene_name[:-4]
45 | baseFileName = os.path.dirname(baseFileName)
46 | baseFileName = os.path.join(baseFileName,scene_name)
47 |
48 | obj=OBJexport8(baseFileName+'.obj')
49 | obj.export(scene)
50 | except ExportError, e:
51 | for o in scene.objects: o.select(0)
52 | if e.objs:
53 | layers=[]
54 | if isinstance(e.objs, tuple):
55 | (o,mesh,faces)=e.objs
56 | o.select(1)
57 | layers=o.layers
58 | for f in mesh.faces: f.sel=0
59 | if faces:
60 | for f in faces: f.sel=1
61 | for i in range(len(mesh.faces)):
62 | if mesh.faces[i]==faces[0]:
63 | mesh.activeFace=i
64 | break
65 | else:
66 | for o in e.objs:
67 | o.select(1)
68 | for layer in o.layers:
69 | if (layer<=3 or not o.Layers&7) and not layer in layers:
70 | layers.append(layer)
71 | Window.ViewLayers(layers)
72 | Window.RedrawAll()
73 | if e.msg:
74 | Window.WaitCursor(0)
75 | Window.DrawProgressBar(0, 'ERROR')
76 | print "ERROR:\t%s.\n" % e.msg
77 | Draw.PupMenu("ERROR%%t|%s" % e.msg)
78 | Window.DrawProgressBar(1, 'ERROR')
79 | if obj and obj.file: obj.file.close()
80 | except IOError, e:
81 | Window.WaitCursor(0)
82 | Window.DrawProgressBar(0, 'ERROR')
83 | print "ERROR:\t%s\n" % e.strerror
84 | Draw.PupMenu("ERROR%%t|%s" % e.strerror)
85 | Window.DrawProgressBar(1, 'ERROR')
86 | if obj and obj.file: obj.file.close()
87 |
--------------------------------------------------------------------------------
/XPlaneExport8_ManipOptionsInterpreter.py:
--------------------------------------------------------------------------------
1 | #
2 | # Copyright (c) 2010 Ben Russell
3 | #
4 | # See ReadMe-XPlane2Blender.html for usage.
5 | #
6 |
7 | import sys
8 | import time
9 | import Blender
10 | from Blender import Armature, Mesh, Lamp, Image, Draw, Window
11 | from Blender.Mathutils import Matrix, RotationMatrix, TranslationMatrix, MatMultVec, Vector, Quaternion, Euler
12 | from XPlaneUtils import Vertex, UV, MatrixrotationOnly, getDatarefs, PanelRegionHandler, getManipulators, make_short_name
13 | from XPlaneExport import ExportError
14 |
15 | import string
16 |
17 |
18 | def formatManipulator(manipulator):
19 | """ Return a string representing a manipular structure.
20 | Keyword arguments:
21 | manipulator -- the manipulator dictionary
22 |
23 | """
24 | if manipulator == None:
25 | return 'ATTR_manip_none'
26 |
27 | keys = sorted(manipulator.keys())
28 | manipulator_str = manipulator['99@manipulator-name']
29 | for key in keys:
30 | if key == '99@manipulator-name':
31 | break
32 |
33 | manipulator_str += '\t'
34 | #print 'key=', key
35 | data = manipulator[key]
36 |
37 | if type(data).__name__ == 'str':
38 | manipulator_str += data.strip()
39 |
40 | if type(data).__name__ == 'float':
41 | manipulator_str += '%6.2f' % data
42 |
43 | if type(data).__name__ == 'int':
44 | manipulator_str += '%d' % data
45 |
46 | return manipulator_str
47 |
48 |
49 | def getmanipulator(object):
50 |
51 | manipulator = 'ATTR_manip_none'
52 | props = object.getAllProperties()
53 |
54 | for prop in props:
55 | if prop.name == 'manipulator_type':
56 | manipulator = prop.data
57 |
58 | if manipulator == 'ATTR_manip_none':
59 | return None
60 |
61 | manipulator_dict,cursorList = getManipulators()
62 | keys = sorted(manipulator_dict[manipulator].keys())
63 | for prop in props:
64 | if prop.name.startswith(manipulator):
65 | tmp = prop.name.split('_')
66 | key = tmp[len(tmp)-1]
67 |
68 | for dict_key in keys:
69 | if dict_key.find(key) > 0:
70 | key = dict_key
71 | break
72 |
73 | manipulator_dict[manipulator][key] = prop.data
74 |
75 | manipulator_dict[manipulator]['99@manipulator-name'] = manipulator
76 | return manipulator_dict[manipulator]
77 |
78 |
79 | def anim_decode(obj):
80 | m = getmanipulator(obj)
81 | if m == None:
82 | if obj.parent == None:
83 | return ""
84 | if obj.getType()=='Mesh':
85 | return anim_decode(obj.parent)
86 | return ""
87 |
88 | return formatManipulator(m)
89 |
90 |
91 | def decode(obj):
92 | properties = obj.getAllProperties()
93 | objname = obj.name
94 |
95 | #setup default manipulator attribute values
96 | manip_iscommand_br = False
97 | manip_is_push_tk = False
98 | manip_is_toggle_tk = False
99 | manip_command_br = ""
100 | manip_cursor_br = ""
101 | manip_x_br = ""
102 | manip_y_br = ""
103 | manip_z_br = ""
104 | manip_val1_br = ""
105 | manip_val2_br = ""
106 | manip_dref_br = ""
107 | manip_tooltip_br = ""
108 |
109 | manip_bone_name_br = "" #--leave this blank by default, if its not blank the code will try and find the bone name
110 |
111 | for prop in properties:
112 | if( prop.name == "mnp_iscommand" ): manip_iscommand_br = prop.data #--expects a boolean value
113 | if( prop.name == "mnp_command" ): manip_command_br = prop.data.strip()
114 | if( prop.name == "mnp_cursor" ): manip_cursor_br = prop.data.strip()
115 | if( prop.name == "mnp_dref" ): manip_dref_br = prop.data.strip()
116 | if( prop.name == "mnp_tooltip" ): manip_tooltip_br = prop.data.strip()
117 | if( prop.name == "mnp_bone" ): manip_bone_name_br = prop.data.strip()
118 | if( prop.name == "mnp_v1" ): manip_val1_br = str(prop.data)
119 | if( prop.name == "mnp_v2" ): manip_val2_br = str(prop.data)
120 | if( prop.name == "mnp_is_push" ): manip_is_push_tk = prop.data
121 | if( prop.name == "mnp_is_toggle" ): manip_is_toggle_tk = prop.data
122 |
123 | # BR's weird scheme: if there is NO mnp_bone there is no manip, get out. But the magic
124 | # bone names arm_ are place-holders - they're not REAL armatures, it's just a place-holder
125 | # to make the export work.
126 |
127 | if manip_bone_name_br == "":
128 | return anim_decode(obj)
129 |
130 | if( manip_bone_name_br != "" and manip_bone_name_br != "arm_" ):
131 | obj_manip_armature_br = Blender.Object.Get( manip_bone_name_br )
132 | if( obj_manip_armature_br != None ):
133 | obj_manip_armature_data_br = obj_manip_armature_br.getData()
134 | obj_manip_bone_br = obj_manip_armature_data_br.bones.values()[0]
135 |
136 | vec_tail = obj_manip_bone_br.tail['ARMATURESPACE']
137 | vec_arm = [obj_manip_armature_br.LocX, obj_manip_armature_br.LocY, obj_manip_armature_br.LocZ]
138 |
139 | #blender Y = x-plane Z, transpose
140 | manip_x_br = str( round(vec_tail[0],3) )
141 | manip_y_br = str( round(vec_tail[2],3) )
142 | manip_z_br = str( round(-vec_tail[1],3) ) #note: value is inverted.
143 |
144 | #self.file.write( str( vec_tail ) + "\n" )
145 | #self.file.write( str( vec_arm ) + "\n" )
146 |
147 | data = ""
148 |
149 | if( manip_iscommand_br ):
150 | #wiki def: ATTR_manip_command
151 | data = ("ATTR_manip_command %s %s %s" % (manip_cursor_br,
152 | manip_command_br,
153 | manip_tooltip_br))
154 | elif( manip_is_push_tk):
155 | data = ("ATTR_manip_push %s %s %s %s" % (manip_cursor_br,
156 | manip_val1_br,
157 | manip_val2_br,
158 | manip_dref_br))
159 | elif( manip_is_toggle_tk):
160 | data = ("ATTR_manip_toggle %s %s %s %s" % (manip_cursor_br,
161 | manip_val1_br,
162 | manip_val2_br,
163 | manip_dref_br))
164 | else:
165 | #wiki def: ATTR_manip_drag_axis < value2>
166 | data = ("ATTR_manip_drag_axis %s %s %s %s %s %s %s %s" % (manip_cursor_br,
167 | manip_x_br,
168 | manip_y_br,
169 | manip_z_br,
170 | manip_val1_br,
171 | manip_val2_br,
172 | manip_dref_br,
173 | manip_tooltip_br))
174 |
175 | if data.find("") != -1:
176 | print properties
177 | raise ExportError("%s: Manipulator '%s' is incomplete but was still exported." % (objname, data))
178 |
179 | return data
180 |
--------------------------------------------------------------------------------
/XPlaneExportCSL.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | XPlane2Blender
8 |
9 |
23 |
24 |
25 |
32 |
33 |
34 | CSL objects
35 | “CSL” objects are intended for use with multi-user plugins such as XSquawkBox or X-IvAp. They support a limited subset of the features of “normal” X-Plane objects.
36 |
37 | Exporting CSL objects
38 | First, choose File → Save As… and save the .blend
file in the aircraft or scenery folder where you want the .obj
file to end up.
39 | Then choose File → Export → X-Plane CSL
40 | The object is exported in the same folder and with the same name as the current Blender file, but with a .obj
extension. Blender may display some informational messages - click on one of these messages to see which object(s) the message refers to.
41 | If there is an error then the scripts will attempt to identify and highlight the offending Blender object(s).
42 |
43 | Lamps
44 | Only Lamp objects of type “Lamp” are exported to X-Plane. Lamp objects of types “Area”, “Spot”, “Semi” and “Hemi” are ignored (and so can be used to illuminate your model in Blender). Custom lights are not supported.
45 | The XSquawkBox documentation strongly recommends that you use the following special lights:
46 |
47 | airplane_landing
- White landing light. (R,G,B settings are ignored).
48 | airplane_taxi
- White taxi light. (R,G,B settings are ignored).
49 | airplane_nav_left
- Red navigation/position light. (R,G,B settings are ignored).
50 | airplane_nav_right
- Green navigation/position light. (R,G,B settings are ignored).
51 | airplane_beacon
- Red pulsing anti-collision light, on when engines are running. (R,G,B settings are ignored).
52 | airplane_strobe
- White strobe light. (R,G,B settings are ignored).
53 | - other - Normal light. The colour is determined by the R,G,B sliders on the Lamp panel F5.
54 |
55 |
56 | Meshes
57 | Meshes are exported as for normal X-Plane objects, with the following limitations:
58 |
59 | - Textures must be in 32bit or 24bit PNG format - CSL objects do not support DDS format textures.
60 | - Smoothing is not supported; the Set Smooth and Set Solid in the Link and Materials Editing panel have no effect.
61 | - Tiles button (polygon offsetting) and Collision button (“hard” faces) in the Texture Face Editing panel have no effect.
62 | - Animation and Level Of Detail are not supported.
63 | - Propertes are not supported; including drawing group, slung load weight etc.
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 | Version 3.11 © 2004-2013 Jonathan Harris
72 |  |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
--------------------------------------------------------------------------------
/XPlaneExportCSL.py:
--------------------------------------------------------------------------------
1 | #!BPY
2 | """ Registration info for Blender menus:
3 | Name: 'X-Plane CSL (.obj)'
4 | Blender: 243
5 | Group: 'Export'
6 | Tooltip: 'Export to X-Plane CSL (.obj)'
7 | """
8 | __author__ = "Jonathan Harris"
9 | __email__ = "Jonathan Harris, Jonathan Harris "
10 | __url__ = ["XPlane2Blender, http://marginal.org.uk/x-planescenery/",
11 | "XSquawkBox, http://www.xsquawkbox.net/xsb/",
12 | "X-IvAp, http://www.ivao.aero/softdev/X-IvAp/"]
13 | __version__ = "3.11"
14 | __bpydoc__ = """\
15 | This script exports X-Plane CSL objects for use with XSquawkbox and X-IvAp.
16 | """
17 |
18 | #
19 | # Copyright (c) 2004,2005 Jonathan Harris
20 | #
21 | # This code is licensed under version 2 of the GNU General Public License.
22 | # http://www.gnu.org/licenses/gpl-2.0.html
23 | #
24 | # See ReadMe-XPlane2Blender.html for usage.
25 | #
26 |
27 | import Blender
28 | from Blender import Draw, Window
29 | from XPlaneExport import OBJexport7, ExportError
30 |
31 | if Window.EditMode(): Window.EditMode(0)
32 | try:
33 | obj=None
34 | scene = Blender.Scene.GetCurrent()
35 |
36 | baseFileName=Blender.Get('filename')
37 | l = baseFileName.lower().rfind('.blend')
38 | if l==-1: raise ExportError('Save this .blend file first')
39 | baseFileName=baseFileName[:l]
40 | obj=OBJexport7(baseFileName+'.obj', __version__, True)
41 | obj.export(scene)
42 | except ExportError, e:
43 | for o in scene.objects: o.select(0)
44 | if e.objs:
45 | layers=[]
46 | if isinstance(e.objs, tuple):
47 | (o,mesh,faces)=e.objs
48 | o.select(1)
49 | layers=o.layers
50 | for f in mesh.faces: f.sel=0
51 | if faces:
52 | for f in faces: f.sel=1
53 | for i in range(len(mesh.faces)):
54 | if mesh.faces[i]==faces[0]:
55 | mesh.activeFace=i
56 | break
57 | else:
58 | for o in e.objs:
59 | o.select(1)
60 | for layer in o.layers:
61 | if (layer<=3 or not o.Layers&7) and not layer in layers:
62 | layers.append(layer)
63 | Window.ViewLayers(layers)
64 | Window.RedrawAll()
65 | if e.msg:
66 | Window.WaitCursor(0)
67 | Window.DrawProgressBar(0, 'ERROR')
68 | print "ERROR:\t%s.\n" % e.msg
69 | Draw.PupMenu("ERROR%%t|%s" % e.msg)
70 | Window.DrawProgressBar(1, 'ERROR')
71 | if obj and obj.file: obj.file.close()
72 |
--------------------------------------------------------------------------------
/XPlaneHelp.py:
--------------------------------------------------------------------------------
1 | #!BPY
2 | """
3 | Name: 'X-Plane'
4 | Blender: 236
5 | Group: 'Help'
6 | Tooltip: 'XPlane2Blender manual'
7 | """
8 | __author__ = "Jonathan Harris"
9 | __email__ = "Jonathan Harris, Jonathan Harris "
10 | __url__ = "XPlane2Blender, http://marginal.org.uk/x-planescenery/"
11 | __version__ = "3.11"
12 | __bpydoc__ = """\
13 | This script opens the default web browser at the XPlane2Blender manual.
14 | """
15 |
16 | import Blender, webbrowser, types
17 |
18 | for location in ['uscriptsdir', 'scriptsdir']:
19 | path=Blender.Get(location)
20 | if not path:
21 | continue
22 | filename=Blender.sys.join(path, 'ReadMe-XPlane2Blender.html')
23 | try:
24 | file=open(filename, 'rb')
25 | file.close()
26 | if type(filename)==types.UnicodeType:
27 | filename=filename.encode('utf-8')
28 | except IOError:
29 | continue
30 | else:
31 | webbrowser.open("file:%s" % filename)
32 | break
33 |
--------------------------------------------------------------------------------
/XPlaneImport.py:
--------------------------------------------------------------------------------
1 | #!BPY
2 | """ Registration info for Blender menus:
3 | Name: 'X-Plane Object (.obj)...'
4 | Blender: 243
5 | Group: 'Import'
6 | Tooltip: 'Import an X-Plane scenery or cockpit object (.obj)'
7 | """
8 | __author__ = "Jonathan Harris"
9 | __email__ = "Jonathan Harris, Jonathan Harris "
10 | __url__ = "XPlane2Blender, http://marginal.org.uk/x-planescenery/"
11 | __version__ = "3.11"
12 | __bpydoc__ = """\
13 | This script imports X-Plane v6-v10 object files.
14 | """
15 |
16 | #
17 | # Copyright (c) 2004-2007 Jonathan Harris
18 | #
19 | # This code is licensed under version 2 of the GNU General Public License.
20 | # http://www.gnu.org/licenses/gpl-2.0.html
21 | #
22 | # See ReadMe-XPlane2Blender.html for usage.
23 | #
24 |
25 | from XPlaneImport_util import *
26 |
27 | #------------------------------------------------------------------------
28 | def file_callback (filename):
29 | obj=OBJimport(filename)
30 | try:
31 | obj.doimport()
32 | except ParseError, e:
33 | Window.WaitCursor(0)
34 | Window.DrawProgressBar(0, 'ERROR')
35 | if e.type == ParseError.HEADER:
36 | msg='This is not a valid X-Plane v6, v7 or v8 OBJ file'
37 | elif e.type == ParseError.PANEL:
38 | msg='Cannot read cockpit panel texture'
39 | elif e.type == ParseError.NAME:
40 | msg='Missing dataref or light name at line %s\n' % obj.lineno
41 | elif e.type == ParseError.MISC:
42 | msg='%s at line %s' % (e.value, obj.lineno)
43 | else:
44 | thing=ParseError.TEXT[e.type]
45 | if e.value:
46 | msg='Expecting a %s, found "%s" at line %s' % (thing, e.value, obj.lineno)
47 | else:
48 | msg='Missing %s at line %s' % (thing, obj.lineno)
49 | print "ERROR:\t%s\n" % msg
50 | Draw.PupMenu("ERROR%%t|%s" % msg)
51 | Window.RedrawAll()
52 | Window.DrawProgressBar(1, 'ERROR')
53 | obj.file.close()
54 |
55 | #------------------------------------------------------------------------
56 | # main routine
57 | #------------------------------------------------------------------------
58 | try:
59 | for o in Blender.Scene.GetCurrent().objects: o.select(0)
60 | (datarefs,foo)=getDatarefs()
61 | except IOError, e:
62 | Window.DrawProgressBar(0, 'ERROR')
63 | print "ERROR:\t%s\n" % e.strerror
64 | Draw.PupMenu("ERROR%%t|%s" % e.strerror)
65 | Window.DrawProgressBar(1, 'ERROR')
66 | else:
67 | Window.FileSelector(file_callback,"Import OBJ")
68 |
--------------------------------------------------------------------------------
/XPlaneImportPlane.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | XPlane2Blender
8 |
9 |
23 |
24 |
25 |
32 |
33 |
34 | Tweaking Planes
35 |
36 | Positioning the plane
37 | Imported planes need to be positioned correctly on the ground for use as static scenery (don't do this if you're making a CSL or cockpit object):
38 |
39 | - Select layers 1-3, select all objects and position the plane so that its undercarriage is sitting directly on the ground (represented by the x/y axes).
40 | - You may also need to rotate the plane slightly so that all wheels are level; press r and move the mouse to rotate the plane so that its undercarriage is sitting directly on the ground. Click to set the plane's position.
41 |
42 |
43 | Consolidating textures
44 | The primary file for textures is named airplane_paint
. Most planes also use textures from a secondary file named airplane_paint2
. Objects that use textures from the secondary file are imported with "*
" after their name to make them easier to identify in Blender's Outliner window.
45 | The X-Plane .obj
scenery file format only supports the use of a single file for textures. If your plane only has a few simple objects that use textures from airplane_paint2
then you should re-texture these objects to use airplane_paint
, following the same procedure described below for weapons and misc objects. If that is not feasible you can use this procedure to make the plane use textures from a single file:
46 |
47 | - Save your Blender model.
48 | - In an image editor application, resize
airplane_paint
and airplane_paint2
to e.g. 2048x1024. (You don't need to save these resized versions).
49 | - Create a new bitmap file 2048 pixels wide and 1024 pixels high.
50 | - Paste the resized
airplane_paint
into the left half of this bitmap.
51 | - Paste the resized
airplane_paint2
into the right half of this bitmap.
52 | - Save the bitmap file in the same folder and with the same name as your
.blend
file. If you're making a CSL object then you must save in PNG format.
53 | - If your plane uses night-time textures then repeat this procedure for the
_LIT
bitmap files.
54 | - In a Blender UV/Image Editor window choose Image → Merge _paint and _paint2.
55 |
56 | If your imported plane uses weapons or misc objects then each of these will use an additional bitmap file. Weapons are imported with their names starting with Wnn
and objects with their names starting with Onn
. Also note that reduced-LOD versions of weapons and misc objects may be present in layers 2 and 3.
57 | Open an Outliner window and choose View → Show Outliner. For each mesh that has a name starting with Wnn
or Onn
or ending with *
, either:
58 |
59 | - Delete the mesh, or
60 | - Copy the required textures to an unused area in the primary bitmap file and use the UV/Image Editor window to map the new copy of the textures to the mesh's faces.
61 |
62 |
63 | Performance
64 | If you're making a CSL or static scenery, consider performance issues when the plane is rendered in X-Plane. Ask yourself the following questions:
65 |
66 | - Most important: Do you really need fully detailed textures for your plane? Consider resizing the texture file in an image editor program to half or even quarter size. Use Image → Replace to use the new texture file.
67 | - Does the model have hidden faces? Look for things like wings or misc bodies that are partially or wholly buried in the fuselage and delete any wholly hidden faces before exporting.
68 | - Do you really need all that detail? Consider deleting details like flap tracks, antennae etc before exporting. This
69 | especially goes for the lower Level of Detail versions of the plane in layers 2 and 3 which are only viewed in X-Plane from >1000m and >4000m respectively.
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 | Version 3.11 © 2004-2013 Jonathan Harris
78 |  |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
--------------------------------------------------------------------------------
/XPlaneLib.py:
--------------------------------------------------------------------------------
1 | #
2 | # Copyright (c) 2012-2013 Ben Supnik
3 | #
4 | # This code is licensed under version 2 of the GNU General Public License.
5 | # http://www.gnu.org/licenses/gpl-2.0.html
6 | #
7 | # See ReadMe-XPlane2Blender.html for usage.
8 | #
9 |
10 | import sys
11 | import os
12 | import Blender
13 | from Blender import Armature, Object, Mesh, NMesh, Lamp, Image, Material, Texture, Draw, Window, Text
14 | from Blender.Mathutils import Matrix, RotationMatrix, TranslationMatrix, Vector
15 | from XPlaneUtils import *
16 | from Blender.Window import GetCursorPos
17 | from XPlaneExport import ExportError
18 | #from XPlaneImport import OBJimport, ParseError
19 |
20 | # Given a path to ANY resource inside x-plane, return a tuple of: full path to x-plane folder, full path to scenery pack.
21 | def locate_root(path):
22 | hierarchy = path.split('/')
23 | for known_folder in [['Custom Scenery',1], ['Global Scenery',1], ['default scenery',2]]:
24 | if known_folder[0] in hierarchy:
25 | idx = hierarchy.index(known_folder[0])
26 | return ('/'.join(hierarchy[:(idx+1-known_folder[1])]),'/'.join(hierarchy[:(idx+2)]))
27 | raise ExportError("X-Plane folder not found. Your blender file must be INSIDE a scenery package!")
28 |
29 | # return a list of all scenery pack path names
30 | def get_scenery_packs(root):
31 | results=[]
32 | for known_folder in ['Custom Scenery','Global Scenery','Resources/default scenery']:
33 | try:
34 | packs=os.listdir(root+'/'+known_folder)
35 | for pack in packs:
36 | results.append(root+'/'+known_folder+'/'+pack)
37 | except OSError, e:
38 | pass
39 | return results
40 |
41 | # Given a scenery pack, return pair partial, full paths to all art assets with a given suffix.
42 | def get_local_assets(pack, suffix):
43 | results=[]
44 | l=len(suffix)
45 | for root, dirs, files in os.walk(pack):
46 | for f in files:
47 | if f[-l:].lower() == suffix.lower():
48 | if root == pack:
49 | results.append([f,root+'/'+f,'lcl'])
50 | else:
51 | results.append([root[len(pack)+1:]+'/'+f,root+'/'+f,'lcl'])
52 | return results
53 |
54 | # Given a scenery pack, get a list of tuples, full virtual, full real path for each lib entry.
55 | def get_library_assets(pack, suffix):
56 | sl = len(suffix)
57 | results=[]
58 | try:
59 | fi=open(pack+'/library.txt','r')
60 | for l in fi:
61 | t=l.split()
62 | if len(t) > 2:
63 | if t[0] in ['EXPORT','EXPORT_EXCLUDE','EXPORT_EXTEND']:
64 | if t[2][-sl:].lower() == suffix.lower():
65 | results.append([t[1],pack+'/'+t[2],'lib'])
66 | fi.close()
67 | except IOError, e:
68 | pass
69 | return results
70 |
71 | # Given the x-plane folder, get the ENTIRE library for one asset type, as a list of tuples, virtual to full real.
72 | def get_library(root,suffix):
73 | results=[]
74 | packs=get_scenery_packs(root)
75 | for p in packs:
76 | li = get_library_assets(p,suffix)
77 | results.extend(li)
78 | return results
79 |
--------------------------------------------------------------------------------
/XPlaneMat2Tex.py:
--------------------------------------------------------------------------------
1 | #!BPY
2 | """ Registration info for Blender menus:
3 | Name: 'Material to TexFace'
4 | Blender: 249
5 | Group: 'Image'
6 | Tooltip: 'Copy the material texture to the face texture'
7 | """
8 | __author__ = "Ben Supnik"
9 | __email__ = "Ben Supnik, Ben Supnik "
10 | __url__ = "developer.x-plane.com"
11 | __version__ = "3.11"
12 | __bpydoc__ = """\
13 |
14 | """
15 |
16 | #
17 | # Copyright (c) 2012-2013 Ben Supnik
18 | #
19 | # This code is licensed under version 2 of the GNU General Public License.
20 | # http://www.gnu.org/licenses/gpl-2.0.html
21 | #
22 | # See ReadMe-XPlane2Blender.html for usage.
23 | #
24 |
25 | import Blender
26 | from Blender import Draw, Image, Scene, Window, Material, Texture, Object, NMesh
27 |
28 | try:
29 | for ob in Scene.GetCurrent().objects:
30 | if ob.getType() == "Mesh":
31 | #print "Mesh %s " % ob.name
32 | mesh = ob.getData()
33 | changed = False
34 | for face in mesh.faces:
35 | #print "face with"
36 | if face.mode & NMesh.FaceModes.TEX and face.image:
37 | #print " %s" % face.image.name
38 | wanted = mesh.materials[face.mat].textures[0].tex.image
39 | has = face.image
40 | #print " but wanted %s %s" % (mesh.materials[face.mat].name, wanted.name)
41 | if has != wanted:
42 | print "Using %s but should have had (%s) %s" % (has.name, wanted.name, mesh.materials[face.mat].name)
43 | face.image = wanted
44 | changed = True
45 | if changed:
46 | mesh.update()
47 |
48 |
49 | Window.RedrawAll()
50 |
51 | except (RuntimeError, IOError):
52 | print "ERROR"
53 | # msg='Can\'t load texture file %s.png or .bmp' % newfile
54 | ## print "ERROR:\t%s\n" % msg
55 | # Draw.PupMenu("ERROR: %s" % msg)
56 |
--------------------------------------------------------------------------------
/XPlaneMultiObj.py:
--------------------------------------------------------------------------------
1 | #!BPY
2 | """ Registration info for Blender menus:
3 | Name: 'X-Plane Object Bulk Export (.obj)'
4 | Blender: 245
5 | Group: 'Export'
6 | Tooltip: 'Export a scene to multiple objects.'
7 | """
8 | __author__ = "Ben Supnik"
9 | __email__ = "Ben Supnik, Ben Supnik "
10 | __url__ = "developer.x-plane.com"
11 | __version__ = "3.11"
12 | __bpydoc__ = """\
13 | This script exports multiple OBJs from a Blender scene.
14 | """
15 |
16 | #
17 | # Copyright (c) 2012-2013 Ben Supnik
18 | #
19 | # This code is licensed under version 2 of the GNU General Public License.
20 | # http://www.gnu.org/licenses/gpl-2.0.html
21 | #
22 | # See ReadMe-XPlane2Blender.html for usage.
23 | #
24 |
25 | from XPlaneExport8_util import *
26 | from XPlaneUtils import *
27 | from XPlaneExport import ExportError
28 | from XPlaneLib import *
29 |
30 | def export_hier(parent, all,root,depth):
31 | total = 0
32 | kids=getChildren(parent, all)
33 | objs = filter_objects(kids,'Empty','OBJ')
34 | objs += filter_objects(kids,'Empty','VRT')
35 | objs += filter_objects(kids,'Empty','END')
36 | objs += filter_objects(kids,'Empty','BGN')
37 |
38 | grps = filter_objects(kids,'Empty','GRP')
39 | for g in grps:
40 | total = total + export_hier(g, all,root,depth+1)
41 |
42 | # Alex does NOT want the outer-most OBJs to be exported. His projects
43 | # apparently contain lots of random objects floating around.
44 | # This if statement could be nuked to restore the old behavior.
45 | # The current impl lets free objects out if there simply are no groups.
46 |
47 | #if depth > 0: #This would STRICTLY skip free objs.
48 | if depth > 0 or len(grps) == 0: #This takes free objs if there are no groups.
49 | for o in objs:
50 | n = strip_suffix(o.name)[3:]
51 | n = get_prop(o,'rname',n)
52 | n += '.obj'
53 | partial = get_prop(o,'path','.')
54 | export_path=os.path.join(partial,n)
55 | export_path=os.path.join(root,export_path)
56 | if not os.path.exists(os.path.dirname(export_path)):
57 | os.makedirs(os.path.dirname(export_path))
58 | try:
59 | (sim,pack)=locate_root(export_path)
60 | except ExportError, e:
61 | pack=None
62 | exporter=OBJexport8(export_path)
63 | exporter.additive_lod=1
64 | my_parts=getGrandChildren(o,all)
65 | #if self.debug:
66 | # for p in my_parts:
67 | # print " object export %s will export DB %s" % (oname, p.name)
68 | prefix = ''
69 | parts = partial.count('/') + 1
70 | if partial == '.': parts = 0
71 | for n in range(parts):
72 | prefix += '../'
73 | exporter.openFile(my_parts,o,prefix)
74 | exporter.writeHeader()
75 | if has_prop(o,'vname'):
76 | if pack == None:
77 | raise ExportError("Illegal vname directive on %s - blender file is not in a scenery pack." % o.name)
78 | exporter.file.write("EXPORT %s.obj %s\n" % (strip_suffix(get_prop(o,'vname',o.name)),os.path.normpath(export_path[len(pack)+1:])))
79 | if has_prop(o,'vname1'):
80 | exporter.file.write("EXPORT %s.obj %s\n" % (strip_suffix(get_prop(o,'vname1',o.name)),os.path.normpath(export_path[len(pack)+1:])))
81 | if has_prop(o,'vname2'):
82 | exporter.file.write("EXPORT %s.obj %s\n" % (strip_suffix(get_prop(o,'vname2',o.name)),os.path.normpath(export_path[len(pack)+1:])))
83 | exporter.writeObjects(my_parts)
84 | total = total + 1
85 | return total
86 | #------------------------------------------------------------------------
87 | if Window.EditMode(): Window.EditMode(0)
88 | try:
89 | obj=None
90 | sl = Blender.Scene.Get()
91 |
92 | scene = Blender.Scene.GetCurrent()
93 |
94 | baseFileName=Blender.Get('filename')
95 | l = baseFileName.lower().rfind('.blend')
96 | if l==-1: raise ExportError('Save this .blend file first')
97 | path=os.path.dirname(baseFileName)
98 |
99 | count = export_hier(None, scene.objects,path,0)
100 | Draw.PupMenu("Export complete: %d objects." % count)
101 |
102 | except ExportError, e:
103 | for o in scene.objects: o.select(0)
104 | if e.objs:
105 | layers=[]
106 | if isinstance(e.objs, tuple):
107 | (o,mesh,faces)=e.objs
108 | o.select(1)
109 | layers=o.layers
110 | for f in mesh.faces: f.sel=0
111 | if faces:
112 | for f in faces: f.sel=1
113 | for i in range(len(mesh.faces)):
114 | if mesh.faces[i]==faces[0]:
115 | mesh.activeFace=i
116 | break
117 | else:
118 | for o in e.objs:
119 | o.select(1)
120 | for layer in o.layers:
121 | if (layer<=3 or not o.Layers&7) and not layer in layers:
122 | layers.append(layer)
123 | Window.ViewLayers(layers)
124 | Window.RedrawAll()
125 | if e.msg:
126 | Window.WaitCursor(0)
127 | Window.DrawProgressBar(0, 'ERROR')
128 | print "ERROR:\t%s.\n" % e.msg
129 | Draw.PupMenu("ERROR%%t|%s" % e.msg)
130 | Window.DrawProgressBar(1, 'ERROR')
131 | if obj and obj.file: obj.file.close()
132 | except IOError, e:
133 | Window.WaitCursor(0)
134 | Window.DrawProgressBar(0, 'ERROR')
135 | print "ERROR:\t%s\n" % e.strerror
136 | Draw.PupMenu("ERROR%%t|%s" % e.strerror)
137 | Window.DrawProgressBar(1, 'ERROR')
138 | if obj and obj.file: obj.file.close()
139 |
--------------------------------------------------------------------------------
/XPlanePanelRegions.py:
--------------------------------------------------------------------------------
1 | #!BPY
2 | """ Registration info for Blender menus:
3 | Name: 'X-Plane panel regions...'
4 | Blender: 243
5 | Group: 'Image'
6 | Tooltip: 'Manage X-Plane cockpit panel regions'
7 | """
8 | __author__ = "Jonathan Harris"
9 | __email__ = "Jonathan Harris, Jonathan Harris "
10 | __url__ = "XPlane2Blender, http://marginal.org.uk/x-planescenery/"
11 | __version__ = "3.11"
12 | __bpydoc__ = """\
13 | This script manages X-Plane cockpit panel regions,
14 | """
15 |
16 | #
17 | # Copyright (c) 2007 Jonathan Harris
18 | #
19 | # This code is licensed under version 2 of the GNU General Public License.
20 | # http://www.gnu.org/licenses/gpl-2.0.html
21 | #
22 | # See ReadMe-XPlane2Blender.html for usage.
23 | #
24 |
25 | from Blender import Draw, Image, Window
26 | from math import log
27 |
28 | from XPlaneUtils import PanelRegionHandler
29 |
30 | image=Image.GetCurrent() # may be None
31 | h=PanelRegionHandler()
32 |
33 | opts=[]
34 | if not image:
35 | pass
36 | elif h.isRegion(image):
37 | opts.append('Delete this region%x1')
38 | opts.append('Reload all regions%x3')
39 | elif h.isPanel(image):
40 | if h.countRegions()image.size[0]:
74 | if isinstance(block[-1], tuple): block.extend(['',''])
75 | block[-2]='Left + Width must'
76 | block[-1]='be less than %d' % image.size[0]
77 | elif yoff.val+height.val>image.size[1]:
78 | if isinstance(block[-1], tuple): block.extend(['',''])
79 | block[-2]='Bottom + Height must'
80 | block[-1]='be less than %d' % image.size[1]
81 | else:
82 | Window.WaitCursor(1)
83 | if not h.isPanel(image):
84 | h=h.New(image)
85 | h.addRegion(xoff.val, yoff.val, width.val, height.val).makeCurrent()
86 | Window.WaitCursor(0)
87 | break
88 | elif r==3:
89 | h.regenerate()
90 |
--------------------------------------------------------------------------------
/XPlaneRoadsIn.py:
--------------------------------------------------------------------------------
1 | #!BPY
2 | """ Registration info for Blender menus:
3 | Name: 'X-Plane Road network (.net)'
4 | Blender: 249
5 | Group: 'Import'
6 | Tooltip: 'Import an X-Plane road network'
7 | """
8 | __author__ = "Ben Supnik"
9 | __email__ = "Ben Supnik, Ben Supnik "
10 | __url__ = "developer.x-plane.com"
11 | __version__ = "3.11"
12 | __bpydoc__ = """\
13 | This script imports X-Plane road files.
14 | """
15 |
16 | import sys
17 | import os
18 | import Blender
19 | from Blender import Armature, Object, Mesh, NMesh, Lamp, Image, Material, Texture, Draw, Window, Text
20 | from XPlaneUtils import *
21 |
22 | # Use this is Z to have draped roads below graded, so author can see both for transitionals.
23 | draped_y=-5
24 |
25 |
26 | def TEXT_create_or_clear(name):
27 | existing = Blender.Text.Get()
28 | for e in existing:
29 | if e.name == name:
30 | e.clear()
31 | return e
32 | return Blender.Text.New(name)
33 |
34 | class ParseError(Exception):
35 | def __init__(self, type, value=""):
36 | self.type = type
37 | self.value = value
38 | HEADER = 0
39 | TOKEN = 1
40 | INTEGER= 2
41 | FLOAT = 3
42 | NAME = 4
43 | MISC = 5
44 | EOF = 6
45 | EOL = 7
46 | TEXT = ["Header", "Command", "Integer", "Number", "Name", "Misc", "EOF", "EOL" ]
47 |
48 | class TXTFile:
49 | def __init__(self, filename):
50 | self.lines=[]
51 | file=open(filename,'r')
52 | for line in file:
53 | lines = line.split('\r\n')
54 | for l in lines:
55 | ls=l.strip()
56 | if len(ls) > 0:
57 | self.lines.append(ls)
58 | file.close()
59 | self.lineno=1
60 |
61 | def get_token(self, want_pop, eol_ok):
62 | if len(self.lines) < 1:
63 | raise ParseError(ParseError.EOF)
64 | toks = self.lines[0].split(None,1)
65 | if not eol_ok and len(toks) == 0:
66 | raise ParseError(ParseError.EOL)
67 | if len(toks) == 0:
68 | return ""
69 | if want_pop:
70 | if len(toks) == 1:
71 | self.lines[0] = ""
72 | else:
73 | self.lines[0] = toks[1]
74 | return toks[0]
75 |
76 | def TXT_is_done(self):
77 | return len(self.lines) == 0
78 |
79 | def TXT_str_scan_eoln(self):
80 | if len(self.lines) < 1:
81 | raise ParseError(ParseError.EOF)
82 | l = self.lines.pop(0)
83 | self.lineno += 1
84 | return l
85 |
86 | def TXT_str_scan_match(self,token):
87 | t = self.get_token(False, True)
88 | return t == token
89 |
90 | def TXT_int_scan(self):
91 | t = self.get_token(True, False)
92 | try:
93 | return int(t)
94 | except ValueError:
95 | raise ParseError(ParseError.INTEGER, t)
96 |
97 | def TXT_flt_scan(self):
98 | t = self.get_token(True, False)
99 | try:
100 | return float(t)
101 | except ValueError:
102 | raise ParseError(ParseError.INTEGER, t)
103 |
104 | def TXT_str_scan_space(self):
105 | return self.get_token(True, False)
106 |
107 | def TXT_str_scan_space_optional(self):
108 | return self.get_token(True, True)
109 |
110 | def prop_import(obj, tag, line):
111 | obj.addProperty(tag,line,'STRING')
112 |
113 | class NETimport:
114 | def __init__(self, filename):
115 | self.m=TXTFile(filename)
116 | self.junc=[]
117 | self.chain=[]
118 | self.chain_width=0
119 | self.chain_length=0
120 | self.chain_center=0
121 | self.shader_idx=0
122 | self.scale = 1
123 | self.shaders = SHADER_SET()
124 | self.filename=filename
125 |
126 | def doimport(self):
127 | h1 = self.m.TXT_str_scan_space()
128 | self.m.TXT_str_scan_eoln()
129 | v = self.m.TXT_int_scan()
130 | self.m.TXT_str_scan_eoln()
131 | h2 = self.m.TXT_str_scan_space()
132 | self.m.TXT_str_scan_eoln()
133 | if h1.upper() != 'A' and h1.upper() != 'I':
134 | raise ParseError(ParseError.MISC,"Bad header, must be A or I")
135 | if v != 800:
136 | raise ParseError(ParseError.MISC,"Bad version, must be 800")
137 | if h2.upper() != 'ROADS':
138 | raise ParseError(ParseError.MISC,"Bad header, file class must be ROADS")
139 |
140 | header=[]
141 | footer=[]
142 |
143 | dir = os.path.dirname(self.filename)
144 | last_name=''
145 |
146 | while not self.m.TXT_is_done():
147 | t = self.m.TXT_str_scan_space()
148 | if t in ['#SHADER', 'TEXTURE','TEXTURE_LIT','TEXTURE_NORMAL','NO_BLEND','ONE_SIDED','SPECULAR','DECAL','DECAL_RGBA','DECAL_KEYED','DECAL_PARAMS','DECAL_LIB',
149 | 'NO_APHA','DITHER_ALPHA','TEXTURE_TILE','TEXTURE_DETAIL','TEXTURE_CONTROL','TEXTURE_TERRAIN',
150 | 'VARIANTS','CAR_MODEL','TRAIN','TRAIN_VARIANT','TRAIN_CAR']:
151 | t += ' '
152 | t += self.m.TXT_str_scan_eoln()
153 | if self.shaders.is_shader_line(t):
154 | self.shaders.handle_shader_line(t)
155 | header.append(t)
156 | elif t in ['ROAD_DRAPED','ROAD_DRAPE_CHOICE','#VROAD']:
157 | t += ' '
158 | t += self.m.TXT_str_scan_eoln()
159 | footer.append(t)
160 | elif t == 'SCALE':
161 | self.scale = self.m.TXT_flt_scan()
162 | self.m.TXT_str_scan_eoln()
163 | elif t == '#ROAD':
164 | last_name=self.m.TXT_str_scan_eoln()
165 | elif t == 'ROAD_TYPE':
166 | self.shaders.load_all_images(dir)
167 | id = self.m.TXT_str_scan_space()
168 | self.chain=Blender.Object.New('Empty','ROA%s.%s' % (id, last_name))
169 | self.chain_width = self.m.TXT_flt_scan()
170 | self.chain_length = self.m.TXT_flt_scan()
171 | self.shader_idx = self.m.TXT_int_scan()
172 | self.chain_center=self.chain_width*0.5
173 | prop_import(self.chain,'RGB',self.m.TXT_str_scan_eoln())
174 | prop_import(self.chain,'NAME',last_name)
175 | Blender.Scene.GetCurrent().objects.link(self.chain)
176 | num_id = int(id)
177 | core = num_id / 1000
178 | grad = num_id % 10
179 | side = (num_id / 100) % 10
180 | self.chain.setLocation(core * 100, (side * 5 + grad) * 200, 0)
181 | elif t == 'ROAD_CENTER':
182 | self.chain_center = self.m.TXT_flt_scan()
183 | self.m.TXT_str_scan_eoln()
184 | elif t in ['SHOW_LEVEL', 'REQUIRE_EVEN']:
185 | prop_import(self.chain,t,self.m.TXT_str_scan_eoln())
186 | elif t == 'SEGMENT_GRADED' or t == 'SEGMENT_DRAPED':
187 | shader_idx = self.m.TXT_int_scan()
188 | near_lod = self.m.TXT_flt_scan()
189 | far_lod = self.m.TXT_flt_scan()
190 | t_scale = self.m.TXT_flt_scan()
191 | x1 = self.m.TXT_flt_scan() - self.chain_center
192 | if t == 'SEGMENT_GRADED': y1 = self.m.TXT_flt_scan()
193 | else: y1 = draped_y
194 | s1 = self.m.TXT_flt_scan() / self.scale
195 | x2 = self.m.TXT_flt_scan() - self.chain_center
196 | if t == 'SEGMENT_GRADED': y2 = self.m.TXT_flt_scan()
197 | else: y2 = draped_y
198 | s2 = self.m.TXT_flt_scan() / self.scale
199 | surf = self.m.TXT_str_scan_space_optional()
200 | self.m.TXT_str_scan_eoln()
201 | nm = Mesh.New()
202 | verts =[ [ x1, 0, y1], [ x2, 0, y2], [x2, self.chain_length, y2], [x1, self.chain_length, y1]]
203 | loc = self.chain.getLocation('localspace')
204 | #for v in verts:
205 | # v[0] += loc[0]
206 | # v[1] += loc[1]
207 | # v[2] += loc[2]
208 | faces = [[0,1,2,3 ]]
209 | nm.verts.extend(verts)
210 | nm.faces.extend(faces)
211 | nm.faceUV= 1
212 | my_img = self.shaders.material_for_idx(shader_idx)
213 | # append won't work, materials is returned by value or somethign silly.
214 | nm.materials += [my_img]
215 | for f in nm.faces:
216 | f.image=my_img.textures[0].tex.image
217 | f.mode|=Mesh.FaceModes.TEX
218 | f.transp=Mesh.FaceTranspModes.ALPHA
219 | if t == 'SEGMENT_DRAPED':
220 | f.mode|=Mesh.FaceModes.TILES
221 | if self.shaders.poly_os_for_idx(shader_idx) == 0:
222 | print "WARNING: draped segment has non-draped shader."
223 | else:
224 | if self.shaders.poly_os_for_idx(shader_idx) > 0:
225 | print "WARNING: draped segment has non-draped shader."
226 | f.uv[0][0] = s1
227 | f.uv[1][0] = s2
228 | f.uv[2][0] = s2
229 | f.uv[3][0] = s1
230 | f.uv[0][1] = 0
231 | f.uv[1][1] = 0
232 | f.uv[2][1] = t_scale
233 | f.uv[3][1] = t_scale
234 | f.mat=nm.materials.index(my_img)
235 | ob = Object.New('Mesh',"%d" % shader_idx)
236 | ob.setLocation(loc[0],loc[1],loc[2])
237 | Blender.Scene.GetCurrent().objects.link(ob)
238 | ob.link(nm)
239 | kids=[]
240 | kids.append(ob)
241 | self.chain.makeParent(kids,1,1)
242 | elif t == 'WIRE':
243 | lod_near = self.m.TXT_flt_scan()
244 | lod_far = self.m.TXT_flt_scan()
245 | dx = self.m.TXT_flt_scan() * self.chain_width - self.chain_center
246 | y = self.m.TXT_flt_scan()
247 | droop = self.m.TXT_flt_scan()
248 | nm = Mesh.New()
249 | verts =[ [ dx, 0, y * droop], [ dx, 0, y], [dx, self.chain_length, y], [dx, self.chain_length, y * droop]]
250 | faces = [[0,1,2,3 ]]
251 | loc = self.chain.getLocation('localspace')
252 | #for v in verts:
253 | # v[0] += loc[0]
254 | # v[1] += loc[1]
255 | # v[2] += loc[2]
256 | nm.verts.extend(verts)
257 | nm.faces.extend(faces)
258 | nm.faceUV=1
259 | for f in nm.faces:
260 | f.mode|=Mesh.FaceModes.TWOSIDE
261 | ob = Object.New('Mesh',"wire")
262 | ob.setLocation(loc[0],loc[1],loc[2])
263 | Blender.Scene.GetCurrent().objects.link(ob)
264 | ob.link(nm)
265 | kids=[]
266 | kids.append(ob)
267 | self.chain.makeParent(kids,1,1)
268 | self.m.TXT_str_scan_eoln()
269 | else:
270 | self.m.TXT_str_scan_eoln()
271 |
272 | h = TEXT_create_or_clear('header')
273 | f = TEXT_create_or_clear('footer')
274 | for l in header:
275 | h.write("%s\n" % l)
276 | for l in footer:
277 | f.write("%s\n" % l)
278 |
279 | def file_callback (filename):
280 | obj=NETimport(filename)
281 | try:
282 | obj.doimport()
283 | Blender.Scene.GetCurrent().update()
284 | except ParseError, e:
285 | Window.WaitCursor(0)
286 | Window.DrawProgressBar(0, 'ERROR')
287 | if e.type == ParseError.HEADER:
288 | msg='This is not a valid X-Plane v6, v7 or v8 OBJ file'
289 | elif e.type == ParseError.NAME:
290 | msg='Missing dataref or light name at line %s\n' % obj.m.lineno
291 | elif e.type == ParseError.MISC:
292 | msg='%s at line %s' % (e.value, obj.m.lineno)
293 | else:
294 | thing=ParseError.TEXT[e.type]
295 | if e.value:
296 | msg='Expecting a %s, found "%s" at line %s' % (thing, e.value, obj.m.lineno)
297 | else:
298 | msg='Missing %s at line %s' % (thing, obj.m.lineno)
299 | print "ERROR:\t%s\n" % msg
300 | Draw.PupMenu("ERROR%%t|%s" % msg)
301 | Window.RedrawAll()
302 | Window.DrawProgressBar(1, 'ERROR')
303 |
304 | Window.FileSelector(file_callback,"Import road.net")
305 |
--------------------------------------------------------------------------------
/blender_props.txt:
--------------------------------------------------------------------------------
1 | PROPERTY MASTER LIST:
2 |
3 | * Indicates a recursive property - if not found on an OB, it can be taken from its parent.
4 |
5 | ------------------------------------------------------------------------------------------------
6 | GLOBAL PROPERTIES
7 | ------------------------------------------------------------------------------------------------
8 |
9 | Global properties apply to the entire OBJ and can be anywhere in the OBJ cluster.
10 |
11 | These properties are recursive and simply write the contents of the prop after the command name.
12 | Syntax is thus defined by the OBJ8 spec.
13 |
14 | GLOBAL_specular*
15 | SLOPE_LIMIT*
16 | TILTED*
17 | ATTR_LOD_draped*
18 | GLOBAL_tint*
19 | ATTR_layer_group*
20 | ATTR_layer_group_draped*
21 | REQUIRE_WET*
22 | REQUIRE_DRY*
23 |
24 | These properties define the default blending behavior, are recursive, and take a ratio for the cutoff.
25 | They may be overridden by ATTR_blend/ATTR_no_blend and ATTR_shadow_blend.
26 |
27 | GLOBAL_no_blend* (takes a ratio)
28 | GLOBAL_shadow_blend* (takes a ratio)
29 |
30 | These properties affect the way export works and are recursive.
31 |
32 | additive_lod*
33 |
34 | When set to 1, LOD is additive - that is, the second LOD and first LOD are visible at the same time when close.
35 | This case is often faster for x-plane if you are just adding detail.
36 |
37 | When set to 0 (default) LOD is selective - when the near LOD is drawn, the far disappears.
38 |
39 | instanced*
40 |
41 | When set to 1, the exporter will export an instancing-friendly object, or fail if there is an attribute that cannot
42 | be used. When set to 0, any OBJ can be exported.
43 | - Use instancing ONLY for scenery and only when the OBJ will be used more than once in your scenery pack.
44 | - For one-off scenery OBJs (e.g. one big terminal used once in the DSF) instancing is NOT a win - it may be a loss.
45 |
46 | panel_ok*
47 |
48 | This makes it legal to use panel texture on any OBJ; use this for airplane obis but not scenery.
49 |
50 | Layer-group properties (non-recursive):
51 |
52 | group_Terrain
53 | group_beaches
54 | group_shoulders
55 | group_taxiways
56 | group_runways
57 | group_markings
58 | group_airports
59 | group_footprints
60 | group_roads
61 | group_objects
62 | group_light_objects
63 | group_cars
64 |
65 | This sets the layer group for this OBJ.
66 |
67 | ------------------------------------------------------------------------------------------------
68 | CUSTOM LAMPS (as meshes)
69 | ------------------------------------------------------------------------------------------------
70 | For custom lamps built as a mesh (with a material marked as "halo") the RGBA color comes from
71 | four float properties:
72 | R,G,B,A
73 | A custom dataref, if present, is named via
74 | name
75 |
76 | ------------------------------------------------------------------------------------------------
77 | REAL LAMPS
78 | ------------------------------------------------------------------------------------------------
79 | For real lamps being used as named lights, two non-recursive properties are used:
80 | name = string name of the light
81 | params = if, present, a string that is the entire param list for the named light
82 |
83 | ------------------------------------------------------------------------------------------------
84 | REAL MESHES
85 | ------------------------------------------------------------------------------------------------
86 |
87 | These properties are applied to a mesh OB - recursive ones also affect child meshes.
88 |
89 | lit_level, ATTR_light_level* - provides lighting level. Data is the string with the rest of the OBJ8 command.
90 | ATTR_light_level - if no levels are provided, they come from
91 | ATTR_light_level_v1 or 0
92 | ATTR_light_level_v2 or 1
93 | ATTR_draw_disable* - if present, mesh is not drawn, ever. Useful for hidden meshes for collisions, etc.
94 | ATTR_solid_camera* - if present, mesh is solid to the camera
95 | surface* - string is the hard surface name
96 | deck* - int/bool: if 1 puts the hard surface into deck mode.
97 | up_norm* - int/bool: up-normals; if 1, normals of mesh point straight up - useful for billboard vegetation
98 | ATTR_shadow_blend* (float ratio) - defines the cut-of for shadow-blending mode
99 | ATTR_no_blend* (float ratio) - defines the cut-off for alpha-clipping mode
100 | ATTR_draped* - if present, the polygon offset (TILES button) will instead make ATTR_draped based geometry.
101 | This only works for scenery, and ATTR_draped geometry cannot have animation or any other dynamic 'stuff'.
102 |
103 | ALPHA HANDLING: (do not use the "ADD" alpha button!)
104 | Button Property Meaning
105 | OPAQUE n/a You promise there is no alpha in the texture; Blender will output optimal OBJ code.
106 | ALPHA - Mesh is alpha blended
107 | ALPHA ATTR_shadow_blend or Mesh is alpha blended, but shadows are alpha-tested; properties specify at what
108 | GLOBAL_shadow_blend alpha level the shadow becomes transparent.
109 | CLIP - Mesh (and shadows) are alpha-tested at a cut-off of 0.5
110 | CLIP ATTR_no_blend or Mesh (and shadows) are alpha-tested at a cut-off specified by
111 | GLOBAL_no_blend the property.
112 |
113 | BUTTONS:
114 | INVISIBLE - hides the object from export (e.g. blender's meaning)
115 | TILES - turns on polygon offset (or draped geometry if ATTR_draped is present)
116 | COLLISION - opposite of hard surface - that is, pressing this disables hard surface testing.
117 | TWOSIDE - enables two-sided geometry; highly not recommended. double your meshes!
118 | SHADOW - opposite of shadow casting - that is, pressing this disables shadow casting.
119 |
120 | ------------------------------------------------------------------------------------------------
121 | ANIMATION
122 | ------------------------------------------------------------------------------------------------
123 |
124 | on Bones:
125 | show_v, hide_v
126 |
127 |
128 | ------------------------------------------------------------------------------------------------
129 | MULTI-OBJECT SPECIAL PROPERTIES
130 | ------------------------------------------------------------------------------------------------
131 | For a multi-object export, these extra properties can be used (all are recursive)
132 | path* (string) - defines a sub-directory relative to the blender file to put the exported file into.
133 | if path is not present, OBJs are exported into the same directory as the .blend file.
134 | rname (string) - specifies the name of the OBJ file (minus suffix) to write. Do not include a relative path;
135 | that comes from the path property. If rname is not present, the name of the empty (minus the .001 suffix
136 | and minus the OBJ 3-letter prefix) is the export name
137 | vname (string)
138 | vname1 (string)
139 | vname2 (string)
140 | Only legal for exports into scenery packs; if present, this adds an EXPORT line into the OBJ with vane being the
141 | virtual path for the library system.
142 |
143 | X-Plane does _not_ read EXPORT directives from OBJs! The intention here is that a post-processing tool copies
144 | the EXPORT directives from the OBJs to a library.txt file; the EXPORT directive in the OBJ file is ignored by the
145 | sim.
146 |
--------------------------------------------------------------------------------
/debug.py:
--------------------------------------------------------------------------------
1 | #!BPY
2 | """ Registration info for Blender menus:
3 | Name: 'Debug'
4 | Blender: 234
5 | Group: 'Export'
6 | """
7 |
8 | print "Debug mode"
9 |
10 | import rpdb2; rpdb2.start_embedded_debugger("foo", True)
11 |
12 | from XPlaneExport8 import OBJexport
13 |
--------------------------------------------------------------------------------
/delscripts.command:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | clear
4 | echo
5 |
6 | FOO=~/.blender/scripts
7 |
8 | if [ -e "$FOO" ]; then
9 | rm -rf "$FOO"
10 | if [ -e "$FOO" ]; then
11 | echo "Couldn't delete ~/.blender/scripts folder !!!";
12 | else
13 | echo "Deleted ~/.blender/scripts folder.";
14 | fi;
15 | else
16 | echo "~/.blender/scripts doesn't exist.";
17 | fi
18 |
--------------------------------------------------------------------------------
/install.cmd:
--------------------------------------------------------------------------------
1 | @rem Installation script for Windows NT/2000/XP/Win7
2 | @echo off
3 |
4 | echo Installing Blender scripts . . .
5 |
6 | cd /d "%~dp0"
7 |
8 | set DIRS=
9 | if defined HOME set DIRS=%DIRS% "%HOME%\.blender\scripts"
10 |
11 | rem Try to locate Blender
12 | set FTYPE=
13 | for /f "tokens=2 delims==" %%I in ('assoc .blend') do set FTYPE=%%I
14 | if not defined FTYPE goto noassoc
15 | set BDIR=
16 | for /f "tokens=2* delims==" %%I in ('ftype %FTYPE%') do set BDIR=%%~dpI
17 | if defined BDIR set DIRS=%DIRS% "%BDIR%.blender\scripts"
18 | :noassoc
19 |
20 | set DIRS=%DIRS% "%ProgramFiles%\Blender Foundation\Blender\.blender\scripts" "%ProgramFiles(x86)%\Blender Foundation\Blender\.blender\scripts" "%APPDATA%\Blender Foundation\Blender\.blender\scripts"
21 |
22 | rem Find target script directory
23 | for %%D in (%DIRS%) do if exist "%%~D\" (set DESTDIR=%%~D& goto delold)
24 |
25 | :destfail
26 | echo.
27 | echo Failed to find the correct location for the scripts !!!
28 | goto end
29 |
30 | :delold
31 | rem Remove old files
32 | set FILES=..\Bpymenus helpXPlane.py uvCopyPaste.py uvFixupACF.py uvResize.py XPlaneAnimObject.py XPlaneExport.py XPlaneExport.pyc XPlaneExport7.py XPlaneExport8.py XPlaneExportCSL.py XPlaneExportBodies.py XPlaneImport.py XPlaneImport.pyc XPlaneImportMDL.py XPlaneImportPlane.py XPlaneImportBodies.py XPlanePanelRegions.py XPlaneUtils.py XPlaneUtils.pyc XPlaneHelp.py XPlaneACF.py XPlaneACF.pyc XPlane2Blender.html XPlaneImportPlane.html XPlaneReadme.txt DataRefs.txt
33 | for %%I in (%FILES%) do if exist "%DESTDIR%\%%I" del "%DESTDIR%\%%I" >nul: 2>&1
34 |
35 | :copy
36 | set FILES=DataRefs.txt ReadMe-XPlane2Blender.html XPlane3DCockpits.html XPlaneAG.py XPlaneAnimObject.py XPlaneAnnotate.py XPlaneExport.py XPlaneExport8.py XPlaneExport8_ManipOptionsInterpreter.py XPlaneExport8_util.py XPlaneExportCSL.html XPlaneExportCSL.py XPlaneFacade.py XPlaneHelp.py XPlaneImport.py XPlaneImportMDL.py XPlaneImportPlane.html XPlaneImportPlane.py XPlaneImport_util.py XPlaneLib.py XPlaneMacros.py XPlaneMultiObj.py XPlanePanelRegions.py XPlaneUtils.py uvFixupACF.py uvResize.py
37 | for %%I in (%FILES%) do if not exist "%%I" goto srcfail
38 | for %%I in (%FILES%) do copy /v /y %%I "%DESTDIR%\" >nul:
39 | for %%I in (%FILES%) do if not exist "%DESTDIR%\%%I" goto copyfail
40 | echo.
41 | echo Installed scripts in folder
42 | echo %DESTDIR%
43 | goto end
44 |
45 | :copyfail
46 | echo.
47 | echo Failed to install scripts in folder
48 | echo %DESTDIR% !!!
49 | echo.
50 | echo Try running this installer as Administrator.
51 | goto end
52 |
53 | :srcfail
54 | echo.
55 | echo Failed to install scripts.
56 | echo.
57 | echo Did you extract all of the contents of the zip file?
58 | goto end
59 |
60 | :end
61 | echo.
62 | pause
63 | :reallyend
64 |
--------------------------------------------------------------------------------
/install.command:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | # Installation script for MacOS X
3 |
4 | echo c
5 | echo Installing Blender scripts . . .
6 | echo
7 |
8 | cd "`dirname "$0"`"
9 | IFS="
10 | "
11 |
12 | if [ -n "$*" ]; then
13 | # Recursive call with admin priviledges. Avoids running lsregister as root.
14 | DIRS="$@"
15 | else
16 | LS=/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister # MacOS 10.5
17 | if [ ! -x $LS ]; then
18 | # From http://developer.apple.com/documentation/Carbon/Conceptual/MDImporters/Concepts/Troubleshooting.html
19 | LS=/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister # MacOS 10.3 & 10.4
20 | if [ ! -x $LS ]; then
21 | echo Can\'t find the lsregister tool!
22 | exit 1;
23 | fi
24 | fi
25 | # Candidate application locations (but completely ignore Trash and Time Machine)
26 | DIRS=$($LS -dump | awk '!match($0, "\.Trash") && !match($0, "/Volumes/Time Machine Backups") && match($0, "/.*/.*[B|b]lender.*\.app") { print substr($0, RSTART) "/Contents/MacOS/.blender/scripts" }' | sort -u)
27 |
28 | # Prompt if we need to be admin in order to write
29 | for I in $DIRS; do
30 | if [ -d "$I" -a ! -w "$I" ]; then
31 | exec osascript -e "do shell script \"'$0' \" & quoted form of \"$DIRS\" with administrator privileges without altering line endings"
32 | fi
33 | done
34 | fi
35 |
36 | # Remove old files from everywhere
37 | FILES="../Bpymenus
38 | helpXPlane.py
39 | uvCopyPaste.py
40 | uvFixupACF.py
41 | uvResize.py
42 | XPlaneAnimObject.py
43 | XPlaneExport.py
44 | XPlaneExport.pyc
45 | XPlaneExport7.py
46 | XPlaneExport8.py
47 | XPlaneExportCSL.py
48 | XPlaneExportBodies.py
49 | XPlaneImport.py
50 | XPlaneImport.pyc
51 | XPlaneImportMDL.py
52 | XPlaneImportPlane.py
53 | XPlaneImportBodies.py
54 | XPlanePanelRegions.py
55 | XPlaneUtils.py
56 | XPlaneUtils.pyc
57 | XPlaneHelp.py
58 | XPlaneACF.py
59 | XPlaneACF.pyc
60 | XPlane2Blender.html
61 | XPlaneImportPlane.html
62 | XPlaneReadme.txt
63 | DataRefs.txt"
64 |
65 | for I in "$HOME/.blender/scripts" $DIRS; do
66 | for J in $FILES; do
67 | if [ -e "$I/$J" ]; then
68 | rm -f "$I/$J";
69 | fi
70 | done;
71 | done
72 |
73 | # Files to install
74 | FILES="DataRefs.txt
75 | ReadMe-XPlane2Blender.html
76 | XPlane3DCockpits.html
77 | XPlaneAG.py
78 | XPlaneAnimObject.py
79 | XPlaneAnnotate.py
80 | XPlaneExport.py
81 | XPlaneExport8.py
82 | XPlaneExport8_ManipOptionsInterpreter.py
83 | XPlaneExport8_util.py
84 | XPlaneExportCSL.html
85 | XPlaneExportCSL.py
86 | XPlaneFacade.py
87 | XPlaneHelp.py
88 | XPlaneImport.py
89 | XPlaneImportMDL.py
90 | XPlaneImportPlane.html
91 | XPlaneImportPlane.py
92 | XPlaneImport_util.py
93 | XPlaneLib.py
94 | XPlaneMacros.py
95 | XPlaneMultiObj.py
96 | XPlanePanelRegions.py
97 | XPlaneUtils.py
98 | uvFixupACF.py
99 | uvResize.py"
100 |
101 | if [ -d "$HOME/.blender/scripts" ]; then
102 | DIRS="$HOME/.blender/scripts"
103 | fi
104 |
105 | # Copy new
106 | DONE=
107 | for I in $DIRS; do
108 | if [ -d "$I" ]; then
109 | if [ -w "$I" ]; then
110 | DIROK=1
111 | cp -f $FILES "$I" 2>/dev/null
112 | for J in $FILES; do
113 | if ! [ -r "$I/$J" ]; then DIROK=; fi;
114 | done
115 | if [ "$DIROK" ]; then
116 | DONE="$DONE
117 | $I";
118 | fi;
119 | else
120 | echo "Can't install scripts in folder:
121 | $I"
122 | if ! [ -O "$I" ]; then
123 | echo this folder is owned by `ls -ld "$I"|awk '{print $3}'`.;
124 | fi
125 | echo;
126 | fi;
127 | fi;
128 | done
129 |
130 | if [ "$DONE" ]; then
131 | echo "Installed scripts in folder(s):$DONE"
132 | echo
133 | exit 0;
134 | fi
135 |
136 | for I in $DIRS; do
137 | if [[ -d "$I" && "$I" != /Volumes/* ]]; then
138 | echo Failed to find the correct location for the scripts !!!
139 | echo
140 | exit 1;
141 | fi;
142 | done
143 |
144 | # User only has Blender on disk images
145 | echo Failed !!!
146 | echo Install the Blender application, eg by copying it from the disk image
147 | echo to your Applications folder or Desktop, then run this installer again.
148 | echo
149 | exit 1
150 |
--------------------------------------------------------------------------------
/test/.gitignore:
--------------------------------------------------------------------------------
1 | *.bak
2 | *.pyc
3 | *.pyo
4 | *.zip
5 |
6 | *.blend1
7 | *.blend2
8 | *.blend3
9 | *.blend4
10 | *.blend5
11 |
12 | .DS_Store
13 | Thumbs.db
14 |
--------------------------------------------------------------------------------
/test/CoveRamp.blend:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Marginal/XPlane2Blender/07195742afe93cea307b6a15e9a2c4d4aac50985/test/CoveRamp.blend
--------------------------------------------------------------------------------
/test/FS2X-palette.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Marginal/XPlane2Blender/07195742afe93cea307b6a15e9a2c4d4aac50985/test/FS2X-palette.png
--------------------------------------------------------------------------------
/test/Frigate.blend:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Marginal/XPlane2Blender/07195742afe93cea307b6a15e9a2c4d4aac50985/test/Frigate.blend
--------------------------------------------------------------------------------
/test/KSBD_example.blend:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Marginal/XPlane2Blender/07195742afe93cea307b6a15e9a2c4d4aac50985/test/KSBD_example.blend
--------------------------------------------------------------------------------
/test/KSBD_example.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Marginal/XPlane2Blender/07195742afe93cea307b6a15e9a2c4d4aac50985/test/KSBD_example.png
--------------------------------------------------------------------------------
/test/KSBD_exampleLIT.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Marginal/XPlane2Blender/07195742afe93cea307b6a15e9a2c4d4aac50985/test/KSBD_exampleLIT.bmp
--------------------------------------------------------------------------------
/test/KSBD_example_orig.obj:
--------------------------------------------------------------------------------
1 | A
700 // file version, leave this alone.
OBJ // indicate this is an object file. leave this alone.
KSBD_example // texture. this texture is used for the entire object. use a different part of the texture for each part of the object if desired. this gives the highest frame-rate. X-Plane will automatically check for LIT texture for night lighting as well.
ATTR_LOD 0 1000 // until further notice, all of this geometry is only visible if you are between the number meters specified at left from the object
ATTR_poly_os 2 // offset the polyon by 1, which is another way to avoid z-fighting
quad // pavement. 4 verts. this will sit on the ground without z-buffering problems, thanks to the ATTR no_depth being called
20.0 0.0 20.0 0.75 0.88
-20.0 0.0 20.0 0.94 0.88
-20.0 0.0 -20.0 0.94 0.50
20.0 0.0 -20.0 0.75 0.50
ATTR_poly_os 0 // return to default (0) polygon OS
ATTR_shade_smooth // use smooth shading until i say otherwise
quad_strip 18 // quad strip. 18 verts. xyz st. concrete foundation sides. (verts may be all in a line or paired as I have done)
-16.0 0.0 14.0 0.50 0.00 -12.0 10.0 10.0 0.50 0.50
-14.0 0.0 16.0 1.00 0.00 -10.0 10.0 12.0 1.00 0.50
14.0 0.0 16.0 0.50 0.00 10.0 10.0 12.0 0.50 0.50
16.0 0.0 14.0 1.00 0.00 12.0 10.0 10.0 1.00 0.50
16.0 0.0 -14.0 0.50 0.00 12.0 10.0 -10.0 0.50 0.50
14.0 0.0 -16.0 1.00 0.00 10.0 10.0 -12.0 1.00 0.50
-14.0 0.0 -16.0 0.50 0.00 -10.0 10.0 -12.0 0.50 0.50
-16.0 0.0 -14.0 1.00 0.00 -12.0 10.0 -10.0 1.00 0.50
-16.0 0.0 14.0 0.50 0.00 -12.0 10.0 10.0 0.50 0.50
ATTR_shade_flat // ok i said otherwise. return to flat shading.
polygon 8 // polygon. 8 verts. xyz st. concrete foundation top. (this polygon should all be in one plane... there will only be one normal vector computed for it!)
-10.0 10.0 -12.0 0.60 0.00
10.0 10.0 -12.0 0.90 0.00
12.0 10.0 -10.0 1.00 0.10
12.0 10.0 10.0 1.00 0.40
10.0 10.0 12.0 0.90 0.50
-10.0 10.0 12.0 0.60 0.50
-12.0 10.0 10.0 0.50 0.40
-12.0 10.0 -10.0 0.50 0.10
quad // quad. xyz st. building side. (this polygon should all be in one plane... there will only be one normal vector computed for it!)
10.0 30.0 -10.0 0.0 1.0
10.0 10.0 -10.0 0.0 0.0
10.0 10.0 10.0 0.5 0.0
10.0 30.0 10.0 0.5 1.0
quad // quad. xyz st. building side. (this polygon should all be in one plane... there will only be one normal vector computed for it!)
10.0 30.0 10.0 0.0 1.0
10.0 10.0 10.0 0.0 0.0
-10.0 10.0 10.0 0.5 0.0
-10.0 30.0 10.0 0.5 1.0
quad // quad. xyz st. building side. (this polygon should all be in one plane... there will only be one normal vector computed for it!)
-10.0 30.0 10.0 0.0 1.0
-10.0 10.0 10.0 0.0 0.0
-10.0 10.0 -10.0 0.5 0.0
-10.0 30.0 -10.0 0.5 1.0
quad // quad. xyz st. building side. (this polygon should all be in one plane... there will only be one normal vector computed for it!)
-10.0 30.0 -10.0 0.0 1.0
-10.0 10.0 -10.0 0.0 0.0
10.0 10.0 -10.0 0.5 0.0
10.0 30.0 -10.0 0.5 1.0
tri_fan 6 // triangle fan. 6 verts. xyz st. slanted part of roof.
0.0 35.0 0.0 0.87 0.75
10.0 30.0 -10.0 0.94 0.88
10.0 30.0 10.0 0.94 0.50
-10.0 30.0 10.0 0.75 0.50
-10.0 30.0 -10.0 0.75 0.88
10.0 30.0 -10.0 0.94 0.88
smoke_white 0.0 35.0 0.0 2.0 // a point from which black smoke is emitted... there should be 4 numbers following a smoke point: x, y, z, and smoke puff siz // x, y, z, puff size
quad_strip 10 // quad strip. 10 verts. xyz st. girders on roof sides. (verts may be all in a line or paired as I have done)
-8.0 30.0 8.0 0.75 0.50 -8.0 40.0 8.0 0.75 1.0
8.0 30.0 8.0 0.50 0.50 8.0 40.0 8.0 0.50 1.0
8.0 30.0 -8.0 0.75 0.50 8.0 40.0 -8.0 0.75 1.0
-8.0 30.0 -8.0 0.50 0.50 -8.0 40.0 -8.0 0.50 1.0
-8.0 30.0 8.0 0.75 0.50 -8.0 40.0 8.0 0.75 1.0
quad_strip 10 // quad strip. 10 verts. xyz st. girders on roof sides, seen from other side. (verts may be all in a line or paired as I have done)
-8.0 30.0 8.0 0.75 0.50 -8.0 40.0 8.0 0.75 1.0
-8.0 30.0 -8.0 0.50 0.50 -8.0 40.0 -8.0 0.50 1.0
8.0 30.0 -8.0 0.75 0.50 8.0 40.0 -8.0 0.75 1.0
8.0 30.0 8.0 0.50 0.50 8.0 40.0 8.0 0.50 1.0
-8.0 30.0 8.0 0.75 0.50 -8.0 40.0 8.0 0.75 1.0
quad_hard // quad. xyz st. girder roof. (this polygon should all be in one plane... there will only be one normal vector computed for it!)
8.0 40.0 8.0 0.75 1.00
-8.0 40.0 8.0 0.50 1.00
-8.0 40.0 -8.0 0.50 0.50
8.0 40.0 -8.0 0.75 0.50
quad_hard // quad. xyz st. girder roof, seen from other sdide. (this polygon should all be in one plane... there will only be one normal vector computed for it!)
8.0 40.0 -8.0 0.75 0.50
-8.0 40.0 -8.0 0.50 0.50
-8.0 40.0 8.0 0.50 1.00
8.0 40.0 8.0 0.75 1.00
line // antenna on roof, 5 5 5 is red/green/blue color of line, each on a scale of 0 to 10.
-6.0 40.0 -6.0 5 5 5
-6.0 60.0 -6.0 5 5 5
line // antenna on roof, 5 5 5 is red/green/blue color of line, each on a scale of 0 to 10.
6.0 40.0 -6.0 5 5 5
6.0 60.0 -6.0 5 5 5
line // antenna on roof, 5 5 5 is red/green/blue color of line, each on a scale of 0 to 10.
-6.0 40.0 6.0 5 5 5
-6.0 60.0 6.0 5 5 5
line // antenna on roof, 5 5 5 is red/green/blue color of line, each on a scale of 0 to 10.
6.0 40.0 6.0 5 5 5
6.0 60.0 6.0 5 5 5
light // light on roof, 10 1 1 is red/green/blue color of light, each on a scale of 0 to 10. (99 99 99 indicates a pulsing red light)
-6.0 60.0 -6.0 10 1 1
light // light on roof, 10 1 1 is red/green/blue color of light, each on a scale of 0 to 10. (98 98 98 indicates a strobe light)
6.0 60.0 -6.0 10 1 1
light // light on roof, 10 1 1 is red/green/blue color of light, each on a scale of 0 to 10. (97 97 97 indicates a traffic light, complete with changing colors!)
-6.0 60.0 6.0 10 1 1
light // light on roof, 10 1 1 is red/green/blue color of light, each on a scale of 0 to 10. (negative numbers indicate a flashing light)
6.0 60.0 6.0 10 1 1
ATTR_LOD 1000 5000 // LOWER LEVEL OF DETAIL FOR DISTANT VIEWING: until further notice, all of this geometry is only visible if you are between the number meters specified at left from the object
quad_strip 18 // quad strip. 18 verts. xyz st. concrete foundation sides. (verts may be all in a line or paired as I have done)
-16.0 0.0 14.0 0.5 0.0 -12.0 10.0 10.0 0.50 0.50
-14.0 0.0 16.0 1.0 0.0 -10.0 10.0 12.0 1.00 0.50
14.0 0.0 16.0 0.5 0.0 10.0 10.0 12.0 0.50 0.50
16.0 0.0 14.0 1.0 0.0 12.0 10.0 10.0 1.00 0.50
16.0 0.0 -14.0 0.5 0.0 12.0 10.0 -10.0 0.50 0.50
14.0 0.0 -16.0 1.0 0.0 10.0 10.0 -12.0 1.00 0.50
-14.0 0.0 -16.0 0.5 0.0 -10.0 10.0 -12.0 0.50 0.50
-16.0 0.0 -14.0 1.0 0.0 -12.0 10.0 -10.0 1.00 0.50
-16.0 0.0 14.0 0.5 0.0 -12.0 10.0 10.0 0.50 0.50
quad // quad. xyz st. building side. (this polygon should all be in one plane... there will only be one normal vector computed for it!)
10.0 30.0 -10.0 0.0 1.0
10.0 10.0 -10.0 0.0 0.0
10.0 10.0 10.0 0.5 0.0
10.0 30.0 10.0 0.5 1.0
quad // quad. xyz st. building side. (this polygon should all be in one plane... there will only be one normal vector computed for it!)
10.0 30.0 10.0 0.0 1.0
10.0 10.0 10.0 0.0 0.0
-10.0 10.0 10.0 0.5 0.0
-10.0 30.0 10.0 0.5 1.0
quad // quad. xyz st. building side. (this polygon should all be in one plane... there will only be one normal vector computed for it!)
-10.0 30.0 10.0 0.0 1.0
-10.0 10.0 10.0 0.0 0.0
-10.0 10.0 -10.0 0.5 0.0
-10.0 30.0 -10.0 0.5 1.0
quad // quad. xyz st. building side. (this polygon should all be in one plane... there will only be one normal vector computed for it!)
-10.0 30.0 -10.0 0.0 1.0
-10.0 10.0 -10.0 0.0 0.0
10.0 10.0 -10.0 0.5 0.0
10.0 30.0 -10.0 0.5 1.0
tri_fan 6 // triangle fan. 6 verts. xyz st. slanted part of roof.
0.0 35.0 0.0 0.87 0.75
10.0 30.0 -10.0 0.94 0.88
10.0 30.0 10.0 0.94 0.50
-10.0 30.0 10.0 0.75 0.50
-10.0 30.0 -10.0 0.75 0.88
10.0 30.0 -10.0 0.94 0.88
end // end the object
Now that we have gotten to the "end" indicator, X-Plane will ignore everything else in the file... which means we can talk right here!
Here is a total list of ALL the available primitive types:
light // a single light that comes on at night
line // a single line
tri // a triangle
quad // a quad
quad_hard // a quad that you can land on... it is "hard" to airplanes and helos
quad_movie // this quad is a drive-in movie quad, showing apple advertisements at night
quad_strip // s-poly strip, no limit on number of vertices
tri_strip // tri-strip, no limit on number of vertices
tri_fan // tri-fan, no limit on number of vertices
polygon // n-sided polygon, no limit on number of vertices
smoke_black 0 10 0 2 // a point from which black smoke is emitted... 4 numbers following a smoke point: x, y, z, and smoke puff size
smoke_white 0 10 0 2 // a point from which white smoke is emitted... 4 numbers following a smoke point: x, y, z, and smoke puff size
ATTR_shade_flat // do flat-shading until further notice
ATTR_shade_smooth // do smooth-shading until further notice
ATTR_ambient_rgb 1.0 0.0 0.0 // set this ambient color until further notice (then follow this with r, g, b scaled 0.0 to 1.0 on the same line with no commas or other seperators. a comment after that is fine)
ATTR_difuse_rgb 1.0 0.0 0.0 // set this diffuse color until further notice (then follow this with r, g, b scaled 0.0 to 1.0 on the same line with no commas or other seperators. a comment after that is fine)
ATTR_specular_rgb 1.0 0.0 0.0 // set this specular color until further notice (then follow this with r, g, b scaled 0.0 to 1.0 on the same line with no commas or other seperators. a comment after that is fine)
ATTR_emission_rgb 1.0 0.0 0.0 // set this emission color until further notice (then follow this with r, g, b scaled 0.0 to 1.0 on the same line with no commas or other seperators. a comment after that is fine)
ATTR_shiny_rat 1.0 // set this shininess until further notice (then follow this a shininess scaled 0.0 to 1.0 on the same line with no commas or other seperators. a comment after that is fine)
ATTR_no_depth // dont depth test. used for markings on pavement and stuff
ATTR_depth // depth test
ATTR_poly_os 1 // polyon offset, for letting ramps sit ON TOP of terrain, and things like that. argument 0 is default (same level as the ground) 1 is raised up 1 level, 2 is raised up 2 levels, etc.
ATTR_reset // no paramters needed... this resets all the lighting and everything to default for the next stuff to be drawn in the future... this is a good idea if you have messed with liting and stuff above
for light colors, enter any three numbers 0->10 for the r, g, b color of the lites.
enter:
99 99 99 // this is pulsing red... DO NOT OFFSET BASED ON THE OBJECT, BECAUSE AUTOGEN USES THE SAME OBJECT OVER AND OVER!
98 98 98 // this is strobe... DO NOT OFFSET BASED ON THE OBJECT, BECAUSE AUTOGEN USES THE SAME OBJECT OVER AND OVER!
97 97 97 // this is traffic light... DO NOT OFFSET BASED ON THE OBJECT, BECAUSE AUTOGEN USES THE SAME OBJECT OVER AND OVER!
--------------------------------------------------------------------------------
/test/KSBD_example_orig_v8.obj:
--------------------------------------------------------------------------------
1 | I
2 | 800
3 | OBJ
4 |
5 | TEXTURE KSBD_example.png
6 | TEXTURE_LIT KSBD_example_LIT.png
7 | POINT_COUNTS 120 8 4 260
8 | VT 20.000000 0.000000 20.000000 0.000000 1.000000 0.000000 0.750000 0.880000
9 | VT -20.000000 0.000000 20.000000 0.000000 1.000000 0.000000 0.940000 0.880000
10 | VT -20.000000 0.000000 -20.000000 0.000000 1.000000 0.000000 0.940000 0.500000
11 | VT 20.000000 0.000000 -20.000000 0.000000 1.000000 0.000000 0.750000 0.500000
12 | VT -16.000000 0.000000 14.000000 -0.615457 0.492366 0.615457 0.500000 0.000000
13 | VT -12.000000 10.000000 10.000000 -0.615457 0.492366 0.615457 0.500000 0.500000
14 | VT -14.000000 0.000000 16.000000 -0.000000 0.371391 0.928477 1.000000 0.000000
15 | VT -10.000000 10.000000 12.000000 0.000000 0.371391 0.928477 1.000000 0.500000
16 | VT 14.000000 0.000000 16.000000 0.615457 0.492366 0.615457 0.500000 0.000000
17 | VT 10.000000 10.000000 12.000000 0.615457 0.492366 0.615457 0.500000 0.500000
18 | VT 16.000000 0.000000 14.000000 0.928477 0.371391 0.000000 1.000000 0.000000
19 | VT 12.000000 10.000000 10.000000 0.928477 0.371391 0.000000 1.000000 0.500000
20 | VT 16.000000 0.000000 -14.000000 0.615457 0.492366 -0.615457 0.500000 0.000000
21 | VT 12.000000 10.000000 -10.000000 0.615457 0.492366 -0.615457 0.500000 0.500000
22 | VT 14.000000 0.000000 -16.000000 0.000000 0.371391 -0.928477 1.000000 0.000000
23 | VT 10.000000 10.000000 -12.000000 0.000000 0.371391 -0.928477 1.000000 0.500000
24 | VT -14.000000 0.000000 -16.000000 -0.615457 0.492366 -0.615457 0.500000 0.000000
25 | VT -10.000000 10.000000 -12.000000 -0.615457 0.492366 -0.615457 0.500000 0.500000
26 | VT -16.000000 0.000000 -14.000000 -0.928477 0.371391 0.000000 1.000000 0.000000
27 | VT -12.000000 10.000000 -10.000000 -0.928477 0.371391 0.000000 1.000000 0.500000
28 | VT -16.000000 0.000000 14.000000 -0.928477 0.371391 0.000000 0.500000 0.000000
29 | VT -12.000000 10.000000 10.000000 -0.928477 0.371391 0.000000 0.500000 0.500000
30 | VT -10.000000 10.000000 -12.000000 0.000000 1.000000 0.000000 0.600000 0.000000
31 | VT 10.000000 10.000000 -12.000000 0.000000 1.000000 0.000000 0.900000 0.000000
32 | VT 12.000000 10.000000 -10.000000 0.000000 1.000000 0.000000 1.000000 0.100000
33 | VT 12.000000 10.000000 10.000000 0.000000 1.000000 0.000000 1.000000 0.400000
34 | VT 10.000000 10.000000 12.000000 0.000000 1.000000 0.000000 0.900000 0.500000
35 | VT -10.000000 10.000000 12.000000 0.000000 1.000000 -0.000000 0.600000 0.500000
36 | VT -12.000000 10.000000 10.000000 0.000000 1.000000 0.000000 0.500000 0.400000
37 | VT -12.000000 10.000000 -10.000000 0.000000 1.000000 0.000000 0.500000 0.100000
38 | VT 10.000000 30.000000 -10.000000 1.000000 0.000000 -0.000000 0.000000 1.000000
39 | VT 10.000000 10.000000 -10.000000 1.000000 0.000000 0.000000 0.000000 0.000000
40 | VT 10.000000 10.000000 10.000000 1.000000 0.000000 -0.000000 0.500000 0.000000
41 | VT 10.000000 30.000000 10.000000 1.000000 0.000000 -0.000000 0.500000 1.000000
42 | VT 10.000000 30.000000 10.000000 0.000000 0.000000 1.000000 0.000000 1.000000
43 | VT 10.000000 10.000000 10.000000 0.000000 0.000000 1.000000 0.000000 0.000000
44 | VT -10.000000 10.000000 10.000000 0.000000 0.000000 1.000000 0.500000 0.000000
45 | VT -10.000000 30.000000 10.000000 0.000000 0.000000 1.000000 0.500000 1.000000
46 | VT -10.000000 30.000000 10.000000 -1.000000 0.000000 -0.000000 0.000000 1.000000
47 | VT -10.000000 10.000000 10.000000 -1.000000 -0.000000 0.000000 0.000000 0.000000
48 | VT -10.000000 10.000000 -10.000000 -1.000000 0.000000 -0.000000 0.500000 0.000000
49 | VT -10.000000 30.000000 -10.000000 -1.000000 0.000000 -0.000000 0.500000 1.000000
50 | VT -10.000000 30.000000 -10.000000 0.000000 0.000000 -1.000000 0.000000 1.000000
51 | VT -10.000000 10.000000 -10.000000 0.000000 0.000000 -1.000000 0.000000 0.000000
52 | VT 10.000000 10.000000 -10.000000 0.000000 0.000000 -1.000000 0.500000 0.000000
53 | VT 10.000000 30.000000 -10.000000 0.000000 0.000000 -1.000000 0.500000 1.000000
54 | VT 0.000000 35.000000 0.000000 0.000000 0.894427 -0.447214 0.870000 0.750000
55 | VT 10.000000 30.000000 -10.000000 0.447214 0.894427 0.000000 0.940000 0.880000
56 | VT 10.000000 30.000000 10.000000 0.000000 0.894427 0.447214 0.940000 0.500000
57 | VT -10.000000 30.000000 10.000000 -0.447214 0.894427 0.000000 0.750000 0.500000
58 | VT -10.000000 30.000000 -10.000000 0.000000 0.894427 -0.447214 0.750000 0.880000
59 | VT 10.000000 30.000000 -10.000000 0.000000 0.894427 -0.447214 0.940000 0.880000
60 | VT -8.000000 30.000000 8.000000 0.000000 0.000000 1.000000 0.750000 0.500000
61 | VT -8.000000 40.000000 8.000000 0.000000 0.000000 1.000000 0.750000 1.000000
62 | VT 8.000000 30.000000 8.000000 1.000000 0.000000 0.000000 0.500000 0.500000
63 | VT 8.000000 40.000000 8.000000 1.000000 -0.000000 0.000000 0.500000 1.000000
64 | VT 8.000000 30.000000 -8.000000 0.000000 0.000000 -1.000000 0.750000 0.500000
65 | VT 8.000000 40.000000 -8.000000 0.000000 0.000000 -1.000000 0.750000 1.000000
66 | VT -8.000000 30.000000 -8.000000 -1.000000 0.000000 0.000000 0.500000 0.500000
67 | VT -8.000000 40.000000 -8.000000 -1.000000 0.000000 0.000000 0.500000 1.000000
68 | VT -8.000000 30.000000 8.000000 -1.000000 0.000000 0.000000 0.750000 0.500000
69 | VT -8.000000 40.000000 8.000000 -1.000000 0.000000 0.000000 0.750000 1.000000
70 | VT -8.000000 30.000000 8.000000 1.000000 0.000000 0.000000 0.750000 0.500000
71 | VT -8.000000 40.000000 8.000000 1.000000 -0.000000 0.000000 0.750000 1.000000
72 | VT -8.000000 30.000000 -8.000000 0.000000 0.000000 1.000000 0.500000 0.500000
73 | VT -8.000000 40.000000 -8.000000 0.000000 0.000000 1.000000 0.500000 1.000000
74 | VT 8.000000 30.000000 -8.000000 -1.000000 0.000000 0.000000 0.750000 0.500000
75 | VT 8.000000 40.000000 -8.000000 -1.000000 0.000000 0.000000 0.750000 1.000000
76 | VT 8.000000 30.000000 8.000000 0.000000 0.000000 -1.000000 0.500000 0.500000
77 | VT 8.000000 40.000000 8.000000 0.000000 0.000000 -1.000000 0.500000 1.000000
78 | VT -8.000000 30.000000 8.000000 0.000000 0.000000 -1.000000 0.750000 0.500000
79 | VT -8.000000 40.000000 8.000000 0.000000 0.000000 -1.000000 0.750000 1.000000
80 | VT 8.000000 40.000000 8.000000 0.000000 1.000000 0.000000 0.750000 1.000000
81 | VT -8.000000 40.000000 8.000000 0.000000 1.000000 0.000000 0.500000 1.000000
82 | VT -8.000000 40.000000 -8.000000 0.000000 1.000000 0.000000 0.500000 0.500000
83 | VT 8.000000 40.000000 -8.000000 0.000000 1.000000 0.000000 0.750000 0.500000
84 | VT 8.000000 40.000000 -8.000000 0.000000 -1.000000 0.000000 0.750000 0.500000
85 | VT -8.000000 40.000000 -8.000000 0.000000 -1.000000 0.000000 0.500000 0.500000
86 | VT -8.000000 40.000000 8.000000 0.000000 -1.000000 0.000000 0.500000 1.000000
87 | VT 8.000000 40.000000 8.000000 0.000000 -1.000000 0.000000 0.750000 1.000000
88 | VT -16.000000 0.000000 14.000000 -0.615457 0.492366 0.615457 0.500000 0.000000
89 | VT -12.000000 10.000000 10.000000 -0.615457 0.492366 0.615457 0.500000 0.500000
90 | VT -14.000000 0.000000 16.000000 -0.000000 0.371391 0.928477 1.000000 0.000000
91 | VT -10.000000 10.000000 12.000000 0.000000 0.371391 0.928477 1.000000 0.500000
92 | VT 14.000000 0.000000 16.000000 0.615457 0.492366 0.615457 0.500000 0.000000
93 | VT 10.000000 10.000000 12.000000 0.615457 0.492366 0.615457 0.500000 0.500000
94 | VT 16.000000 0.000000 14.000000 0.928477 0.371391 0.000000 1.000000 0.000000
95 | VT 12.000000 10.000000 10.000000 0.928477 0.371391 0.000000 1.000000 0.500000
96 | VT 16.000000 0.000000 -14.000000 0.615457 0.492366 -0.615457 0.500000 0.000000
97 | VT 12.000000 10.000000 -10.000000 0.615457 0.492366 -0.615457 0.500000 0.500000
98 | VT 14.000000 0.000000 -16.000000 0.000000 0.371391 -0.928477 1.000000 0.000000
99 | VT 10.000000 10.000000 -12.000000 0.000000 0.371391 -0.928477 1.000000 0.500000
100 | VT -14.000000 0.000000 -16.000000 -0.615457 0.492366 -0.615457 0.500000 0.000000
101 | VT -10.000000 10.000000 -12.000000 -0.615457 0.492366 -0.615457 0.500000 0.500000
102 | VT -16.000000 0.000000 -14.000000 -0.928477 0.371391 0.000000 1.000000 0.000000
103 | VT -12.000000 10.000000 -10.000000 -0.928477 0.371391 0.000000 1.000000 0.500000
104 | VT -16.000000 0.000000 14.000000 -0.928477 0.371391 0.000000 0.500000 0.000000
105 | VT -12.000000 10.000000 10.000000 -0.928477 0.371391 0.000000 0.500000 0.500000
106 | VT 10.000000 30.000000 -10.000000 1.000000 0.000000 -0.000000 0.000000 1.000000
107 | VT 10.000000 10.000000 -10.000000 1.000000 0.000000 0.000000 0.000000 0.000000
108 | VT 10.000000 10.000000 10.000000 1.000000 0.000000 -0.000000 0.500000 0.000000
109 | VT 10.000000 30.000000 10.000000 1.000000 0.000000 -0.000000 0.500000 1.000000
110 | VT 10.000000 30.000000 10.000000 0.000000 0.000000 1.000000 0.000000 1.000000
111 | VT 10.000000 10.000000 10.000000 0.000000 0.000000 1.000000 0.000000 0.000000
112 | VT -10.000000 10.000000 10.000000 0.000000 0.000000 1.000000 0.500000 0.000000
113 | VT -10.000000 30.000000 10.000000 0.000000 0.000000 1.000000 0.500000 1.000000
114 | VT -10.000000 30.000000 10.000000 -1.000000 0.000000 -0.000000 0.000000 1.000000
115 | VT -10.000000 10.000000 10.000000 -1.000000 -0.000000 0.000000 0.000000 0.000000
116 | VT -10.000000 10.000000 -10.000000 -1.000000 0.000000 -0.000000 0.500000 0.000000
117 | VT -10.000000 30.000000 -10.000000 -1.000000 0.000000 -0.000000 0.500000 1.000000
118 | VT -10.000000 30.000000 -10.000000 0.000000 0.000000 -1.000000 0.000000 1.000000
119 | VT -10.000000 10.000000 -10.000000 0.000000 0.000000 -1.000000 0.000000 0.000000
120 | VT 10.000000 10.000000 -10.000000 0.000000 0.000000 -1.000000 0.500000 0.000000
121 | VT 10.000000 30.000000 -10.000000 0.000000 0.000000 -1.000000 0.500000 1.000000
122 | VT 0.000000 35.000000 0.000000 0.000000 0.894427 -0.447214 0.870000 0.750000
123 | VT 10.000000 30.000000 -10.000000 0.447214 0.894427 0.000000 0.940000 0.880000
124 | VT 10.000000 30.000000 10.000000 0.000000 0.894427 0.447214 0.940000 0.500000
125 | VT -10.000000 30.000000 10.000000 -0.447214 0.894427 0.000000 0.750000 0.500000
126 | VT -10.000000 30.000000 -10.000000 0.000000 0.894427 -0.447214 0.750000 0.880000
127 | VT 10.000000 30.000000 -10.000000 0.000000 0.894427 -0.447214 0.940000 0.880000
128 | VLINE -6.000000 40.000000 -6.000000 0.500000 0.500000 0.500000
129 | VLINE -6.000000 60.000000 -6.000000 0.500000 0.500000 0.500000
130 | VLINE 6.000000 40.000000 -6.000000 0.500000 0.500000 0.500000
131 | VLINE 6.000000 60.000000 -6.000000 0.500000 0.500000 0.500000
132 | VLINE -6.000000 40.000000 6.000000 0.500000 0.500000 0.500000
133 | VLINE -6.000000 60.000000 6.000000 0.500000 0.500000 0.500000
134 | VLINE 6.000000 40.000000 6.000000 0.500000 0.500000 0.500000
135 | VLINE 6.000000 60.000000 6.000000 0.500000 0.500000 0.500000
136 | VLIGHT -6.000000 60.000000 -6.000000 1.000000 0.100000 0.100000
137 | VLIGHT 6.000000 60.000000 -6.000000 1.000000 0.100000 0.100000
138 | VLIGHT -6.000000 60.000000 6.000000 1.000000 0.100000 0.100000
139 | VLIGHT 6.000000 60.000000 6.000000 1.000000 0.100000 0.100000
140 | IDX10 0 1 2 0 2 3 4 5 7 4
141 | IDX10 7 6 6 7 9 6 9 8 8 9
142 | IDX10 11 8 11 10 10 11 13 10 13 12
143 | IDX10 12 13 15 12 15 14 14 15 17 14
144 | IDX10 17 16 16 17 19 16 19 18 18 19
145 | IDX10 21 18 21 20 22 23 24 22 24 25
146 | IDX10 22 25 26 22 26 27 22 27 28 22
147 | IDX10 28 29 30 31 32 30 32 33 34 35
148 | IDX10 36 34 36 37 38 39 40 38 40 41
149 | IDX10 42 43 44 42 44 45 46 47 48 46
150 | IDX10 48 49 46 49 50 46 50 51 52 53
151 | IDX10 55 52 55 54 54 55 57 54 57 56
152 | IDX10 56 57 59 56 59 58 58 59 61 58
153 | IDX10 61 60 62 63 65 62 65 64 64 65
154 | IDX10 67 64 67 66 66 67 69 66 69 68
155 | IDX10 68 69 71 68 71 70 72 73 74 72
156 | IDX10 74 75 76 77 78 76 78 79 0 1
157 | IDX10 2 3 4 5 6 7 80 81 83 80
158 | IDX10 83 82 82 83 85 82 85 84 84 85
159 | IDX10 87 84 87 86 86 87 89 86 89 88
160 | IDX10 88 89 91 88 91 90 90 91 93 90
161 | IDX10 93 92 92 93 95 92 95 94 94 95
162 | IDX10 97 94 97 96 98 99 100 98 100 101
163 | IDX10 102 103 104 102 104 105 106 107 108 106
164 | IDX10 108 109 110 111 112 110 112 113 114 115
165 | IDX10 116 114 116 117 114 117 118 114 118 119
166 | ATTR_LOD 0.000000 1000.000000
167 | ATTR_poly_os 2.000000
168 | TRIS 0 6
169 | ATTR_poly_os 0.000000
170 | ATTR_shade_smooth
171 | TRIS 6 48
172 | ATTR_shade_flat
173 | TRIS 54 54
174 | smoke_white 0.000000 35.000000 0.000000 2.000000
175 | TRIS 108 48
176 | ATTR_hard
177 | TRIS 156 12
178 | ATTR_no_hard
179 | LINES 168 8
180 | LIGHTS 0 4
181 | ATTR_LOD 1000.000000 5000.000000
182 | TRIS 176 84
183 |
--------------------------------------------------------------------------------
/test/Nimitz.blend:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Marginal/XPlane2Blender/07195742afe93cea307b6a15e9a2c4d4aac50985/test/Nimitz.blend
--------------------------------------------------------------------------------
/test/XEL_cockpit.blend:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Marginal/XPlane2Blender/07195742afe93cea307b6a15e9a2c4d4aac50985/test/XEL_cockpit.blend
--------------------------------------------------------------------------------
/test/animalpha.blend:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Marginal/XPlane2Blender/07195742afe93cea307b6a15e9a2c4d4aac50985/test/animalpha.blend
--------------------------------------------------------------------------------
/test/animalpha.obj:
--------------------------------------------------------------------------------
1 | I
2 | 800
3 | OBJ
4 |
5 | TEXTURE fac.png
6 | TEXTURE_LIT fac_LIT.png
7 | POINT_COUNTS 12 0 0 24
8 |
9 | VT 1.0000 0.0000 1.0000 0.000 1.000 0.000 1.0 1.0
10 | VT -1.0000 0.0000 1.0000 0.000 1.000 0.000 1.0 0.0
11 | VT -1.0000 0.0000 -1.0000 0.000 1.000 0.000 0.0 0.0
12 | VT 1.0000 0.0000 -1.0000 0.000 1.000 0.000 0.0 1.0
13 | VT -1.0000 0.0000 0.0000 0.000 1.000 0.000 1.0 0.0
14 | VT -1.0000 -0.0001 -2.0000 0.000 1.000 0.000 0.0 0.0
15 | VT 1.0000 0.0000 -2.0000 0.000 1.000 0.000 0.0 1.0
16 | VT 1.0000 0.0000 0.0000 0.000 1.000 0.000 1.0 1.0
17 | VT -0.9999 0.0000 2.0001 0.000 1.000 0.000 1.0 0.0
18 | VT -1.0000 0.0000 0.0001 0.000 1.000 0.000 0.0 0.0
19 | VT 1.0000 0.0000 0.0000 0.000 1.000 0.000 0.0 1.0
20 | VT 1.0001 0.0000 2.0000 0.000 1.000 0.000 1.0 1.0
21 |
22 | IDX10 0 1 2 0 2 3 4 5 6 7
23 | IDX10 4 6 7 4 6 4 5 6 11 8
24 | IDX 10
25 | IDX 8
26 | IDX 9
27 | IDX 10
28 |
29 | ATTR_no_cull
30 | TRIS 0 6
31 | ANIM_begin
32 | ANIM_trans 0.0000 0.0000 -1.0000 0.0000 0.0000 -1.0000 0 0 no_ref
33 | ANIM_rotate 0.8629 -0.3574 0.3574 98.42 0.00 0 1 sim/flightmodel/engine/ENGN_thro[0]
34 | ANIM_rotate 0.8629 -0.3574 -0.3574 0.00 261.58 0 1 sim/flightmodel/engine/ENGN_thro[0]
35 | TRIS 6 6
36 | ANIM_begin
37 | ANIM_trans 0.0000 0.0000 -2.0000 0.0000 0.0000 -2.0000 0 0 no_ref
38 | ANIM_rotate 1.0000 0.0000 0.0000 90.00 270.00 0 1 sim/flightmodel/engine/ENGN_thro[1]
39 | TRIS 12 3
40 | ####_alpha
41 | TRIS 15 3
42 | ANIM_end
43 | ANIM_begin
44 | ANIM_trans 0.0000 0.0000 -2.0000 0.0000 0.0000 -2.0000 0 0 no_ref
45 | ANIM_rotate 1.0000 0.0000 0.0000 90.00 0.00 0 1 sim/flightmodel/engine/ENGN_thro[1]
46 | ANIM_rotate 0.8629 -0.3574 0.3574 0.00 261.58 0 1 sim/flightmodel/engine/ENGN_thro[1]
47 | ####_no_alpha
48 | TRIS 18 3
49 | ####_alpha
50 | TRIS 21 3
51 | ANIM_end
52 | ANIM_end
53 |
54 | # Built with Blender 2.45. Exported with XPlane2Blender 3.10.
55 |
--------------------------------------------------------------------------------
/test/animcompound.blend:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Marginal/XPlane2Blender/07195742afe93cea307b6a15e9a2c4d4aac50985/test/animcompound.blend
--------------------------------------------------------------------------------
/test/animcompound.obj:
--------------------------------------------------------------------------------
1 | I
2 | 800
3 | OBJ
4 |
5 | TEXTURE
6 | POINT_COUNTS 12 0 0 18
7 |
8 | VT 0.1000 -1.0000 0.0000 0.000 0.000 1.000 0.0 0.0
9 | VT -0.1000 -1.0000 0.0000 0.000 0.000 1.000 0.0 0.0
10 | VT -0.1000 0.0000 0.0000 0.000 0.000 1.000 0.0 0.0
11 | VT 0.1000 0.0000 0.0000 0.000 0.000 1.000 0.0 0.0
12 | VT 0.1000 -1.0000 0.0000 0.000 0.000 1.000 0.0 0.0
13 | VT -0.1000 -1.0000 0.0000 0.000 0.000 1.000 0.0 0.0
14 | VT -0.1000 -0.5000 0.0000 0.000 0.000 1.000 0.0 0.0
15 | VT 0.1000 -0.5000 0.0000 0.000 0.000 1.000 0.0 0.0
16 | VT 0.1000 -0.5000 0.0000 0.000 0.000 1.000 0.0 0.0
17 | VT -0.1000 -0.5000 0.0000 0.000 0.000 1.000 0.0 0.0
18 | VT -0.1000 0.0000 0.0000 0.000 0.000 1.000 0.0 0.0
19 | VT 0.1000 0.0000 0.0000 0.000 0.000 1.000 0.0 0.0
20 |
21 | IDX10 0 1 2 0 2 3 4 5 6 4
22 | IDX 6
23 | IDX 7
24 | IDX 8
25 | IDX 9
26 | IDX 10
27 | IDX 8
28 | IDX 10
29 | IDX 11
30 |
31 | ATTR_no_cull
32 | TRIS 0 6
33 | ATTR_cull
34 | ANIM_begin
35 | ANIM_trans 0.0000 1.0000 0.0000 0.0000 1.0000 0.0000 0 0 no_ref
36 | ANIM_rotate -1.0000 0.0000 0.0000 45.00 -45.00 0 1 sim/flightmodel/engine/ENGN_thro[1]
37 | TRIS 6 6
38 | ATTR_no_cull
39 | TRIS 12 6
40 | ANIM_end
41 |
42 | # Built with Blender 2.44. Exported with XPlane2Blender 2.39.
43 |
--------------------------------------------------------------------------------
/test/animerrs.blend:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Marginal/XPlane2Blender/07195742afe93cea307b6a15e9a2c4d4aac50985/test/animerrs.blend
--------------------------------------------------------------------------------
/test/animkey.blend:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Marginal/XPlane2Blender/07195742afe93cea307b6a15e9a2c4d4aac50985/test/animkey.blend
--------------------------------------------------------------------------------
/test/animkey.obj:
--------------------------------------------------------------------------------
1 | I
2 | 800
3 | OBJ
4 |
5 | TEXTURE
6 | POINT_COUNTS 52 0 0 84
7 |
8 | VT 3.1000 2.0000 -4.0000 0.000 0.000 -1.000 0.0 0.0
9 | VT 2.9000 2.0000 -4.0000 0.000 0.000 -1.000 0.0 0.0
10 | VT 2.9000 0.0000 -4.0000 0.000 0.000 -1.000 0.0 0.0
11 | VT 3.1000 0.0000 -4.0000 0.000 0.000 -1.000 0.0 0.0
12 | VT 2.5000 0.0000 -4.5000 0.000 -1.000 0.000 0.0 0.0
13 | VT 2.5000 0.0000 -3.5000 0.000 -1.000 0.000 0.0 0.0
14 | VT 3.5000 0.0000 -3.5000 0.000 -1.000 0.000 0.0 0.0
15 | VT 3.5000 0.0000 -4.5000 0.000 -1.000 0.000 0.0 0.0
16 | VT 3.5000 1.0000 -3.5000 0.000 1.000 0.000 0.0 0.0
17 | VT 2.5000 1.0000 -3.5000 0.000 1.000 0.000 0.0 0.0
18 | VT 2.5000 1.0000 -4.5000 0.000 1.000 0.000 0.0 0.0
19 | VT 3.5000 1.0000 -4.5000 0.000 1.000 0.000 0.0 0.0
20 | VT 3.5000 0.0000 -3.5000 1.000 0.000 0.000 0.0 0.0
21 | VT 3.5000 1.0000 -3.5000 1.000 0.000 0.000 0.0 0.0
22 | VT 3.5000 1.0000 -4.5000 1.000 0.000 0.000 0.0 0.0
23 | VT 3.5000 0.0000 -4.5000 1.000 0.000 0.000 0.0 0.0
24 | VT 2.5000 0.0000 -3.5000 0.000 0.000 1.000 0.0 0.0
25 | VT 2.5000 1.0000 -3.5000 0.000 0.000 1.000 0.0 0.0
26 | VT 3.5000 1.0000 -3.5000 0.000 0.000 1.000 0.0 0.0
27 | VT 3.5000 0.0000 -3.5000 0.000 0.000 1.000 0.0 0.0
28 | VT 2.5000 0.0000 -4.5000 -1.000 0.000 0.000 0.0 0.0
29 | VT 2.5000 1.0000 -4.5000 -1.000 0.000 0.000 0.0 0.0
30 | VT 2.5000 1.0000 -3.5000 -1.000 0.000 0.000 0.0 0.0
31 | VT 2.5000 0.0000 -3.5000 -1.000 0.000 0.000 0.0 0.0
32 | VT 2.5000 1.0000 -4.5000 0.000 0.000 -1.000 0.0 0.0
33 | VT 2.5000 0.0000 -4.5000 0.000 0.000 -1.000 0.0 0.0
34 | VT 3.5000 0.0000 -4.5000 0.000 0.000 -1.000 0.0 0.0
35 | VT 3.5000 1.0000 -4.5000 0.000 0.000 -1.000 0.0 0.0
36 | VT 1.0000 2.7000 -4.6000 0.000 1.000 0.000 0.0 0.0
37 | VT 0.0000 2.7000 -4.6000 0.000 1.000 0.000 0.0 0.0
38 | VT 0.0000 2.7000 -4.8000 0.000 1.000 0.000 0.0 0.0
39 | VT 1.0000 2.7000 -4.8000 0.000 1.000 0.000 0.0 0.0
40 | VT 7.0000 2.7000 -3.2000 0.000 1.000 0.000 0.0 0.0
41 | VT 5.0000 2.7000 -3.2000 0.000 1.000 0.000 0.0 0.0
42 | VT 5.0000 2.7000 -3.4000 0.000 1.000 0.000 0.0 0.0
43 | VT 7.0000 2.7000 -3.4000 0.000 1.000 0.000 0.0 0.0
44 | VT -1.0000 2.7707 -4.6293 0.000 0.707 -0.707 0.0 0.0
45 | VT -2.0000 2.7707 -4.6293 0.000 0.707 -0.707 0.0 0.0
46 | VT -2.0000 2.6293 -4.7707 0.000 0.707 -0.707 0.0 0.0
47 | VT -1.0000 2.6293 -4.7707 0.000 0.707 -0.707 0.0 0.0
48 | VT 9.0000 2.7707 -3.2293 0.000 0.707 -0.707 0.0 0.0
49 | VT 8.0000 2.7707 -3.2293 0.000 0.707 -0.707 0.0 0.0
50 | VT 8.0000 2.6293 -3.3707 0.000 0.707 -0.707 0.0 0.0
51 | VT 9.0000 2.6293 -3.3707 0.000 0.707 -0.707 0.0 0.0
52 | VT 0.0000 1.0000 0.1000 -1.000 0.000 0.000 0.0 0.0
53 | VT 0.0000 1.0000 -0.1000 -1.000 0.000 0.000 0.0 0.0
54 | VT 0.0000 2.0000 -0.1000 -1.000 0.000 0.000 0.0 0.0
55 | VT 0.0000 2.0000 0.1000 -1.000 0.000 0.000 0.0 0.0
56 | VT 0.1000 0.0000 0.0000 0.000 0.000 1.000 0.0 0.0
57 | VT -0.1000 0.0000 0.0000 0.000 0.000 1.000 0.0 0.0
58 | VT -0.1000 1.0000 0.0000 0.000 0.000 1.000 0.0 0.0
59 | VT 0.1000 1.0000 0.0000 0.000 0.000 1.000 0.0 0.0
60 |
61 | IDX10 4 5 6 4 6 7 8 9 10 8
62 | IDX10 10 11 12 13 14 12 14 15 16 17
63 | IDX10 18 16 18 19 20 21 22 20 22 23
64 | IDX10 24 25 26 24 26 27 0 1 2 0
65 | IDX10 2 3 28 29 30 28 30 31 32 33
66 | IDX10 34 32 34 35 36 37 38 36 38 39
67 | IDX10 40 41 42 40 42 43 48 49 50 48
68 | IDX10 50 51 44 45 46 44 46 47 44 45
69 | IDX 46
70 | IDX 44
71 | IDX 46
72 | IDX 47
73 |
74 | TRIS 0 36
75 | ATTR_no_cull
76 | TRIS 36 30
77 | ANIM_begin
78 | ANIM_hide 4 5 sim/flightmodel/engine/ENGN_thro_use[4]
79 | ANIM_trans 3.0000 2.0000 -4.0000 3.0000 2.0000 -4.0000 0 0 no_ref
80 | ANIM_rotate_begin -1.0000 0.0000 0.0000 sim/flightmodel/engine/ENGN_thro_use[0]
81 | ANIM_rotate_key 0 0.00
82 | ANIM_rotate_key 0.5 45.00
83 | ANIM_rotate_key 1 -45.00
84 | ANIM_rotate_end
85 | TRIS 66 6
86 | ANIM_begin
87 | ANIM_show 1 2 sim/flightmodel/engine/ENGN_thro_use[1]
88 | ANIM_hide 1.5 2.0 sim/flightmodel/engine/ENGN_thro_use[1]
89 | ANIM_trans 0.0000 1.0000 0.0000 0.0000 1.0000 0.0000 0 0 no_ref
90 | ANIM_rotate_begin 0 0 1 sim/flightmodel/engine/ENGN_thro_use[1]
91 | ANIM_rotate_key 0 0.00
92 | ANIM_rotate_key 0.5 90.00
93 | ANIM_rotate_key 1.0 -90.00
94 | ANIM_keyframe_loop 8.0
95 | ANIM_rotate_end
96 | ANIM_rotate_begin 0 1 0 sim/flightmodel/engine/ENGN_thro_use[1]
97 | ANIM_rotate_key 0 0.00
98 | ANIM_rotate_key 0.5 -45.00
99 | ANIM_rotate_key 1.0 135.00
100 | ANIM_keyframe_loop 8.0
101 | ANIM_rotate_end
102 | ANIM_rotate_begin 1 0 0 sim/flightmodel/engine/ENGN_thro_use[1]
103 | ANIM_rotate_key 0 0.00
104 | ANIM_rotate_key 0.5 -0.00
105 | ANIM_rotate_key 1.0 0.00
106 | ANIM_keyframe_loop 8.0
107 | ANIM_rotate_end
108 | TRIS 72 6
109 | ANIM_begin
110 | ANIM_trans_begin sim/flightmodel/engine/ENGN_thro_use[2]
111 | ANIM_trans_key 0 0.0000 2.0000 0.0000
112 | ANIM_trans_key 0.75 0.0000 2.0000 0.0000
113 | ANIM_trans_key 1.0 0.0000 3.0000 0.0000
114 | ANIM_trans_key 1 0.0000 5.0000 0.0000
115 | ANIM_keyframe_loop 4.0
116 | ANIM_trans_end
117 | ANIM_rotate_begin 0.0000 1.0000 0.0000 sim/flightmodel/engine/ENGN_thro_use[2]
118 | ANIM_rotate_key 0 0.00
119 | ANIM_rotate_key 0.75 45.00
120 | ANIM_rotate_key 1.0 -45.00
121 | ANIM_rotate_key 1 -45.00
122 | ANIM_keyframe_loop 4.0
123 | ANIM_rotate_end
124 | TRIS 78 6
125 | ANIM_end
126 | ANIM_end
127 | ANIM_end
128 |
129 | # Built with Blender 2.45. Exported with XPlane2Blender 3.06.
130 |
--------------------------------------------------------------------------------
/test/animmulti.blend:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Marginal/XPlane2Blender/07195742afe93cea307b6a15e9a2c4d4aac50985/test/animmulti.blend
--------------------------------------------------------------------------------
/test/animmulti.obj:
--------------------------------------------------------------------------------
1 | I
2 | 800
3 | OBJ
4 |
5 | TEXTURE
6 | POINT_COUNTS 52 0 0 84
7 |
8 | VT 3.1000 2.0000 -4.0000 0.000 0.000 -1.000 0.0 0.0
9 | VT 2.9000 2.0000 -4.0000 0.000 0.000 -1.000 0.0 0.0
10 | VT 2.9000 0.0000 -4.0000 0.000 0.000 -1.000 0.0 0.0
11 | VT 3.1000 0.0000 -4.0000 0.000 0.000 -1.000 0.0 0.0
12 | VT 2.5000 0.0000 -4.5000 0.000 -1.000 0.000 0.0 0.0
13 | VT 2.5000 0.0000 -3.5000 0.000 -1.000 0.000 0.0 0.0
14 | VT 3.5000 0.0000 -3.5000 0.000 -1.000 0.000 0.0 0.0
15 | VT 3.5000 0.0000 -4.5000 0.000 -1.000 0.000 0.0 0.0
16 | VT 3.5000 1.0000 -3.5000 0.000 1.000 0.000 0.0 0.0
17 | VT 2.5000 1.0000 -3.5000 0.000 1.000 0.000 0.0 0.0
18 | VT 2.5000 1.0000 -4.5000 0.000 1.000 0.000 0.0 0.0
19 | VT 3.5000 1.0000 -4.5000 0.000 1.000 0.000 0.0 0.0
20 | VT 3.5000 0.0000 -3.5000 1.000 0.000 0.000 0.0 0.0
21 | VT 3.5000 1.0000 -3.5000 1.000 0.000 0.000 0.0 0.0
22 | VT 3.5000 1.0000 -4.5000 1.000 0.000 0.000 0.0 0.0
23 | VT 3.5000 0.0000 -4.5000 1.000 0.000 0.000 0.0 0.0
24 | VT 2.5000 0.0000 -3.5000 0.000 0.000 1.000 0.0 0.0
25 | VT 2.5000 1.0000 -3.5000 0.000 0.000 1.000 0.0 0.0
26 | VT 3.5000 1.0000 -3.5000 0.000 0.000 1.000 0.0 0.0
27 | VT 3.5000 0.0000 -3.5000 0.000 0.000 1.000 0.0 0.0
28 | VT 2.5000 0.0000 -4.5000 -1.000 0.000 0.000 0.0 0.0
29 | VT 2.5000 1.0000 -4.5000 -1.000 0.000 0.000 0.0 0.0
30 | VT 2.5000 1.0000 -3.5000 -1.000 0.000 0.000 0.0 0.0
31 | VT 2.5000 0.0000 -3.5000 -1.000 0.000 0.000 0.0 0.0
32 | VT 2.5000 1.0000 -4.5000 0.000 0.000 -1.000 0.0 0.0
33 | VT 2.5000 0.0000 -4.5000 0.000 0.000 -1.000 0.0 0.0
34 | VT 3.5000 0.0000 -4.5000 0.000 0.000 -1.000 0.0 0.0
35 | VT 3.5000 1.0000 -4.5000 0.000 0.000 -1.000 0.0 0.0
36 | VT 1.0000 2.7000 -4.6000 0.000 1.000 0.000 0.0 0.0
37 | VT 0.0000 2.7000 -4.6000 0.000 1.000 0.000 0.0 0.0
38 | VT 0.0000 2.7000 -4.8000 0.000 1.000 0.000 0.0 0.0
39 | VT 1.0000 2.7000 -4.8000 0.000 1.000 0.000 0.0 0.0
40 | VT 7.0000 2.7000 -3.2000 0.000 1.000 0.000 0.0 0.0
41 | VT 5.0000 2.7000 -3.2000 0.000 1.000 0.000 0.0 0.0
42 | VT 5.0000 2.7000 -3.4000 0.000 1.000 0.000 0.0 0.0
43 | VT 7.0000 2.7000 -3.4000 0.000 1.000 0.000 0.0 0.0
44 | VT -1.0000 2.7707 -4.6293 0.000 0.707 -0.707 0.0 0.0
45 | VT -2.0000 2.7707 -4.6293 0.000 0.707 -0.707 0.0 0.0
46 | VT -2.0000 2.6293 -4.7707 0.000 0.707 -0.707 0.0 0.0
47 | VT -1.0000 2.6293 -4.7707 0.000 0.707 -0.707 0.0 0.0
48 | VT 9.0000 2.7707 -3.2293 0.000 0.707 -0.707 0.0 0.0
49 | VT 8.0000 2.7707 -3.2293 0.000 0.707 -0.707 0.0 0.0
50 | VT 8.0000 2.6293 -3.3707 0.000 0.707 -0.707 0.0 0.0
51 | VT 9.0000 2.6293 -3.3707 0.000 0.707 -0.707 0.0 0.0
52 | VT 0.0000 1.0000 0.1000 -1.000 0.000 0.000 0.0 0.0
53 | VT 0.0000 1.0000 -0.1000 -1.000 0.000 0.000 0.0 0.0
54 | VT 0.0001 2.0000 -0.1000 -1.000 0.000 0.000 0.0 0.0
55 | VT 0.0001 2.0000 0.1000 -1.000 0.000 0.000 0.0 0.0
56 | VT 0.1000 0.0000 0.0000 0.000 0.000 1.000 0.0 0.0
57 | VT -0.1000 0.0000 0.0000 0.000 0.000 1.000 0.0 0.0
58 | VT -0.1000 1.0000 0.0000 0.000 0.000 1.000 0.0 0.0
59 | VT 0.1000 1.0000 0.0000 0.000 0.000 1.000 0.0 0.0
60 |
61 | IDX10 4 5 6 4 6 7 8 9 10 8
62 | IDX10 10 11 12 13 14 12 14 15 16 17
63 | IDX10 18 16 18 19 20 21 22 20 22 23
64 | IDX10 24 25 26 24 26 27 0 1 2 0
65 | IDX10 2 3 28 29 30 28 30 31 32 33
66 | IDX10 34 32 34 35 36 37 38 36 38 39
67 | IDX10 40 41 42 40 42 43 48 49 50 48
68 | IDX10 50 51 44 45 46 44 46 47 44 45
69 | IDX 46
70 | IDX 44
71 | IDX 46
72 | IDX 47
73 |
74 | TRIS 0 36
75 | ATTR_no_cull
76 | TRIS 36 30
77 | ANIM_begin
78 | ANIM_hide 4 5 sim/flightmodel/engine/ENGN_thro_use[4]
79 | ANIM_trans 3.0000 2.0000 -4.0000 3.0000 2.0000 -4.0000 0 0 no_ref
80 | ANIM_rotate -1.0000 0.0000 0.0000 45.00 -45.00 0 4 sim/flightmodel/engine/ENGN_thro_use[0]
81 | TRIS 66 6
82 | ANIM_begin
83 | ANIM_hide 1 2 sim/flightmodel/engine/ENGN_thro_use[1]
84 | ANIM_trans 0.0000 1.0000 0.0000 0.0000 1.0000 0.0000 0 0 no_ref
85 | ANIM_rotate 0.3574 -0.3574 0.8629 98.42 0.00 0 1 sim/flightmodel/engine/ENGN_thro_use[1]
86 | ANIM_rotate -0.3574 -0.3574 -0.8629 0.00 98.42 0 1 sim/flightmodel/engine/ENGN_thro_use[1]
87 | TRIS 72 6
88 | ANIM_begin
89 | ANIM_trans 0.0000 2.0000 0.0000 0.0000 3.0000 0.0000 0 1 sim/flightmodel/engine/ENGN_thro_use[2]
90 | ANIM_rotate 0.0000 1.0000 0.0000 45.00 -45.00 0 1 sim/flightmodel/engine/ENGN_thro_use[2]
91 | TRIS 78 6
92 | ANIM_end
93 | ANIM_end
94 | ANIM_end
95 |
96 | # Built with Blender 2.45. Exported with XPlane2Blender 3.00.
97 |
--------------------------------------------------------------------------------
/test/animoverride.blend:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Marginal/XPlane2Blender/07195742afe93cea307b6a15e9a2c4d4aac50985/test/animoverride.blend
--------------------------------------------------------------------------------
/test/animoverride.obj:
--------------------------------------------------------------------------------
1 | I
2 | 800
3 | OBJ
4 |
5 | TEXTURE
6 | POINT_COUNTS 8 0 0 12
7 |
8 | VT 0.1000 -1.0000 0.0000 0.000 0.000 1.000 0.0 0.0
9 | VT -0.1000 -1.0000 0.0000 0.000 0.000 1.000 0.0 0.0
10 | VT -0.1000 0.0000 0.0000 0.000 0.000 1.000 0.0 0.0
11 | VT 0.1000 0.0000 0.0000 0.000 0.000 1.000 0.0 0.0
12 | VT 0.1000 -1.0000 0.0000 0.000 0.000 1.000 0.0 0.0
13 | VT -0.1000 -1.0000 0.0000 0.000 0.000 1.000 0.0 0.0
14 | VT -0.1000 0.0000 0.0000 0.000 0.000 1.000 0.0 0.0
15 | VT 0.1000 0.0000 0.0000 0.000 0.000 1.000 0.0 0.0
16 |
17 | IDX10 0 1 2 0 2 3 4 5 6 4
18 | IDX 6
19 | IDX 7
20 |
21 | ATTR_no_cull
22 | TRIS 0 6
23 | ANIM_begin
24 | ANIM_trans 0.0000 1.0000 0.0000 0.0000 1.0000 0.0000 0 0 no_ref
25 | ANIM_rotate -1.0000 0.0000 0.0000 45.00 -45.00 0 1 sim/flightmodel/position/R[1]
26 | TRIS 6 6
27 | ANIM_end
28 |
29 | # Built with Blender 2.45. Exported with XPlane2Blender 2.46.
30 |
--------------------------------------------------------------------------------
/test/animreuse.blend:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Marginal/XPlane2Blender/07195742afe93cea307b6a15e9a2c4d4aac50985/test/animreuse.blend
--------------------------------------------------------------------------------
/test/animreuse.obj:
--------------------------------------------------------------------------------
1 | I
2 | 800
3 | OBJ
4 |
5 | TEXTURE
6 | POINT_COUNTS 24 0 0 72
7 |
8 | VT 0.000 1.000 0.000 0.000 1.000 0.000 0.0 0.0
9 | VT 0.000 1.000 -2.000 0.000 1.000 0.000 0.0 0.0
10 | VT 2.000 1.000 -2.000 0.000 1.000 0.000 0.0 0.0
11 | VT 2.000 1.000 0.000 0.000 1.000 0.000 0.0 0.0
12 | VT 0.000 -1.000 0.000 0.000 -1.000 0.000 0.0 0.0
13 | VT 2.000 -1.000 0.000 0.000 -1.000 0.000 0.0 0.0
14 | VT 2.000 -1.000 -2.000 0.000 -1.000 0.000 0.0 0.0
15 | VT 0.000 -1.000 -2.000 0.000 -1.000 0.000 0.0 0.0
16 | VT 0.000 1.000 0.000 -1.000 0.000 0.000 0.0 0.0
17 | VT 0.000 -1.000 0.000 -1.000 0.000 0.000 0.0 0.0
18 | VT 0.000 -1.000 -2.000 -1.000 0.000 0.000 0.0 0.0
19 | VT 0.000 1.000 -2.000 -1.000 0.000 0.000 0.0 0.0
20 | VT 0.000 1.000 -2.000 0.000 0.000 -1.000 0.0 0.0
21 | VT 0.000 -1.000 -2.000 0.000 0.000 -1.000 0.0 0.0
22 | VT 2.000 -1.000 -2.000 0.000 0.000 -1.000 0.0 0.0
23 | VT 2.000 1.000 -2.000 0.000 0.000 -1.000 0.0 0.0
24 | VT 2.000 1.000 -2.000 1.000 0.000 0.000 0.0 0.0
25 | VT 2.000 -1.000 -2.000 1.000 0.000 0.000 0.0 0.0
26 | VT 2.000 -1.000 0.000 1.000 0.000 0.000 0.0 0.0
27 | VT 2.000 1.000 0.000 1.000 0.000 0.000 0.0 0.0
28 | VT 0.000 -1.000 0.000 0.000 0.000 1.000 0.0 0.0
29 | VT 0.000 1.000 0.000 0.000 0.000 1.000 0.0 0.0
30 | VT 2.000 1.000 0.000 0.000 0.000 1.000 0.0 0.0
31 | VT 2.000 -1.000 0.000 0.000 0.000 1.000 0.0 0.0
32 |
33 | IDX10 0 1 2 0 2 3 4 5 6 4
34 | IDX10 6 7 8 9 10 8 10 11 12 13
35 | IDX10 14 12 14 15 16 17 18 16 18 19
36 | IDX10 20 21 22 20 22 23 0 1 2 0
37 | IDX10 2 3 4 5 6 4 6 7 8 9
38 | IDX10 10 8 10 11 12 13 14 12 14 15
39 | IDX10 16 17 18 16 18 19 20 21 22 20
40 | IDX 22
41 | IDX 23
42 |
43 | slung_load_weight 5
44 |
45 | ANIM_begin
46 | ANIM_trans 1.000 0.000 -1.000 1.000 0.000 -1.000 0 0 no_ref
47 | ANIM_rotate 0.000 -1.000 0.000 0.00 90.00 0 1 sim/flightmodel/engine/ENGN_thro[0]
48 | TRIS 0 36
49 | ANIM_end
50 | ANIM_begin
51 | ANIM_trans 4.000 0.000 -1.000 4.000 0.000 -1.000 0 0 no_ref
52 | ANIM_rotate 0.000 -1.000 0.000 0.00 90.00 0 1 sim/flightmodel/engine/ENGN_thro[1]
53 | TRIS 36 36
54 | ANIM_end
55 |
56 | # Built with Blender 2.41. Exported with XPlane2Blender 2.20.
57 |
--------------------------------------------------------------------------------
/test/animskip.blend:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Marginal/XPlane2Blender/07195742afe93cea307b6a15e9a2c4d4aac50985/test/animskip.blend
--------------------------------------------------------------------------------
/test/animskip.obj:
--------------------------------------------------------------------------------
1 | I
2 | 800
3 | OBJ
4 |
5 | TEXTURE
6 | POINT_COUNTS 8 0 0 24
7 |
8 | VT 1.0000 0.0000 1.0000 0.000 1.000 0.000 0.0 0.0
9 | VT -1.0000 0.0000 1.0000 0.000 1.000 0.000 0.0 0.0
10 | VT -1.0000 0.0000 -1.0000 0.000 1.000 0.000 0.0 0.0
11 | VT 1.0000 0.0000 -1.0000 0.000 1.000 0.000 0.0 0.0
12 | VT 1.0000 0.0000 0.0000 0.000 1.000 0.000 0.0 0.0
13 | VT -1.0000 0.0000 0.0000 0.000 1.000 0.000 0.0 0.0
14 | VT -1.0000 0.0000 -2.0000 0.000 1.000 0.000 0.0 0.0
15 | VT 1.0000 0.0000 -2.0000 0.000 1.000 0.000 0.0 0.0
16 |
17 | IDX10 0 1 2 0 2 3 4 5 6 4
18 | IDX10 6 7 4 5 6 4 6 7 4 5
19 | IDX 6
20 | IDX 4
21 | IDX 6
22 | IDX 7
23 |
24 | ATTR_no_cull
25 | TRIS 0 6
26 | ANIM_begin
27 | ANIM_trans_begin sim/flightmodel/engine/ENGN_thro[0]
28 | ANIM_trans_key 0 0.0000 0.0000 -1.0000
29 | ANIM_trans_key 0.3333 0.0000 0.0000 -1.3333
30 | ANIM_trans_key 0.6667 0.0000 0.0000 -1.6667
31 | ANIM_trans_key 1 0.0000 0.0000 -2.0000
32 | ANIM_trans_end
33 | ANIM_rotate_begin 1.0000 0.0000 0.0000 sim/flightmodel/engine/ENGN_thro[0]
34 | ANIM_rotate_key 0 0.00
35 | ANIM_rotate_key 0.3333 43.42
36 | ANIM_rotate_key 0.6667 77.84
37 | ANIM_rotate_key 1 90.00
38 | ANIM_rotate_end
39 | TRIS 6 6
40 | ANIM_begin
41 | ANIM_trans 0.0000 0.0000 -2.0000 0.0000 0.0000 -2.0000 0 0 no_ref
42 | ANIM_rotate 1.0000 0.0000 0.0000 0.00 45.00 0 0.3333 sim/flightmodel/engine/ENGN_thro[0]
43 | TRIS 12 6
44 | ANIM_begin
45 | ANIM_trans 0.0000 0.0000 -2.0000 0.0000 0.0000 -2.0000 0 0 no_ref
46 | ANIM_rotate_begin 1.0000 0.0000 0.0000 sim/flightmodel/engine/ENGN_thro[0]
47 | ANIM_rotate_key 0 45.00
48 | ANIM_rotate_key 0.3333 45.00
49 | ANIM_rotate_key 0.6667 90.00
50 | ANIM_rotate_end
51 | TRIS 18 6
52 | ANIM_end
53 | ANIM_end
54 | ANIM_end
55 |
56 | # Built with Blender 2.45. Exported with XPlane2Blender 3.10.
57 |
--------------------------------------------------------------------------------
/test/connected.blend:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Marginal/XPlane2Blender/07195742afe93cea307b6a15e9a2c4d4aac50985/test/connected.blend
--------------------------------------------------------------------------------
/test/gmaxTest/EnvMap09.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Marginal/XPlane2Blender/07195742afe93cea307b6a15e9a2c4d4aac50985/test/gmaxTest/EnvMap09.png
--------------------------------------------------------------------------------
/test/gmaxTest/FS2X-palette.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Marginal/XPlane2Blender/07195742afe93cea307b6a15e9a2c4d4aac50985/test/gmaxTest/FS2X-palette.png
--------------------------------------------------------------------------------
/test/gmaxTest/Panel.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Marginal/XPlane2Blender/07195742afe93cea307b6a15e9a2c4d4aac50985/test/gmaxTest/Panel.png
--------------------------------------------------------------------------------
/test/gmaxTest/beach_envmap.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Marginal/XPlane2Blender/07195742afe93cea307b6a15e9a2c4d4aac50985/test/gmaxTest/beach_envmap.png
--------------------------------------------------------------------------------
/test/gmaxTest/blank.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Marginal/XPlane2Blender/07195742afe93cea307b6a15e9a2c4d4aac50985/test/gmaxTest/blank.png
--------------------------------------------------------------------------------
/test/gmaxTest/gmaxTest.MDL:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Marginal/XPlane2Blender/07195742afe93cea307b6a15e9a2c4d4aac50985/test/gmaxTest/gmaxTest.MDL
--------------------------------------------------------------------------------
/test/gmaxTest/gmaxTest.blend:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Marginal/XPlane2Blender/07195742afe93cea307b6a15e9a2c4d4aac50985/test/gmaxTest/gmaxTest.blend
--------------------------------------------------------------------------------
/test/gmaxTest/gmaxTest.gmax:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Marginal/XPlane2Blender/07195742afe93cea307b6a15e9a2c4d4aac50985/test/gmaxTest/gmaxTest.gmax
--------------------------------------------------------------------------------
/test/gmaxTest/gmaxTest.x:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Marginal/XPlane2Blender/07195742afe93cea307b6a15e9a2c4d4aac50985/test/gmaxTest/gmaxTest.x
--------------------------------------------------------------------------------
/test/gmaxTest/palette.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Marginal/XPlane2Blender/07195742afe93cea307b6a15e9a2c4d4aac50985/test/gmaxTest/palette.png
--------------------------------------------------------------------------------
/test/hardtest.blend:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Marginal/XPlane2Blender/07195742afe93cea307b6a15e9a2c4d4aac50985/test/hardtest.blend
--------------------------------------------------------------------------------
/test/hardtest.obj:
--------------------------------------------------------------------------------
1 | I
2 | 800
3 | OBJ
4 |
5 | TEXTURE
6 | POINT_COUNTS 24 0 0 36
7 |
8 | VT -1.0000 0.0000 0.0000 0.000 1.000 0.000 0.0 0.0
9 | VT -3.0000 0.0000 0.0000 0.000 1.000 0.000 0.0 0.0
10 | VT -3.0000 0.0000 -2.0000 0.000 1.000 0.000 0.0 0.0
11 | VT -1.0000 0.0000 -2.0000 0.000 1.000 0.000 0.0 0.0
12 | VT 1.0000 0.0000 0.0000 0.000 1.000 0.000 0.0 0.0
13 | VT -1.0000 0.0000 0.0000 0.000 1.000 0.000 0.0 0.0
14 | VT -1.0000 0.0000 -2.0000 0.000 1.000 0.000 0.0 0.0
15 | VT 1.0000 0.0000 -2.0000 0.000 1.000 0.000 0.0 0.0
16 | VT 3.0000 0.0000 0.0000 0.000 1.000 0.000 0.0 0.0
17 | VT 1.0000 0.0000 0.0000 0.000 1.000 0.000 0.0 0.0
18 | VT 1.0000 0.0000 -2.0000 0.000 1.000 0.000 0.0 0.0
19 | VT 3.0000 0.0000 -2.0000 0.000 1.000 0.000 0.0 0.0
20 | VT 3.0000 0.0000 2.0000 0.000 1.000 0.000 0.0 0.0
21 | VT 1.0000 0.0000 2.0000 0.000 1.000 0.000 0.0 0.0
22 | VT 1.0000 0.0000 0.0000 0.000 1.000 0.000 0.0 0.0
23 | VT 3.0000 0.0000 0.0000 0.000 1.000 0.000 0.0 0.0
24 | VT 1.0000 0.0000 2.0000 0.000 1.000 0.000 0.0 0.0
25 | VT -1.0000 0.0000 2.0000 0.000 1.000 0.000 0.0 0.0
26 | VT -1.0000 0.0000 0.0000 0.000 1.000 0.000 0.0 0.0
27 | VT 1.0000 0.0000 0.0000 0.000 1.000 0.000 0.0 0.0
28 | VT -1.0000 0.0000 2.0000 0.000 1.000 0.000 0.0 0.0
29 | VT -3.0000 0.0000 2.0000 0.000 1.000 0.000 0.0 0.0
30 | VT -3.0000 0.0000 0.0000 0.000 1.000 0.000 0.0 0.0
31 | VT -1.0000 0.0000 0.0000 0.000 1.000 0.000 0.0 0.0
32 |
33 | IDX10 0 1 2 0 2 3 20 21 22 20
34 | IDX10 22 23 4 5 6 4 6 7 8 9
35 | IDX10 10 8 10 11 16 17 18 16 18 19
36 | IDX 12
37 | IDX 13
38 | IDX 14
39 | IDX 12
40 | IDX 14
41 | IDX 15
42 |
43 | TRIS 0 12
44 | ATTR_hard
45 | TRIS 12 6
46 | ATTR_hard asphalt
47 | TRIS 18 6
48 | ATTR_hard
49 | ATTR_hard_deck
50 | TRIS 24 6
51 | ATTR_hard asphalt
52 | ATTR_hard_deck asphalt
53 | TRIS 30 6
54 |
55 | # Built with Blender 2.45. Exported with XPlane2Blender 3.06.
56 |
--------------------------------------------------------------------------------
/test/hidetest.blend:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Marginal/XPlane2Blender/07195742afe93cea307b6a15e9a2c4d4aac50985/test/hidetest.blend
--------------------------------------------------------------------------------
/test/hidetest.obj:
--------------------------------------------------------------------------------
1 | I
2 | 800
3 | OBJ
4 |
5 | TEXTURE
6 | POINT_COUNTS 16 0 0 24
7 |
8 | VT 0.1000 -1.0000 0.0000 0.000 0.000 1.000 0.0 0.0
9 | VT -0.1000 -1.0000 0.0000 0.000 0.000 1.000 0.0 0.0
10 | VT -0.1000 0.0000 0.0000 0.000 0.000 1.000 0.0 0.0
11 | VT 0.1000 0.0000 0.0000 0.000 0.000 1.000 0.0 0.0
12 | VT 0.1000 -1.0000 0.0000 0.000 0.000 1.000 0.0 0.0
13 | VT -0.1000 -1.0000 0.0000 0.000 0.000 1.000 0.0 0.0
14 | VT -0.1000 0.0000 0.0000 0.000 0.000 1.000 0.0 0.0
15 | VT 0.1000 0.0000 0.0000 0.000 0.000 1.000 0.0 0.0
16 | VT 0.1000 -0.9929 -0.0071 0.000 0.000 1.000 0.0 0.0
17 | VT -0.1000 -0.9929 -0.0071 0.000 0.000 1.000 0.0 0.0
18 | VT -0.1000 0.0071 -0.0071 0.000 0.000 1.000 0.0 0.0
19 | VT 0.1000 0.0071 -0.0071 0.000 0.000 1.000 0.0 0.0
20 | VT 0.1000 0.0000 -2.0000 0.000 0.000 1.000 0.0 0.0
21 | VT -0.1000 0.0000 -2.0000 0.000 0.000 1.000 0.0 0.0
22 | VT -0.1000 1.0000 -2.0000 0.000 0.000 1.000 0.0 0.0
23 | VT 0.1000 1.0000 -2.0000 0.000 0.000 1.000 0.0 0.0
24 |
25 | IDX10 4 5 6 4 6 7 0 1 2 0
26 | IDX10 2 3 12 13 14 12 14 15 8 9
27 | IDX 10
28 | IDX 8
29 | IDX 10
30 | IDX 11
31 |
32 | ANIM_begin
33 | ANIM_hide 2 3 sim/flightmodel/engine/ENGN_thro[2]
34 | ANIM_trans 0.0000 1.0000 0.0000 0.0000 1.0000 0.0000 0 0 no_ref
35 | ANIM_rotate -1.0000 0.0000 0.0000 45.00 -45.00 -2 1 sim/flightmodel/engine/ENGN_thro[1]
36 | ATTR_no_cull
37 | TRIS 0 6
38 | ANIM_end
39 | ####_group first group
40 | TRIS 6 6
41 | ANIM_begin
42 | ANIM_hide 0.1 0.2 sim/flightmodel/engine/ENGN_thro[0]
43 | ANIM_hide 0.3 0.4 sim/flightmodel/engine/ENGN_thro[0]
44 | ANIM_show 1.0 2.0 sim/flightmodel/engine/ENGN_thro[0]
45 | ATTR_diffuse_rgb 0.800 0.800 0.800
46 | ATTR_shiny_rat 0.526
47 | TRIS 12 6
48 | ANIM_end
49 | ####_group second group
50 | ANIM_begin
51 | ANIM_hide 0.75 0.85 custom/path2/other_dataref[1]
52 | ANIM_trans 0.0000 1.0000 -1.0000 0.0000 1.0000 -1.0000 0 0 no_ref
53 | ANIM_rotate -1.0000 0.0000 0.0000 45.00 -45.00 -1 1 custom/path/my_dataref
54 | ATTR_reset
55 | TRIS 18 6
56 | ANIM_end
57 |
58 | # Built with Blender 2.45. Exported with XPlane2Blender 3.10.
59 |
--------------------------------------------------------------------------------
/test/horizon_vac80.blend:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Marginal/XPlane2Blender/07195742afe93cea307b6a15e9a2c4d4aac50985/test/horizon_vac80.blend
--------------------------------------------------------------------------------
/test/lights.blend:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Marginal/XPlane2Blender/07195742afe93cea307b6a15e9a2c4d4aac50985/test/lights.blend
--------------------------------------------------------------------------------
/test/lights.obj:
--------------------------------------------------------------------------------
1 | I
2 | 800
3 | OBJ
4 |
5 | TEXTURE
6 | POINT_COUNTS 80 0 3 90
7 |
8 | VT -2.5000 0.0000 -0.5000 0.000 -1.000 0.000 1.0 1.0
9 | VT -2.5000 0.0000 0.5000 0.000 -1.000 0.000 1.0 0.0
10 | VT -1.5000 0.0000 0.5000 0.000 -1.000 0.000 0.0 0.0
11 | VT -1.5000 0.0000 -0.5000 0.000 -1.000 0.000 0.0 1.0
12 | VT -1.5000 0.0000 0.5000 0.894 0.447 0.000 1.0 0.0
13 | VT -2.0000 1.0000 0.0000 0.894 0.447 0.000 0.0 0.0
14 | VT -1.5000 0.0000 -0.5000 0.894 0.447 0.000 0.0 1.0
15 | VT -2.5000 0.0000 0.5000 0.000 0.447 0.894 1.0 0.0
16 | VT -2.0000 1.0000 0.0000 0.000 0.447 0.894 0.0 0.0
17 | VT -1.5000 0.0000 0.5000 0.000 0.447 0.894 0.0 1.0
18 | VT -2.5000 0.0000 -0.5000 -0.894 0.447 0.000 1.0 0.0
19 | VT -2.0000 1.0000 0.0000 -0.894 0.447 0.000 0.0 0.0
20 | VT -2.5000 0.0000 0.5000 -0.894 0.447 0.000 0.0 1.0
21 | VT -2.5000 0.0000 -0.5000 0.000 0.447 -0.894 1.0 0.0
22 | VT -1.5000 0.0000 -0.5000 0.000 0.447 -0.894 0.0 0.0
23 | VT -2.0000 1.0000 0.0000 0.000 0.447 -0.894 0.0 1.0
24 | VT 1.5000 0.0000 -0.5000 0.000 -1.000 0.000 1.0 1.0
25 | VT 1.5000 0.0000 0.5000 0.000 -1.000 0.000 1.0 0.0
26 | VT 2.5000 0.0000 0.5000 0.000 -1.000 0.000 0.0 0.0
27 | VT 2.5000 0.0000 -0.5000 0.000 -1.000 0.000 0.0 1.0
28 | VT 2.5000 0.0000 0.5000 0.894 0.447 0.000 1.0 0.0
29 | VT 2.0000 1.0000 0.0000 0.894 0.447 0.000 0.0 0.0
30 | VT 2.5000 0.0000 -0.5000 0.894 0.447 0.000 0.0 1.0
31 | VT 1.5000 0.0000 0.5000 0.000 0.447 0.894 1.0 0.0
32 | VT 2.0000 1.0000 0.0000 0.000 0.447 0.894 0.0 0.0
33 | VT 2.5000 0.0000 0.5000 0.000 0.447 0.894 0.0 1.0
34 | VT 1.5000 0.0000 -0.5000 -0.894 0.447 0.000 1.0 0.0
35 | VT 2.0000 1.0000 0.0000 -0.894 0.447 0.000 0.0 0.0
36 | VT 1.5000 0.0000 0.5000 -0.894 0.447 0.000 0.0 1.0
37 | VT 1.5000 0.0000 -0.5000 0.000 0.447 -0.894 1.0 0.0
38 | VT 2.5000 0.0000 -0.5000 0.000 0.447 -0.894 0.0 0.0
39 | VT 2.0000 1.0000 0.0000 0.000 0.447 -0.894 0.0 1.0
40 | VT 3.5000 0.0000 -0.5000 0.000 -1.000 0.000 1.0 1.0
41 | VT 3.5000 0.0000 0.5000 0.000 -1.000 0.000 1.0 0.0
42 | VT 4.5000 0.0000 0.5000 0.000 -1.000 0.000 0.0 0.0
43 | VT 4.5000 0.0000 -0.5000 0.000 -1.000 0.000 0.0 1.0
44 | VT 4.5000 0.0000 0.5000 0.894 0.447 0.000 1.0 0.0
45 | VT 4.0000 1.0000 0.0000 0.894 0.447 0.000 0.0 0.0
46 | VT 4.5000 0.0000 -0.5000 0.894 0.447 0.000 0.0 1.0
47 | VT 3.5000 0.0000 0.5000 0.000 0.447 0.894 1.0 0.0
48 | VT 4.0000 1.0000 0.0000 0.000 0.447 0.894 0.0 0.0
49 | VT 4.5000 0.0000 0.5000 0.000 0.447 0.894 0.0 1.0
50 | VT 3.5000 0.0000 -0.5000 -0.894 0.447 0.000 1.0 0.0
51 | VT 4.0000 1.0000 0.0000 -0.894 0.447 0.000 0.0 0.0
52 | VT 3.5000 0.0000 0.5000 -0.894 0.447 0.000 0.0 1.0
53 | VT 3.5000 0.0000 -0.5000 0.000 0.447 -0.894 1.0 0.0
54 | VT 4.5000 0.0000 -0.5000 0.000 0.447 -0.894 0.0 0.0
55 | VT 4.0000 1.0000 0.0000 0.000 0.447 -0.894 0.0 1.0
56 | VT -0.5000 0.0000 -0.5000 0.000 -1.000 0.000 1.0 1.0
57 | VT -0.5000 0.0000 0.5000 0.000 -1.000 0.000 1.0 0.0
58 | VT 0.5000 0.0000 0.5000 0.000 -1.000 0.000 0.0 0.0
59 | VT 0.5000 0.0000 -0.5000 0.000 -1.000 0.000 0.0 1.0
60 | VT 0.5000 0.0000 0.5000 0.894 0.447 0.000 1.0 0.0
61 | VT 0.0000 1.0000 0.0000 0.894 0.447 0.000 0.0 0.0
62 | VT 0.5000 0.0000 -0.5000 0.894 0.447 0.000 0.0 1.0
63 | VT -0.5000 0.0000 0.5000 0.000 0.447 0.894 1.0 0.0
64 | VT 0.0000 1.0000 0.0000 0.000 0.447 0.894 0.0 0.0
65 | VT 0.5000 0.0000 0.5000 0.000 0.447 0.894 0.0 1.0
66 | VT -0.5000 0.0000 -0.5000 -0.894 0.447 0.000 1.0 0.0
67 | VT 0.0000 1.0000 0.0000 -0.894 0.447 0.000 0.0 0.0
68 | VT -0.5000 0.0000 0.5000 -0.894 0.447 0.000 0.0 1.0
69 | VT -0.5000 0.0000 -0.5000 0.000 0.447 -0.894 1.0 0.0
70 | VT 0.5000 0.0000 -0.5000 0.000 0.447 -0.894 0.0 0.0
71 | VT 0.0000 1.0000 0.0000 0.000 0.447 -0.894 0.0 1.0
72 | VT -4.5000 0.0000 -0.5000 0.000 -1.000 0.000 1.0 1.0
73 | VT -4.5000 0.0000 0.5000 0.000 -1.000 0.000 1.0 0.0
74 | VT -3.5000 0.0000 0.5000 0.000 -1.000 0.000 0.0 0.0
75 | VT -3.5000 0.0000 -0.5000 0.000 -1.000 0.000 0.0 1.0
76 | VT -3.5000 0.0000 0.5000 0.894 0.447 0.000 1.0 0.0
77 | VT -4.0000 1.0000 0.0000 0.894 0.447 0.000 0.0 0.0
78 | VT -3.5000 0.0000 -0.5000 0.894 0.447 0.000 0.0 1.0
79 | VT -4.5000 0.0000 0.5000 0.000 0.447 0.894 1.0 0.0
80 | VT -4.0000 1.0000 0.0000 0.000 0.447 0.894 0.0 0.0
81 | VT -3.5000 0.0000 0.5000 0.000 0.447 0.894 0.0 1.0
82 | VT -4.5000 0.0000 -0.5000 -0.894 0.447 0.000 1.0 0.0
83 | VT -4.0000 1.0000 0.0000 -0.894 0.447 0.000 0.0 0.0
84 | VT -4.5000 0.0000 0.5000 -0.894 0.447 0.000 0.0 1.0
85 | VT -4.5000 0.0000 -0.5000 0.000 0.447 -0.894 1.0 0.0
86 | VT -3.5000 0.0000 -0.5000 0.000 0.447 -0.894 0.0 0.0
87 | VT -4.0000 1.0000 0.0000 0.000 0.447 -0.894 0.0 1.0
88 |
89 | VLIGHT -2.0000 1.5000 0.0000 -1.000 0.000 0.000
90 | VLIGHT 0.0000 1.5000 0.0000 9.900 9.900 9.900
91 | VLIGHT -4.0000 1.5000 0.0000 1.000 0.000 0.000
92 |
93 | IDX10 0 1 2 0 2 3 4 5 6 7
94 | IDX10 8 9 10 11 12 13 14 15 16 17
95 | IDX10 18 16 18 19 20 21 22 23 24 25
96 | IDX10 26 27 28 29 30 31 32 33 34 32
97 | IDX10 34 35 36 37 38 39 40 41 42 43
98 | IDX10 44 45 46 47 48 49 50 48 50 51
99 | IDX10 52 53 54 55 56 57 58 59 60 61
100 | IDX10 62 63 64 65 66 64 66 67 68 69
101 | IDX10 70 71 72 73 74 75 76 77 78 79
102 |
103 | ####_alpha
104 | LIGHTS 0 3
105 | LIGHT_NAMED airplane_nav_left 2.0000 1.5000 0.0000
106 | LIGHT_NAMED carrier_foul_line_red 4.0000 1.5000 0.0000
107 | TRIS 0 90
108 |
109 | # Built with Blender 2.42. Exported with XPlane2Blender 2.31.
110 |
--------------------------------------------------------------------------------
/test/lights_custom.blend:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Marginal/XPlane2Blender/07195742afe93cea307b6a15e9a2c4d4aac50985/test/lights_custom.blend
--------------------------------------------------------------------------------
/test/lights_custom.obj:
--------------------------------------------------------------------------------
1 | I
2 | 800
3 | OBJ
4 |
5 | TEXTURE lights.png
6 | TEXTURE_LIT lights_LIT.png
7 | POINT_COUNTS 72 0 3 72
8 |
9 | VT -3.5000 0.0000 0.5000 0.894 0.447 0.000 1.0 0.0
10 | VT -4.0000 1.0000 0.0000 0.894 0.447 0.000 0.5 0.5
11 | VT -3.5000 0.0000 -0.5000 0.894 0.447 0.000 1.0 1.0
12 | VT -4.5000 0.0000 0.5000 0.000 0.447 0.894 0.0 0.0
13 | VT -4.0000 1.0000 0.0000 0.000 0.447 0.894 0.5 0.5
14 | VT -3.5000 0.0000 0.5000 0.000 0.447 0.894 1.0 0.0
15 | VT -4.5000 0.0000 -0.5000 -0.894 0.447 0.000 0.0 1.0
16 | VT -4.0000 1.0000 0.0000 -0.894 0.447 0.000 0.5 0.5
17 | VT -4.5000 0.0000 0.5000 -0.894 0.447 0.000 0.0 0.0
18 | VT -4.5000 0.0000 -0.5000 0.000 0.447 -0.894 0.0 1.0
19 | VT -3.5000 0.0000 -0.5000 0.000 0.447 -0.894 1.0 1.0
20 | VT -4.0000 1.0000 0.0000 0.000 0.447 -0.894 0.5 0.5
21 | VT -1.5000 0.0000 0.5000 0.894 0.447 0.000 1.0 0.0
22 | VT -2.0000 1.0000 0.0000 0.894 0.447 0.000 0.5 0.5
23 | VT -1.5000 0.0000 -0.5000 0.894 0.447 0.000 1.0 1.0
24 | VT -2.5000 0.0000 0.5000 0.000 0.447 0.894 0.0 0.0
25 | VT -2.0000 1.0000 0.0000 0.000 0.447 0.894 0.5 0.5
26 | VT -1.5000 0.0000 0.5000 0.000 0.447 0.894 1.0 0.0
27 | VT -2.5000 0.0000 -0.5000 -0.894 0.447 0.000 0.0 1.0
28 | VT -2.0000 1.0000 0.0000 -0.894 0.447 0.000 0.5 0.5
29 | VT -2.5000 0.0000 0.5000 -0.894 0.447 0.000 0.0 0.0
30 | VT -2.5000 0.0000 -0.5000 0.000 0.447 -0.894 0.0 1.0
31 | VT -1.5000 0.0000 -0.5000 0.000 0.447 -0.894 1.0 1.0
32 | VT -2.0000 1.0000 0.0000 0.000 0.447 -0.894 0.5 0.5
33 | VT 2.5000 0.0000 0.5000 0.894 0.447 0.000 1.0 0.0
34 | VT 2.0000 1.0000 0.0000 0.894 0.447 0.000 0.5 0.5
35 | VT 2.5000 0.0000 -0.5000 0.894 0.447 0.000 1.0 1.0
36 | VT 1.5000 0.0000 0.5000 0.000 0.447 0.894 0.0 0.0
37 | VT 2.0000 1.0000 0.0000 0.000 0.447 0.894 0.5 0.5
38 | VT 2.5000 0.0000 0.5000 0.000 0.447 0.894 1.0 0.0
39 | VT 1.5000 0.0000 -0.5000 -0.894 0.447 0.000 0.0 1.0
40 | VT 2.0000 1.0000 0.0000 -0.894 0.447 0.000 0.5 0.5
41 | VT 1.5000 0.0000 0.5000 -0.894 0.447 0.000 0.0 0.0
42 | VT 1.5000 0.0000 -0.5000 0.000 0.447 -0.894 0.0 1.0
43 | VT 2.5000 0.0000 -0.5000 0.000 0.447 -0.894 1.0 1.0
44 | VT 2.0000 1.0000 0.0000 0.000 0.447 -0.894 0.5 0.5
45 | VT 4.5000 0.0000 0.5000 0.894 0.447 0.000 1.0 0.0
46 | VT 4.0000 1.0000 0.0000 0.894 0.447 0.000 0.5 0.5
47 | VT 4.5000 0.0000 -0.5000 0.894 0.447 0.000 1.0 1.0
48 | VT 3.5000 0.0000 0.5000 0.000 0.447 0.894 0.0 0.0
49 | VT 4.0000 1.0000 0.0000 0.000 0.447 0.894 0.5 0.5
50 | VT 4.5000 0.0000 0.5000 0.000 0.447 0.894 1.0 0.0
51 | VT 3.5000 0.0000 -0.5000 -0.894 0.447 0.000 0.0 1.0
52 | VT 4.0000 1.0000 0.0000 -0.894 0.447 0.000 0.5 0.5
53 | VT 3.5000 0.0000 0.5000 -0.894 0.447 0.000 0.0 0.0
54 | VT 3.5000 0.0000 -0.5000 0.000 0.447 -0.894 0.0 1.0
55 | VT 4.5000 0.0000 -0.5000 0.000 0.447 -0.894 1.0 1.0
56 | VT 4.0000 1.0000 0.0000 0.000 0.447 -0.894 0.5 0.5
57 | VT 0.5000 0.0000 0.5000 0.894 0.447 0.000 1.0 0.0
58 | VT 0.0000 1.0000 0.0000 0.894 0.447 0.000 0.5 0.5
59 | VT 0.5000 0.0000 -0.5000 0.894 0.447 0.000 1.0 1.0
60 | VT -0.5000 0.0000 0.5000 0.000 0.447 0.894 0.0 0.0
61 | VT 0.0000 1.0000 0.0000 0.000 0.447 0.894 0.5 0.5
62 | VT 0.5000 0.0000 0.5000 0.000 0.447 0.894 1.0 0.0
63 | VT -0.5000 0.0000 -0.5000 -0.894 0.447 0.000 0.0 1.0
64 | VT 0.0000 1.0000 0.0000 -0.894 0.447 0.000 0.5 0.5
65 | VT -0.5000 0.0000 0.5000 -0.894 0.447 0.000 0.0 0.0
66 | VT -0.5000 0.0000 -0.5000 0.000 0.447 -0.894 0.0 1.0
67 | VT 0.5000 0.0000 -0.5000 0.000 0.447 -0.894 1.0 1.0
68 | VT 0.0000 1.0000 0.0000 0.000 0.447 -0.894 0.5 0.5
69 | VT 6.5000 0.0000 0.5000 0.894 0.447 0.000 1.0 0.0
70 | VT 6.0000 1.0000 0.0000 0.894 0.447 0.000 0.5 0.5
71 | VT 6.5000 0.0000 -0.5000 0.894 0.447 0.000 1.0 1.0
72 | VT 5.5000 0.0000 0.5000 0.000 0.447 0.894 0.0 0.0
73 | VT 6.0000 1.0000 0.0000 0.000 0.447 0.894 0.5 0.5
74 | VT 6.5000 0.0000 0.5000 0.000 0.447 0.894 1.0 0.0
75 | VT 5.5000 0.0000 -0.5000 -0.894 0.447 0.000 0.0 1.0
76 | VT 6.0000 1.0000 0.0000 -0.894 0.447 0.000 0.5 0.5
77 | VT 5.5000 0.0000 0.5000 -0.894 0.447 0.000 0.0 0.0
78 | VT 5.5000 0.0000 -0.5000 0.000 0.447 -0.894 0.0 1.0
79 | VT 6.5000 0.0000 -0.5000 0.000 0.447 -0.894 1.0 1.0
80 | VT 6.0000 1.0000 0.0000 0.000 0.447 -0.894 0.5 0.5
81 |
82 | VLIGHT -2.0000 1.5000 0.0000 -1.000 0.000 0.000
83 | VLIGHT 0.0000 1.5000 0.0000 9.900 9.900 9.900
84 | VLIGHT -4.0000 1.5000 0.0000 1.000 0.000 0.000
85 |
86 | IDX10 0 1 2 3 4 5 6 7 8 9
87 | IDX10 10 11 12 13 14 15 16 17 18 19
88 | IDX10 20 21 22 23 24 25 26 27 28 29
89 | IDX10 30 31 32 33 34 35 36 37 38 39
90 | IDX10 40 41 42 43 44 45 46 47 48 49
91 | IDX10 50 51 52 53 54 55 56 57 58 59
92 | IDX10 60 61 62 63 64 65 66 67 68 69
93 | IDX 70
94 | IDX 71
95 |
96 | ####_alpha
97 | TRIS 0 72
98 | LIGHTS 0 3
99 | LIGHT_NAMED airplane_nav_left 2.0000 1.5000 0.0000
100 | ANIM_begin
101 | ANIM_trans 5.0000 1.5000 0.0000 5.0000 1.5000 0.0000 0 0 no_ref
102 | ANIM_rotate 1.0000 0.0000 0.0000 0.00 180.00 0 1 sim/flightmodel/engine/ENGN_thro[0]
103 | LIGHT_NAMED carrier_foul_line_red -1.0000 0.0000 0.0000
104 | LIGHT_CUSTOM 2.0000 1.0000 0.0000 0.218 0.867 0.205 1.000 2.0000 0.25 0.0 0.375 0.125 sim/graphics/animation/lights/airport_beacon
105 | LIGHT_CUSTOM 2.0000 -1.0000 0.0000 0.218 0.867 0.205 1.000 2.0000 0.25 0.0 0.375 0.125 sim/graphics/animation/lights/airport_beacon
106 | LIGHT_CUSTOM 0.0000 -1.0000 0.0000 0.218 0.867 0.205 1.000 2.0000 0.25 0.0 0.375 0.125 sim/graphics/animation/lights/airport_beacon
107 | ANIM_end
108 |
109 | # Built with Blender 2.45. Exported with XPlane2Blender 3.04.
110 |
--------------------------------------------------------------------------------
/test/mattest.blend:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Marginal/XPlane2Blender/07195742afe93cea307b6a15e9a2c4d4aac50985/test/mattest.blend
--------------------------------------------------------------------------------
/test/mirror.blend:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Marginal/XPlane2Blender/07195742afe93cea307b6a15e9a2c4d4aac50985/test/mirror.blend
--------------------------------------------------------------------------------
/test/modifiers.blend:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Marginal/XPlane2Blender/07195742afe93cea307b6a15e9a2c4d4aac50985/test/modifiers.blend
--------------------------------------------------------------------------------
/test/propsman_horizon_vac.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Marginal/XPlane2Blender/07195742afe93cea307b6a15e9a2c4d4aac50985/test/propsman_horizon_vac.png
--------------------------------------------------------------------------------
/test/propsman_horizon_vac80.obj:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Marginal/XPlane2Blender/07195742afe93cea307b6a15e9a2c4d4aac50985/test/propsman_horizon_vac80.obj
--------------------------------------------------------------------------------
/test/propsman_horizon_vac80.obj.orig:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Marginal/XPlane2Blender/07195742afe93cea307b6a15e9a2c4d4aac50985/test/propsman_horizon_vac80.obj.orig
--------------------------------------------------------------------------------
/test/propsman_horizon_vac_LIT.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Marginal/XPlane2Blender/07195742afe93cea307b6a15e9a2c4d4aac50985/test/propsman_horizon_vac_LIT.png
--------------------------------------------------------------------------------
/test/simple.blend:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Marginal/XPlane2Blender/07195742afe93cea307b6a15e9a2c4d4aac50985/test/simple.blend
--------------------------------------------------------------------------------
/test/simple.obj:
--------------------------------------------------------------------------------
1 | I
2 | 800
3 | OBJ
4 |
5 | TEXTURE
6 | POINT_COUNTS 12 0 0 18
7 |
8 | VT 1.000 0.000 1.000 0.000 1.000 0.000 0.0 0.0
9 | VT -1.000 0.000 1.000 0.000 1.000 0.000 0.0 0.0
10 | VT -1.000 0.000 -1.000 0.000 1.000 0.000 0.0 0.0
11 | VT 1.000 0.000 -1.000 0.000 1.000 0.000 0.0 0.0
12 | VT 1.000 0.001 0.000 -0.001 1.000 0.000 0.0 0.0
13 | VT -1.000 -0.001 0.000 -0.001 1.000 0.000 0.0 0.0
14 | VT -1.000 -0.001 -2.000 -0.001 1.000 0.000 0.0 0.0
15 | VT 1.000 0.000 -2.000 -0.001 1.000 0.000 0.0 0.0
16 | VT 1.000 0.000 0.000 0.000 1.000 0.000 0.0 0.0
17 | VT -1.000 0.000 0.001 0.000 1.000 0.000 0.0 0.0
18 | VT -1.002 0.000 -1.999 0.000 1.000 0.000 0.0 0.0
19 | VT 0.998 -0.001 -2.000 0.000 1.000 0.000 0.0 0.0
20 |
21 | IDX10 0 1 2 0 2 3 4 5 6 4
22 | IDX 6
23 | IDX 7
24 | IDX 8
25 | IDX 9
26 | IDX 10
27 | IDX 8
28 | IDX 10
29 | IDX 11
30 |
31 | ATTR_no_blend
32 |
33 | ATTR_no_cull
34 | TRIS 0 6
35 | ANIM_begin
36 | ANIM_trans 0.000 0.000 -1.000 0.000 0.000 -1.000 0 0 no_ref
37 | ANIM_rotate 0.863 -0.357 0.357 98.42 0.00 0 1 sim/flightmodel/engine/ENGN_thro[0]
38 | ANIM_rotate 0.863 -0.357 -0.357 0.00 261.58 0 1 sim/flightmodel/engine/ENGN_thro[0]
39 | TRIS 6 6
40 | ANIM_begin
41 | ANIM_trans 0.000 0.000 -2.000 0.000 0.000 -2.000 0 0 no_ref
42 | ANIM_rotate 1.000 0.000 0.000 90.00 270.00 0 1 sim/flightmodel/engine/ENGN_thro[1]
43 | TRIS 12 6
44 | ANIM_end
45 | ANIM_end
46 |
47 | # Built with Blender 2.41. Exported with XPlane2Blender 2.20.
48 |
--------------------------------------------------------------------------------
/test/simple_manual.obj:
--------------------------------------------------------------------------------
1 | I
2 | 800
3 | OBJ
4 |
5 | TEXTURE none
6 | POINT_COUNTS 12 0 0 18
7 |
8 | VT 1.000 0.000 1.000 0.000 1.000 0.000 0.0 0.0
9 | VT -1.000 0.000 1.000 0.000 1.000 0.000 0.0 0.0
10 | VT -1.000 0.000 -1.000 0.000 1.000 0.000 0.0 0.0
11 | VT 1.000 0.000 -1.000 0.000 1.000 0.000 0.0 0.0
12 | VT 1.000 0.000 0.000 0.000 1.000 0.000 0.0 0.0
13 | VT -1.000 0.000 0.000 0.000 1.000 0.000 0.0 0.0
14 | VT -1.000 0.000 -2.000 0.000 1.000 0.000 0.0 0.0
15 | VT 1.000 0.000 -2.000 0.000 1.000 0.000 0.0 0.0
16 | VT 1.000 0.000 0.000 0.000 1.000 0.000 0.0 0.0
17 | VT -1.000 0.000 0.000 0.000 1.000 0.000 0.0 0.0
18 | VT -1.000 0.000 -2.000 0.000 1.000 0.000 0.0 0.0
19 | VT 1.000 0.000 -2.000 0.000 1.000 0.000 0.0 0.0
20 |
21 | IDX10 0 1 2 0 2 3 8 9 10 8
22 | IDX 10
23 | IDX 11
24 | IDX 4
25 | IDX 5
26 | IDX 6
27 | IDX 4
28 | IDX 6
29 | IDX 7
30 |
31 | ATTR_no_cull
32 | ATTR_shade_flat
33 | TRIS 0 6
34 | ANIM_begin
35 | ANIM_trans 0 0 -1 0 0 -1 0 1 sim/flightmodel/engine/ENGN_thro[0]
36 | ANIM_rotate -.5 .5 0 90 -90 0 1 sim/flightmodel/engine/ENGN_thro[0]
37 | TRIS 6 6
38 | ANIM_begin
39 | ANIM_trans 0 0 -2 0 0 -2 0 1 sim/flightmodel/engine/ENGN_thro[1]
40 | ANIM_rotate -1 0 0 90 -90 0 1 sim/flightmodel/engine/ENGN_thro[1]
41 | TRIS 12 6
42 | ANIM_end
43 | ANIM_end
44 |
45 | # Built with Blender 2.39. Exported with XPlane2Blender 2.10c.
46 |
--------------------------------------------------------------------------------
/test/stick.blend:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Marginal/XPlane2Blender/07195742afe93cea307b6a15e9a2c4d4aac50985/test/stick.blend
--------------------------------------------------------------------------------
/test/test.blend:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Marginal/XPlane2Blender/07195742afe93cea307b6a15e9a2c4d4aac50985/test/test.blend
--------------------------------------------------------------------------------
/test/test2.blend:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Marginal/XPlane2Blender/07195742afe93cea307b6a15e9a2c4d4aac50985/test/test2.blend
--------------------------------------------------------------------------------
/test/test2.obj:
--------------------------------------------------------------------------------
1 | I
2 | 800
3 | OBJ
4 |
5 | TEXTURE
6 | POINT_COUNTS 8 0 0 12
7 |
8 | VT 0.1000 -1.0000 0.0000 0.000 0.000 1.000 0.0 0.0
9 | VT -0.1000 -1.0000 0.0000 0.000 0.000 1.000 0.0 0.0
10 | VT -0.1000 0.0000 0.0000 0.000 0.000 1.000 0.0 0.0
11 | VT 0.1000 0.0000 0.0000 0.000 0.000 1.000 0.0 0.0
12 | VT 0.1000 -1.0000 0.0000 0.000 0.000 1.000 0.0 0.0
13 | VT -0.1000 -1.0000 0.0000 0.000 0.000 1.000 0.0 0.0
14 | VT -0.1000 0.0000 0.0000 0.000 0.000 1.000 0.0 0.0
15 | VT 0.1000 0.0000 0.0000 0.000 0.000 1.000 0.0 0.0
16 |
17 | IDX10 0 1 2 0 2 3 4 5 6 4
18 | IDX 6
19 | IDX 7
20 |
21 | ATTR_no_cull
22 | TRIS 0 6
23 | ANIM_begin
24 | ANIM_trans 0.0000 1.0000 0.0000 0.0000 1.0000 0.0000 0 0 no_ref
25 | ANIM_rotate -1.0000 0.0000 0.0000 45.00 -45.00 0 1 sim/flightmodel/engine/ENGN_thro[1]
26 | TRIS 6 6
27 | ANIM_end
28 |
29 | # Built with Blender 2.42. Exported with XPlane2Blender 2.25.
30 |
--------------------------------------------------------------------------------
/test/test3.blend:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Marginal/XPlane2Blender/07195742afe93cea307b6a15e9a2c4d4aac50985/test/test3.blend
--------------------------------------------------------------------------------
/test/test3.obj:
--------------------------------------------------------------------------------
1 | I
2 | 800
3 | OBJ
4 |
5 | TEXTURE
6 | POINT_COUNTS 52 0 0 84
7 |
8 | VT 0.0000 1.0000 0.1000 -1.000 0.000 0.000 0.0 0.0
9 | VT 0.0000 1.0000 -0.1000 -1.000 0.000 0.000 0.0 0.0
10 | VT 0.0001 2.0000 -0.1000 -1.000 0.000 0.000 0.0 0.0
11 | VT 0.0001 2.0000 0.1000 -1.000 0.000 0.000 0.0 0.0
12 | VT 0.1000 0.0000 0.0000 0.000 0.000 1.000 0.0 0.0
13 | VT -0.1000 0.0000 0.0000 0.000 0.000 1.000 0.0 0.0
14 | VT -0.1000 1.0000 0.0000 0.000 0.000 1.000 0.0 0.0
15 | VT 0.1000 1.0000 0.0000 0.000 0.000 1.000 0.0 0.0
16 | VT 3.1000 2.0000 -4.0000 0.000 0.000 -1.000 0.0 0.0
17 | VT 2.9000 2.0000 -4.0000 0.000 0.000 -1.000 0.0 0.0
18 | VT 2.9000 0.0000 -4.0000 0.000 0.000 -1.000 0.0 0.0
19 | VT 3.1000 0.0000 -4.0000 0.000 0.000 -1.000 0.0 0.0
20 | VT 2.5000 0.0000 -4.5000 0.000 -1.000 0.000 0.0 0.0
21 | VT 2.5000 0.0000 -3.5000 0.000 -1.000 0.000 0.0 0.0
22 | VT 3.5000 0.0000 -3.5000 0.000 -1.000 0.000 0.0 0.0
23 | VT 3.5000 0.0000 -4.5000 0.000 -1.000 0.000 0.0 0.0
24 | VT 3.5000 1.0000 -3.5000 0.000 1.000 0.000 0.0 0.0
25 | VT 2.5000 1.0000 -3.5000 0.000 1.000 0.000 0.0 0.0
26 | VT 2.5000 1.0000 -4.5000 0.000 1.000 0.000 0.0 0.0
27 | VT 3.5000 1.0000 -4.5000 0.000 1.000 0.000 0.0 0.0
28 | VT 3.5000 0.0000 -3.5000 1.000 0.000 0.000 0.0 0.0
29 | VT 3.5000 1.0000 -3.5000 1.000 0.000 0.000 0.0 0.0
30 | VT 3.5000 1.0000 -4.5000 1.000 0.000 0.000 0.0 0.0
31 | VT 3.5000 0.0000 -4.5000 1.000 0.000 0.000 0.0 0.0
32 | VT 2.5000 0.0000 -3.5000 0.000 0.000 1.000 0.0 0.0
33 | VT 2.5000 1.0000 -3.5000 0.000 0.000 1.000 0.0 0.0
34 | VT 3.5000 1.0000 -3.5000 0.000 0.000 1.000 0.0 0.0
35 | VT 3.5000 0.0000 -3.5000 0.000 0.000 1.000 0.0 0.0
36 | VT 2.5000 0.0000 -4.5000 -1.000 0.000 0.000 0.0 0.0
37 | VT 2.5000 1.0000 -4.5000 -1.000 0.000 0.000 0.0 0.0
38 | VT 2.5000 1.0000 -3.5000 -1.000 0.000 0.000 0.0 0.0
39 | VT 2.5000 0.0000 -3.5000 -1.000 0.000 0.000 0.0 0.0
40 | VT 2.5000 1.0000 -4.5000 0.000 0.000 -1.000 0.0 0.0
41 | VT 2.5000 0.0000 -4.5000 0.000 0.000 -1.000 0.0 0.0
42 | VT 3.5000 0.0000 -4.5000 0.000 0.000 -1.000 0.0 0.0
43 | VT 3.5000 1.0000 -4.5000 0.000 0.000 -1.000 0.0 0.0
44 | VT 1.0000 2.7000 -4.6000 0.000 1.000 0.000 0.0 0.0
45 | VT 0.0000 2.7000 -4.6000 0.000 1.000 0.000 0.0 0.0
46 | VT 0.0000 2.7000 -4.8000 0.000 1.000 0.000 0.0 0.0
47 | VT 1.0000 2.7000 -4.8000 0.000 1.000 0.000 0.0 0.0
48 | VT 7.0000 2.7000 -3.2000 0.000 1.000 0.000 0.0 0.0
49 | VT 5.0000 2.7000 -3.2000 0.000 1.000 0.000 0.0 0.0
50 | VT 5.0000 2.7000 -3.4000 0.000 1.000 0.000 0.0 0.0
51 | VT 7.0000 2.7000 -3.4000 0.000 1.000 0.000 0.0 0.0
52 | VT -1.0000 2.7707 -4.6293 0.000 0.707 -0.707 0.0 0.0
53 | VT -2.0000 2.7707 -4.6293 0.000 0.707 -0.707 0.0 0.0
54 | VT -2.0000 2.6293 -4.7707 0.000 0.707 -0.707 0.0 0.0
55 | VT -1.0000 2.6293 -4.7707 0.000 0.707 -0.707 0.0 0.0
56 | VT 9.0000 2.7707 -3.2293 0.000 0.707 -0.707 0.0 0.0
57 | VT 8.0000 2.7707 -3.2293 0.000 0.707 -0.707 0.0 0.0
58 | VT 8.0000 2.6293 -3.3707 0.000 0.707 -0.707 0.0 0.0
59 | VT 9.0000 2.6293 -3.3707 0.000 0.707 -0.707 0.0 0.0
60 |
61 | IDX10 12 13 14 12 14 15 16 17 18 16
62 | IDX10 18 19 20 21 22 20 22 23 24 25
63 | IDX10 26 24 26 27 28 29 30 28 30 31
64 | IDX10 32 33 34 32 34 35 8 9 10 8
65 | IDX10 10 11 36 37 38 36 38 39 40 41
66 | IDX10 42 40 42 43 44 45 46 44 46 47
67 | IDX10 48 49 50 48 50 51 4 5 6 4
68 | IDX10 6 7 0 1 2 0 2 3 0 1
69 | IDX 2
70 | IDX 0
71 | IDX 2
72 | IDX 3
73 |
74 | TRIS 0 36
75 | ATTR_no_cull
76 | TRIS 36 30
77 | ANIM_begin
78 | ANIM_trans 3.0000 2.0000 -4.0000 3.0000 2.0000 -4.0000 0 0 no_ref
79 | ANIM_rotate -1.0000 0.0000 0.0000 45.00 -45.00 0 1 sim/flightmodel/engine/ENGN_thro_use[0]
80 | TRIS 66 6
81 | ANIM_begin
82 | ANIM_trans 0.0000 1.0000 0.0000 0.0000 1.0000 0.0000 0 0 no_ref
83 | ANIM_rotate 0.3574 -0.3574 0.8629 98.42 0.00 0 1 sim/flightmodel/engine/ENGN_thro_use[1]
84 | ANIM_rotate -0.3574 -0.3574 -0.8629 0.00 98.42 0 1 sim/flightmodel/engine/ENGN_thro_use[1]
85 | TRIS 72 6
86 | ANIM_begin
87 | ANIM_trans 0.0000 2.0000 0.0000 0.0000 3.0000 0.0000 0 1 sim/flightmodel/engine/ENGN_thro_use[2]
88 | ANIM_rotate 0.0000 1.0000 0.0000 45.00 -45.00 0 1 sim/flightmodel/engine/ENGN_thro_use[2]
89 | TRIS 78 6
90 | ANIM_end
91 | ANIM_end
92 | ANIM_end
93 |
94 | # Built with Blender 2.43. Exported with XPlane2Blender 2.37.
95 |
--------------------------------------------------------------------------------
/test/test3_manual.obj:
--------------------------------------------------------------------------------
1 | I
2 | 800
3 | OBJ
4 |
5 | TEXTURE none
6 | POINT_COUNTS 56 0 0 84
7 |
8 | VT 3.000 6.000 -3.900 -1.000 0.000 0.000 0.0 0.0
9 | VT 3.000 6.000 -4.100 -1.000 0.000 0.000 0.0 0.0
10 | VT 3.000 7.000 -4.100 -1.000 0.000 0.000 0.0 0.0
11 | VT 3.000 7.000 -3.900 -1.000 0.000 0.000 0.0 0.0
12 | VT 0.100 0.000 0.000 0.000 0.000 1.000 0.0 0.0
13 | VT -0.100 0.000 0.000 0.000 0.000 1.000 0.0 0.0
14 | VT -0.100 1.000 0.000 0.000 0.000 1.000 0.0 0.0
15 | VT 0.100 1.000 0.000 0.000 0.000 1.000 0.0 0.0
16 | VT 0.000 1.000 0.100 -1.000 0.000 0.000 0.0 0.0
17 | VT 0.000 1.000 -0.100 -1.000 0.000 0.000 0.0 0.0
18 | VT 0.000 2.000 -0.100 -1.000 0.000 0.000 0.0 0.0
19 | VT 0.000 2.000 0.100 -1.000 0.000 0.000 0.0 0.0
20 | VT 3.100 2.000 -4.000 0.000 0.000 -1.000 0.0 0.0
21 | VT 2.900 2.000 -4.000 0.000 0.000 -1.000 0.0 0.0
22 | VT 2.900 0.000 -4.000 0.000 0.000 -1.000 0.0 0.0
23 | VT 3.100 0.000 -4.000 0.000 0.000 -1.000 0.0 0.0
24 | VT 2.500 0.000 -4.500 0.000 -1.000 0.000 0.0 0.0
25 | VT 2.500 0.000 -3.500 0.000 -1.000 0.000 0.0 0.0
26 | VT 3.500 0.000 -3.500 0.000 -1.000 0.000 0.0 0.0
27 | VT 3.500 0.000 -4.500 0.000 -1.000 0.000 0.0 0.0
28 | VT 3.500 1.000 -3.500 0.000 1.000 0.000 0.0 0.0
29 | VT 2.500 1.000 -3.500 0.000 1.000 0.000 0.0 0.0
30 | VT 2.500 1.000 -4.500 0.000 1.000 0.000 0.0 0.0
31 | VT 3.500 1.000 -4.500 0.000 1.000 0.000 0.0 0.0
32 | VT 3.500 0.000 -3.500 1.000 0.000 0.000 0.0 0.0
33 | VT 3.500 1.000 -3.500 1.000 0.000 0.000 0.0 0.0
34 | VT 3.500 1.000 -4.500 1.000 0.000 0.000 0.0 0.0
35 | VT 3.500 0.000 -4.500 1.000 0.000 0.000 0.0 0.0
36 | VT 2.500 0.000 -3.500 0.000 0.000 1.000 0.0 0.0
37 | VT 2.500 1.000 -3.500 0.000 0.000 1.000 0.0 0.0
38 | VT 3.500 1.000 -3.500 0.000 0.000 1.000 0.0 0.0
39 | VT 3.500 0.000 -3.500 0.000 0.000 1.000 0.0 0.0
40 | VT 2.500 0.000 -4.500 -1.000 0.000 0.000 0.0 0.0
41 | VT 2.500 1.000 -4.500 -1.000 0.000 0.000 0.0 0.0
42 | VT 2.500 1.000 -3.500 -1.000 0.000 0.000 0.0 0.0
43 | VT 2.500 0.000 -3.500 -1.000 0.000 0.000 0.0 0.0
44 | VT 2.500 1.000 -4.500 0.000 0.000 -1.000 0.0 0.0
45 | VT 2.500 0.000 -4.500 0.000 0.000 -1.000 0.0 0.0
46 | VT 3.500 0.000 -4.500 0.000 0.000 -1.000 0.0 0.0
47 | VT 3.500 1.000 -4.500 0.000 0.000 -1.000 0.0 0.0
48 | VT 1.000 2.700 -4.600 0.000 1.000 0.000 0.0 0.0
49 | VT 0.000 2.700 -4.600 0.000 1.000 0.000 0.0 0.0
50 | VT 0.000 2.700 -4.800 0.000 1.000 0.000 0.0 0.0
51 | VT 1.000 2.700 -4.800 0.000 1.000 0.000 0.0 0.0
52 | VT 7.000 2.700 -3.200 0.000 1.000 0.000 0.0 0.0
53 | VT 5.000 2.700 -3.200 0.000 1.000 0.000 0.0 0.0
54 | VT 5.000 2.700 -3.400 0.000 1.000 0.000 0.0 0.0
55 | VT 7.000 2.700 -3.400 0.000 1.000 0.000 0.0 0.0
56 | VT -1.000 2.771 -4.629 0.000 0.707 -0.707 0.0 0.0
57 | VT -2.000 2.771 -4.629 0.000 0.707 -0.707 0.0 0.0
58 | VT -2.000 2.629 -4.771 0.000 0.707 -0.707 0.0 0.0
59 | VT -1.000 2.629 -4.771 0.000 0.707 -0.707 0.0 0.0
60 | VT 9.000 2.771 -3.229 0.000 0.707 -0.707 0.0 0.0
61 | VT 8.000 2.771 -3.229 0.000 0.707 -0.707 0.0 0.0
62 | VT 8.000 2.629 -3.371 0.000 0.707 -0.707 0.0 0.0
63 | VT 9.000 2.629 -3.371 0.000 0.707 -0.707 0.0 0.0
64 |
65 | IDX10 16 17 18 16 18 19 20 21 22 20
66 | IDX10 22 23 24 25 26 24 26 27 28 29
67 | IDX10 30 28 30 31 32 33 34 32 34 35
68 | IDX10 36 37 38 36 38 39 40 41 42 40
69 | IDX10 42 43 44 45 46 44 46 47 48 49
70 | IDX10 50 48 50 51 52 53 54 52 54 55
71 | IDX10 12 13 14 12 14 15 4 5 6 4
72 | IDX10 6 7 8 9 10 8 10 11 0 1
73 | IDX 2
74 | IDX 0
75 | IDX 2
76 | IDX 3
77 |
78 | ATTR_shade_flat
79 | TRIS 0 60
80 | ATTR_no_cull
81 | TRIS 60 6
82 | ANIM_begin
83 | ANIM_trans 3.000 2.000 -4.000 3.000 2.000 -4.000 0 1 sim/flightmodel/engine/ENGN_thro_use[0]
84 | ANIM_rotate -1.000 0.000 0.000 45.00 -45.00 0 1 sim/flightmodel/engine/ENGN_thro_use[0]
85 | TRIS 66 6
86 | ANIM_begin
87 | ANIM_trans 0.000 1.000 0.000 0.000 1.000 0.000 0 1 sim/flightmodel/engine/ENGN_thro_use[1]
88 | ANIM_rotate 0.357 -0.357 0.863 98.42 0.00 0 1 sim/flightmodel/engine/ENGN_thro_use[1]
89 | ANIM_rotate -0.357 -0.357 -0.863 0.00 98.42 0 1 sim/flightmodel/engine/ENGN_thro_use[1]
90 |
91 | # ANIM_rotate 0 0 1 90 -90 0 1 sim/flightmodel/engine/ENGN_thro_use[1]
92 | # ANIM_rotate 0 1 0 -45 45 0 1 sim/flightmodel/engine/ENGN_thro_use[1]
93 | TRIS 72 6
94 | ANIM_begin
95 | ANIM_trans 0.000 2.000 0.000 0.000 2.000 0.000 0 1 sim/flightmodel/engine/ENGN_thro_use[2]
96 | ANIM_rotate 0.000 1.000 0.000 45.00 -45.00 0 1 sim/flightmodel/engine/ENGN_thro_use[2]
97 | # TRIS 78 6
98 | ANIM_end
99 | ANIM_end
100 | ANIM_end
101 |
102 | # Built with Blender 2.39. Exported with XPlane2Blender 2.10c.
103 |
--------------------------------------------------------------------------------
/test/test4.blend:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Marginal/XPlane2Blender/07195742afe93cea307b6a15e9a2c4d4aac50985/test/test4.blend
--------------------------------------------------------------------------------
/test/test4.obj:
--------------------------------------------------------------------------------
1 | I
2 | 800
3 | OBJ
4 |
5 | TEXTURE
6 | POINT_COUNTS 48 0 0 72
7 |
8 | VT 0.100 1.000 0.000 0.000 0.000 1.000 0.0 0.0
9 | VT -0.100 1.000 0.000 0.000 0.000 1.000 0.0 0.0
10 | VT -0.100 2.000 0.000 0.000 0.000 1.000 0.0 0.0
11 | VT 0.100 2.000 0.000 0.000 0.000 1.000 0.0 0.0
12 | VT -0.500 0.000 -0.500 0.000 -1.000 0.000 0.0 0.0
13 | VT -0.500 0.000 0.500 0.000 -1.000 0.000 0.0 0.0
14 | VT 0.500 0.000 0.500 0.000 -1.000 0.000 0.0 0.0
15 | VT 0.500 0.000 -0.500 0.000 -1.000 0.000 0.0 0.0
16 | VT 0.500 1.000 0.500 0.000 1.000 0.000 0.0 0.0
17 | VT -0.500 1.000 0.500 0.000 1.000 0.000 0.0 0.0
18 | VT -0.500 1.000 -0.500 0.000 1.000 0.000 0.0 0.0
19 | VT 0.500 1.000 -0.500 0.000 1.000 0.000 0.0 0.0
20 | VT 0.500 0.000 0.500 1.000 0.000 0.000 0.0 0.0
21 | VT 0.500 1.000 0.500 1.000 0.000 0.000 0.0 0.0
22 | VT 0.500 1.000 -0.500 1.000 0.000 0.000 0.0 0.0
23 | VT 0.500 0.000 -0.500 1.000 0.000 0.000 0.0 0.0
24 | VT -0.500 0.000 0.500 0.000 0.000 1.000 0.0 0.0
25 | VT -0.500 1.000 0.500 0.000 0.000 1.000 0.0 0.0
26 | VT 0.500 1.000 0.500 0.000 0.000 1.000 0.0 0.0
27 | VT 0.500 0.000 0.500 0.000 0.000 1.000 0.0 0.0
28 | VT -0.500 0.000 -0.500 -1.000 0.000 0.000 0.0 0.0
29 | VT -0.500 1.000 -0.500 -1.000 0.000 0.000 0.0 0.0
30 | VT -0.500 1.000 0.500 -1.000 0.000 0.000 0.0 0.0
31 | VT -0.500 0.000 0.500 -1.000 0.000 0.000 0.0 0.0
32 | VT -0.500 1.000 -0.500 0.000 0.000 -1.000 0.0 0.0
33 | VT -0.500 0.000 -0.500 0.000 0.000 -1.000 0.0 0.0
34 | VT 0.500 0.000 -0.500 0.000 0.000 -1.000 0.0 0.0
35 | VT 0.500 1.000 -0.500 0.000 0.000 -1.000 0.0 0.0
36 | VT 2.563 3.366 1.131 0.000 1.000 0.000 0.0 0.0
37 | VT 1.856 3.366 0.424 0.000 1.000 0.000 0.0 0.0
38 | VT 1.997 3.366 0.283 0.000 1.000 0.000 0.0 0.0
39 | VT 2.704 3.366 0.990 0.000 1.000 0.000 0.0 0.0
40 | VT 0.100 0.000 0.000 0.000 0.866 0.500 0.0 0.0
41 | VT -0.100 0.000 0.000 0.000 0.866 0.500 0.0 0.0
42 | VT -0.100 0.500 -0.866 0.000 0.866 0.500 0.0 0.0
43 | VT 0.100 0.500 -0.866 0.000 0.866 0.500 0.0 0.0
44 | VT 0.100 0.000 0.000 0.000 0.500 0.866 0.0 0.0
45 | VT -0.100 0.000 0.000 0.000 0.500 0.866 0.0 0.0
46 | VT -0.100 0.866 -0.500 0.000 0.500 0.866 0.0 0.0
47 | VT 0.100 0.866 -0.500 0.000 0.500 0.866 0.0 0.0
48 | VT 0.100 0.000 0.000 0.000 1.000 0.000 0.0 0.0
49 | VT -0.100 0.000 0.000 0.000 1.000 0.000 0.0 0.0
50 | VT -0.100 0.000 -1.000 0.000 1.000 0.000 0.0 0.0
51 | VT 0.100 0.000 -1.000 0.000 1.000 0.000 0.0 0.0
52 | VT -1.856 3.366 0.424 0.000 1.000 0.000 0.0 0.0
53 | VT -2.563 3.366 1.131 0.000 1.000 0.000 0.0 0.0
54 | VT -2.704 3.366 0.990 0.000 1.000 0.000 0.0 0.0
55 | VT -1.997 3.366 0.283 0.000 1.000 0.000 0.0 0.0
56 |
57 | IDX10 4 5 6 4 6 7 8 9 10 8
58 | IDX10 10 11 12 13 14 12 14 15 16 17
59 | IDX10 18 16 18 19 20 21 22 20 22 23
60 | IDX10 24 25 26 24 26 27 0 1 2 0
61 | IDX10 2 3 28 29 30 28 30 31 44 45
62 | IDX10 46 44 46 47 36 37 38 36 38 39
63 | IDX10 32 33 34 32 34 35 40 41 42 40
64 | IDX 42
65 | IDX 43
66 |
67 | ATTR_no_blend
68 |
69 | TRIS 0 36
70 | ATTR_no_cull
71 | TRIS 36 18
72 | ANIM_begin
73 | ANIM_trans 0.000 2.000 0.000 0.000 2.000 0.000 0 0 no_ref
74 | ANIM_rotate 0.000 1.000 0.000 45.00 -45.00 0 1 sim/flightmodel/engine/ENGN_thro[0]
75 | TRIS 54 6
76 | ANIM_begin
77 | ANIM_trans 0.000 0.866 -0.500 0.000 0.866 -0.500 0 0 no_ref
78 | ANIM_rotate 0.000 1.000 0.000 45.00 -45.00 0 1 sim/flightmodel/engine/ENGN_thro[1]
79 | TRIS 60 6
80 | ANIM_begin
81 | ANIM_trans 0.000 0.500 -0.866 0.000 0.500 -0.866 0 0 no_ref
82 | ANIM_rotate 0.000 1.000 0.000 45.00 -45.00 0 1 sim/flightmodel/engine/ENGN_thro[2]
83 | TRIS 66 6
84 | ANIM_end
85 | ANIM_end
86 | ANIM_end
87 |
88 | # Built with Blender 2.41. Exported with XPlane2Blender 2.20.
89 |
--------------------------------------------------------------------------------
/test/throttle.blend:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Marginal/XPlane2Blender/07195742afe93cea307b6a15e9a2c4d4aac50985/test/throttle.blend
--------------------------------------------------------------------------------
/test/throttle.obj:
--------------------------------------------------------------------------------
1 | I
2 | 800
3 | OBJ
4 |
5 | TEXTURE
6 | POINT_COUNTS 128 0 0 384
7 |
8 | VT -0.050 0.023 -0.095 -0.709 0.392 -0.587 0.0 0.0
9 | VT 0.050 0.023 -0.095 0.711 0.391 -0.585 0.0 0.0
10 | VT 0.050 0.040 -0.080 0.711 0.497 -0.497 0.0 0.0
11 | VT -0.050 0.040 -0.080 -0.709 0.499 -0.499 0.0 0.0
12 | VT -0.050 0.004 -0.105 -0.707 0.333 -0.624 0.0 0.0
13 | VT 0.050 0.004 -0.105 0.709 0.333 -0.622 0.0 0.0
14 | VT -0.050 0.023 0.095 -0.709 0.392 0.587 0.0 0.0
15 | VT 0.050 0.023 0.095 0.711 0.391 0.585 0.0 0.0
16 | VT 0.050 0.004 0.105 0.709 0.333 0.622 0.0 0.0
17 | VT -0.050 0.004 0.105 -0.707 0.333 0.624 0.0 0.0
18 | VT -0.050 0.040 0.080 -0.709 0.499 0.499 0.0 0.0
19 | VT 0.050 0.040 0.080 0.711 0.497 0.497 0.0 0.0
20 | VT -0.050 0.055 0.063 -0.709 0.587 0.392 0.0 0.0
21 | VT 0.050 0.055 0.063 0.711 0.585 0.391 0.0 0.0
22 | VT -0.050 0.065 0.044 -0.709 0.652 0.270 0.0 0.0
23 | VT 0.050 0.065 0.044 0.711 0.650 0.269 0.0 0.0
24 | VT -0.050 0.072 0.022 -0.709 0.692 0.138 0.0 0.0
25 | VT 0.050 0.072 0.022 0.711 0.690 0.137 0.0 0.0
26 | VT -0.050 0.074 0.000 -0.709 0.705 0.000 0.0 0.0
27 | VT 0.050 0.074 0.000 0.711 0.703 0.000 0.0 0.0
28 | VT -0.050 0.072 -0.022 -0.709 0.692 -0.138 0.0 0.0
29 | VT 0.050 0.072 -0.022 0.711 0.690 -0.137 0.0 0.0
30 | VT -0.050 0.065 -0.044 -0.709 0.652 -0.270 0.0 0.0
31 | VT 0.050 0.065 -0.044 0.711 0.650 -0.269 0.0 0.0
32 | VT -0.050 0.055 -0.063 -0.709 0.587 -0.392 0.0 0.0
33 | VT 0.050 0.055 -0.063 0.711 0.585 -0.391 0.0 0.0
34 | VT -0.050 0.004 0.000 -1.000 0.000 0.000 0.0 0.0
35 | VT -0.050 0.023 0.095 -1.000 0.000 0.000 0.0 0.0
36 | VT -0.050 0.004 0.105 -1.000 0.000 0.000 0.0 0.0
37 | VT -0.050 0.040 0.080 -1.000 0.000 0.000 0.0 0.0
38 | VT -0.050 0.055 0.063 -1.000 0.000 0.000 0.0 0.0
39 | VT -0.050 0.065 0.044 -1.000 0.000 0.000 0.0 0.0
40 | VT -0.050 0.072 0.022 -1.000 0.000 0.000 0.0 0.0
41 | VT -0.050 0.074 0.000 -1.000 0.000 0.000 0.0 0.0
42 | VT -0.050 0.072 -0.022 -1.000 0.000 0.000 0.0 0.0
43 | VT -0.050 0.065 -0.044 -1.000 0.000 0.000 0.0 0.0
44 | VT -0.050 0.055 -0.063 -1.000 0.000 0.000 0.0 0.0
45 | VT -0.050 0.040 -0.080 -1.000 0.000 0.000 0.0 0.0
46 | VT -0.050 0.023 -0.095 -1.000 0.000 0.000 0.0 0.0
47 | VT -0.050 0.004 -0.105 -1.000 0.000 0.000 0.0 0.0
48 | VT 0.050 0.004 -0.105 1.000 -0.002 0.004 0.0 0.0
49 | VT 0.050 0.004 0.000 1.000 -0.002 0.004 0.0 0.0
50 | VT 0.050 0.023 -0.095 1.000 -0.002 0.004 0.0 0.0
51 | VT 0.050 0.040 -0.080 1.000 -0.003 0.004 0.0 0.0
52 | VT 0.050 0.004 0.000 1.000 -0.004 0.004 0.0 0.0
53 | VT 0.050 0.055 -0.063 1.000 -0.004 0.004 0.0 0.0
54 | VT 0.050 0.065 -0.044 1.000 -0.005 0.003 0.0 0.0
55 | VT 0.050 0.004 0.000 1.000 -0.006 0.002 0.0 0.0
56 | VT 0.050 0.072 -0.022 1.000 -0.006 0.002 0.0 0.0
57 | VT 0.050 0.074 0.000 1.000 -0.006 0.001 0.0 0.0
58 | VT 0.050 0.074 0.000 1.000 -0.006 -0.001 0.0 0.0
59 | VT 0.050 0.004 0.000 1.000 -0.006 -0.001 0.0 0.0
60 | VT 0.050 0.072 0.022 1.000 -0.006 -0.001 0.0 0.0
61 | VT 0.050 0.065 0.044 1.000 -0.006 -0.002 0.0 0.0
62 | VT 0.050 0.004 0.000 1.000 -0.005 -0.003 0.0 0.0
63 | VT 0.050 0.055 0.063 1.000 -0.005 -0.003 0.0 0.0
64 | VT 0.050 0.040 0.080 1.000 -0.004 -0.004 0.0 0.0
65 | VT 0.050 0.004 0.000 1.000 -0.003 -0.004 0.0 0.0
66 | VT 0.050 0.023 0.095 1.000 -0.003 -0.004 0.0 0.0
67 | VT 0.050 0.004 0.105 1.000 -0.002 -0.004 0.0 0.0
68 | VT -0.002 0.240 -0.014 -0.734 0.000 -0.679 0.0 0.0
69 | VT -0.002 0.250 -0.010 -0.734 0.480 -0.480 0.0 0.0
70 | VT -0.002 0.240 0.000 -1.000 0.000 0.000 0.0 0.0
71 | VT 0.013 0.250 -0.010 0.734 0.480 -0.480 0.0 0.0
72 | VT 0.013 0.240 -0.014 0.734 0.000 -0.679 0.0 0.0
73 | VT 0.013 0.240 0.000 1.000 0.000 0.000 0.0 0.0
74 | VT -0.002 0.230 -0.010 -0.734 -0.480 -0.480 0.0 0.0
75 | VT 0.013 0.230 -0.010 0.734 -0.480 -0.480 0.0 0.0
76 | VT -0.002 0.226 0.000 -0.734 -0.679 0.000 0.0 0.0
77 | VT 0.013 0.226 0.000 0.734 -0.679 0.000 0.0 0.0
78 | VT -0.002 0.230 0.010 -0.734 -0.480 0.480 0.0 0.0
79 | VT 0.013 0.230 0.010 0.734 -0.480 0.480 0.0 0.0
80 | VT -0.002 0.240 0.014 -0.734 0.000 0.679 0.0 0.0
81 | VT 0.013 0.240 0.014 0.734 0.000 0.679 0.0 0.0
82 | VT -0.002 0.250 0.010 -0.734 0.480 0.480 0.0 0.0
83 | VT 0.013 0.250 0.010 0.734 0.480 0.480 0.0 0.0
84 | VT -0.002 0.254 0.000 -0.734 0.679 0.000 0.0 0.0
85 | VT 0.013 0.254 0.000 0.734 0.679 0.000 0.0 0.0
86 | VT -0.001 0.240 0.005 -1.000 0.000 0.000 0.0 0.0
87 | VT -0.001 0.090 0.010 -1.000 0.000 0.000 0.0 0.0
88 | VT -0.001 0.090 -0.010 -1.000 0.000 0.000 0.0 0.0
89 | VT -0.001 0.240 -0.005 -1.000 0.000 0.000 0.0 0.0
90 | VT 0.001 0.240 0.005 0.000 0.033 0.999 0.0 0.0
91 | VT 0.001 0.090 0.010 0.000 0.033 0.999 0.0 0.0
92 | VT -0.001 0.090 0.010 0.000 0.033 0.999 0.0 0.0
93 | VT -0.001 0.240 0.005 0.000 0.033 0.999 0.0 0.0
94 | VT 0.001 0.090 -0.010 0.000 0.033 -0.999 0.0 0.0
95 | VT 0.001 0.240 -0.005 0.000 0.033 -0.999 0.0 0.0
96 | VT -0.001 0.240 -0.005 0.000 0.033 -0.999 0.0 0.0
97 | VT -0.001 0.090 -0.010 0.000 0.033 -0.999 0.0 0.0
98 | VT 0.001 0.240 -0.005 1.000 0.000 0.000 0.0 0.0
99 | VT 0.001 0.090 -0.010 1.000 0.000 0.000 0.0 0.0
100 | VT 0.001 0.090 0.010 1.000 0.000 0.000 0.0 0.0
101 | VT 0.001 0.240 0.005 1.000 0.000 0.000 0.0 0.0
102 | VT 0.002 0.240 0.014 0.734 0.000 0.679 0.0 0.0
103 | VT 0.002 0.250 0.010 0.734 0.480 0.480 0.0 0.0
104 | VT 0.002 0.240 0.000 1.000 0.000 0.000 0.0 0.0
105 | VT -0.013 0.250 0.010 -0.734 0.480 0.480 0.0 0.0
106 | VT -0.013 0.240 0.014 -0.734 0.000 0.679 0.0 0.0
107 | VT -0.013 0.240 0.000 -1.000 0.000 0.000 0.0 0.0
108 | VT 0.002 0.230 0.010 0.734 -0.480 0.480 0.0 0.0
109 | VT -0.013 0.230 0.010 -0.734 -0.480 0.480 0.0 0.0
110 | VT 0.002 0.226 0.000 0.734 -0.679 0.000 0.0 0.0
111 | VT -0.013 0.226 0.000 -0.734 -0.679 0.000 0.0 0.0
112 | VT 0.002 0.230 -0.010 0.734 -0.480 -0.480 0.0 0.0
113 | VT -0.013 0.230 -0.010 -0.734 -0.480 -0.480 0.0 0.0
114 | VT 0.002 0.240 -0.014 0.734 0.000 -0.679 0.0 0.0
115 | VT -0.013 0.240 -0.014 -0.734 0.000 -0.679 0.0 0.0
116 | VT 0.002 0.250 -0.010 0.734 0.480 -0.480 0.0 0.0
117 | VT -0.013 0.250 -0.010 -0.734 0.480 -0.480 0.0 0.0
118 | VT 0.002 0.254 0.000 0.734 0.679 0.000 0.0 0.0
119 | VT -0.013 0.254 0.000 -0.734 0.679 0.000 0.0 0.0
120 | VT 0.001 0.240 -0.005 1.000 0.000 0.000 0.0 0.0
121 | VT 0.001 0.090 -0.010 1.000 0.000 0.000 0.0 0.0
122 | VT 0.001 0.090 0.010 1.000 0.000 0.000 0.0 0.0
123 | VT 0.001 0.240 0.005 1.000 0.000 0.000 0.0 0.0
124 | VT -0.001 0.240 -0.005 0.000 0.033 -0.999 0.0 0.0
125 | VT -0.001 0.090 -0.010 0.000 0.033 -0.999 0.0 0.0
126 | VT 0.001 0.090 -0.010 0.000 0.033 -0.999 0.0 0.0
127 | VT 0.001 0.240 -0.005 0.000 0.033 -0.999 0.0 0.0
128 | VT -0.001 0.090 0.010 0.000 0.033 0.999 0.0 0.0
129 | VT -0.001 0.240 0.005 0.000 0.033 0.999 0.0 0.0
130 | VT 0.001 0.240 0.005 0.000 0.033 0.999 0.0 0.0
131 | VT 0.001 0.090 0.010 0.000 0.033 0.999 0.0 0.0
132 | VT -0.001 0.240 0.005 -1.000 0.000 0.000 0.0 0.0
133 | VT -0.001 0.090 0.010 -1.000 0.000 0.000 0.0 0.0
134 | VT -0.001 0.090 -0.010 -1.000 0.000 0.000 0.0 0.0
135 | VT -0.001 0.240 -0.005 -1.000 0.000 0.000 0.0 0.0
136 |
137 | IDX10 0 1 2 0 2 3 4 5 1 4
138 | IDX10 1 0 6 7 8 6 8 9 10 11
139 | IDX10 7 10 7 6 12 13 11 12 11 10
140 | IDX10 14 15 13 14 13 12 16 17 15 16
141 | IDX10 15 14 18 19 17 18 17 16 20 21
142 | IDX10 19 20 19 18 22 23 21 22 21 20
143 | IDX10 24 25 23 24 23 22 25 24 3 25
144 | IDX10 3 2 26 27 28 26 29 27 26 30
145 | IDX10 29 26 31 30 26 32 31 26 33 32
146 | IDX10 26 34 33 26 35 34 26 36 35 36
147 | IDX10 26 37 26 38 37 26 39 38 40 41
148 | IDX10 42 42 41 43 44 45 43 45 44 46
149 | IDX10 46 47 48 48 47 49 50 51 52 52
150 | IDX10 51 53 53 54 55 55 54 56 56 57
151 | IDX10 58 58 57 59 60 61 62 63 64 65
152 | IDX10 66 60 62 64 67 65 68 66 62 67
153 | IDX10 69 65 70 68 62 69 71 65 72 70
154 | IDX10 62 71 73 65 74 72 62 73 75 65
155 | IDX10 76 74 62 75 77 65 62 61 76 77
156 | IDX10 63 65 60 64 63 60 63 61 66 67
157 | IDX10 64 66 64 60 68 69 67 68 67 66
158 | IDX10 70 71 69 70 69 68 72 73 71 72
159 | IDX10 71 70 74 75 73 74 73 72 76 77
160 | IDX10 75 76 75 74 77 76 61 77 61 63
161 | IDX10 78 79 80 78 80 81 82 83 84 82
162 | IDX10 84 85 86 87 88 86 88 89 90 91
163 | IDX10 92 90 92 93 94 95 96 97 98 99
164 | IDX10 100 94 96 98 101 99 102 100 96 101
165 | IDX10 103 99 104 102 96 103 105 99 106 104
166 | IDX10 96 105 107 99 108 106 96 107 109 99
167 | IDX10 110 108 96 109 111 99 96 95 110 111
168 | IDX10 97 99 94 98 97 94 97 95 100 101
169 | IDX10 98 100 98 94 102 103 101 102 101 100
170 | IDX10 104 105 103 104 103 102 106 107 105 106
171 | IDX10 105 104 108 109 107 108 107 106 110 111
172 | IDX10 109 110 109 108 111 110 95 111 95 97
173 | IDX10 112 113 114 112 114 115 116 117 118 116
174 | IDX10 118 119 120 121 122 120 122 123 124 125
175 | IDX 126
176 | IDX 124
177 | IDX 126
178 | IDX 127
179 |
180 | TRIS 0 72
181 | ATTR_shade_flat
182 | TRIS 72 72
183 | ANIM_begin
184 | ANIM_trans -0.020 -0.040 0.000 -0.020 -0.040 0.000 0 1 sim/flightmodel/engine/ENGN_thro[0]
185 | ANIM_rotate 1.000 0.000 0.000 60.00 -60.00 0 1 sim/flightmodel/engine/ENGN_thro[0]
186 | ATTR_shade_smooth
187 | TRIS 144 96
188 | ATTR_shade_flat
189 | TRIS 240 24
190 | ANIM_end
191 | ANIM_begin
192 | ANIM_trans 0.020 -0.040 0.000 0.020 -0.040 0.000 0 1 sim/flightmodel/engine/ENGN_thro[1]
193 | ANIM_rotate 1.000 0.000 0.000 60.00 -60.00 0 1 sim/flightmodel/engine/ENGN_thro[1]
194 | ATTR_shade_smooth
195 | TRIS 264 96
196 | ATTR_shade_flat
197 | TRIS 360 24
198 | ANIM_end
199 |
200 | # Built with Blender 2.39. Exported with XPlane2Blender 2.10.
201 |
--------------------------------------------------------------------------------
/test/throttle_int.blend:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Marginal/XPlane2Blender/07195742afe93cea307b6a15e9a2c4d4aac50985/test/throttle_int.blend
--------------------------------------------------------------------------------
/test/transtest.blend:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Marginal/XPlane2Blender/07195742afe93cea307b6a15e9a2c4d4aac50985/test/transtest.blend
--------------------------------------------------------------------------------
/test/wingflex.blend:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Marginal/XPlane2Blender/07195742afe93cea307b6a15e9a2c4d4aac50985/test/wingflex.blend
--------------------------------------------------------------------------------
/test/yoke.blend:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Marginal/XPlane2Blender/07195742afe93cea307b6a15e9a2c4d4aac50985/test/yoke.blend
--------------------------------------------------------------------------------
/test/yoke.obj:
--------------------------------------------------------------------------------
1 | I
2 | 800
3 | OBJ
4 |
5 | TEXTURE
6 | POINT_COUNTS 155 0 0 468
7 |
8 | VT 0.0300 -0.1000 0.0900 0.713 -0.068 0.698 0.7363 0.209
9 | VT -0.0300 -0.1000 0.0900 -0.713 -0.068 0.698 0.7383 0.209
10 | VT -0.0400 0.0000 0.0900 -0.713 -0.068 0.698 0.7383 0.207
11 | VT 0.0400 0.0000 0.0900 0.713 -0.068 0.698 0.7363 0.207
12 | VT 0.0300 -0.1000 0.0730 0.693 -0.087 -0.715 0.7383 0.209
13 | VT 0.0390 0.0000 0.0700 0.693 -0.087 -0.715 0.7383 0.207
14 | VT -0.0300 -0.1000 0.0730 -0.693 -0.087 -0.715 0.7363 0.209
15 | VT -0.0390 0.0000 0.0700 -0.693 -0.087 -0.715 0.7363 0.207
16 | VT 0.0000 -0.0800 0.0900 0.000 0.704 0.710 0.7363 0.25
17 | VT 0.1404 -0.0900 0.1000 -0.385 0.477 0.790 0.7363 0.252
18 | VT 0.1504 -0.1200 0.1000 0.409 -0.114 0.905 0.7383 0.252
19 | VT 0.0000 -0.1300 0.0900 0.000 -0.009 1.000 0.7383 0.25
20 | VT -0.1504 -0.1200 0.1000 -0.409 -0.114 0.905 0.7383 0.2266
21 | VT -0.1404 -0.0900 0.1000 0.385 0.477 0.790 0.7383 0.2285
22 | VT 0.0000 -0.0800 0.0900 0.000 0.704 0.710 0.7363 0.2285
23 | VT 0.0000 -0.1300 0.0900 0.000 -0.009 1.000 0.7363 0.2266
24 | VT -0.1404 -0.0900 0.0800 0.468 0.685 -0.559 0.7383 0.2266
25 | VT 0.0000 -0.0800 0.0700 0.000 0.710 -0.704 0.7363 0.2266
26 | VT 0.0000 -0.0800 0.0700 0.000 0.710 -0.704 0.7383 0.25
27 | VT 0.1404 -0.0900 0.0800 -0.468 0.685 -0.559 0.7383 0.252
28 | VT -0.1504 -0.1200 0.0800 -0.712 -0.160 -0.684 0.7383 0.2285
29 | VT 0.0000 -0.1300 0.0700 0.000 0.009 -1.000 0.7363 0.2285
30 | VT 0.1504 -0.1200 0.0800 0.712 -0.160 -0.684 0.7363 0.252
31 | VT 0.0000 -0.1300 0.0700 0.000 0.009 -1.000 0.7363 0.25
32 | VT 0.1604 0.0000 0.1000 -0.452 -0.006 0.892 0.7383 0.2266
33 | VT 0.1804 0.0000 0.1000 0.696 0.000 0.718 0.7383 0.2285
34 | VT 0.1504 -0.1200 0.1000 0.409 -0.114 0.905 0.7363 0.2285
35 | VT 0.1404 -0.0900 0.1000 -0.385 0.477 0.790 0.7363 0.2266
36 | VT 0.1604 0.0000 0.0800 -0.891 0.169 -0.421 0.7383 0.2285
37 | VT 0.1404 -0.0900 0.0800 -0.468 0.685 -0.559 0.7363 0.2285
38 | VT 0.1804 0.0000 0.0800 1.000 0.000 0.000 0.7383 0.2266
39 | VT 0.1504 -0.1200 0.0800 0.712 -0.160 -0.684 0.7363 0.2266
40 | VT 0.1504 0.0400 0.0800 -0.788 0.615 0.000 0.7363 0.209
41 | VT 0.1704 0.0400 0.0800 0.615 0.788 0.000 0.7383 0.209
42 | VT 0.1704 0.0400 0.1000 0.520 0.666 0.536 0.7383 0.207
43 | VT 0.1504 0.0400 0.1000 -0.612 0.478 0.631 0.7363 0.207
44 | VT 0.1604 0.0000 0.0800 -0.891 0.169 -0.421 0.7383 0.252
45 | VT 0.1504 0.0400 0.0800 -0.788 0.615 0.000 0.7363 0.252
46 | VT 0.1504 0.0400 0.1000 -0.612 0.478 0.631 0.7363 0.25
47 | VT 0.1604 0.0000 0.1000 -0.452 -0.006 0.892 0.7383 0.25
48 | VT 0.1704 0.0400 0.1000 0.520 0.666 0.536 0.7363 0.252
49 | VT 0.1804 0.0000 0.1000 0.696 0.000 0.718 0.7383 0.252
50 | VT 0.1704 0.0400 0.0800 0.615 0.788 0.000 0.7363 0.25
51 | VT 0.1804 0.0000 0.0800 1.000 0.000 0.000 0.7383 0.25
52 | VT 0.1354 0.0070 0.0830 -0.733 0.481 -0.481 0.7363 0.251
53 | VT 0.1354 0.0100 0.0900 -0.736 0.677 0.000 0.7383 0.25
54 | VT 0.1354 0.0000 0.0900 -1.000 0.000 0.000 0.7368 0.2511
55 | VT 0.1354 0.0070 0.0970 -0.733 0.481 0.481 0.7373 0.251
56 | VT 0.1354 0.0000 0.1000 -0.736 0.000 0.677 0.7363 0.25
57 | VT 0.1354 -0.0070 0.0970 -0.894 -0.176 0.411 0.7383 0.25
58 | VT 0.1354 -0.0100 0.0900 -1.000 0.000 0.000 0.7363 0.252
59 | VT 0.1354 -0.0070 0.0830 -1.000 0.000 0.000 0.7373 0.251
60 | VT 0.1354 0.0000 0.0800 -0.894 0.176 -0.411 0.7373 0.25
61 | VT 0.1604 0.0000 0.0800 -0.891 0.169 -0.421 0.7363 0.209
62 | VT 0.1604 0.0070 0.0830 0.000 0.707 -0.707 0.7373 0.209
63 | VT 0.1354 0.0070 0.0830 -0.733 0.481 -0.481 0.7373 0.207
64 | VT 0.1354 0.0000 0.0800 -0.894 0.176 -0.411 0.7363 0.207
65 | VT 0.1604 0.0000 0.1000 -0.452 -0.006 0.892 0.7383 0.209
66 | VT 0.1604 -0.0070 0.0970 0.000 -0.394 0.919 0.7363 0.209
67 | VT 0.1354 -0.0070 0.0970 -0.894 -0.176 0.411 0.7363 0.207
68 | VT 0.1354 0.0000 0.1000 -0.736 0.000 0.677 0.7383 0.207
69 | VT 0.1604 0.0070 0.0970 0.000 0.707 0.707 0.7363 0.209
70 | VT 0.1354 0.0070 0.0970 -0.733 0.481 0.481 0.7363 0.207
71 | VT 0.1604 0.0100 0.0900 0.000 1.000 0.000 0.7383 0.209
72 | VT 0.1354 0.0100 0.0900 -0.736 0.677 0.000 0.7383 0.207
73 | VT -0.1605 0.0070 0.0970 0.000 0.707 0.707 0.7373 0.209
74 | VT -0.1605 0.0100 0.0900 0.000 1.000 0.000 0.7383 0.209
75 | VT -0.1355 0.0100 0.0900 0.734 0.679 0.000 0.7383 0.207
76 | VT -0.1355 0.0070 0.0970 0.730 0.483 0.483 0.7373 0.207
77 | VT -0.1605 0.0070 0.0830 0.000 0.707 -0.707 0.7363 0.209
78 | VT -0.1355 0.0070 0.0830 0.730 0.483 -0.483 0.7363 0.207
79 | VT -0.1604 0.0000 0.0800 0.891 0.169 -0.421 0.7383 0.209
80 | VT -0.1355 0.0000 0.0800 0.892 0.176 -0.416 0.7383 0.207
81 | VT -0.1605 -0.0070 0.0970 0.000 -0.394 0.919 0.7383 0.209
82 | VT -0.1604 0.0000 0.1000 0.452 -0.006 0.892 0.7363 0.209
83 | VT -0.1355 0.0000 0.1000 0.734 0.000 0.679 0.7363 0.207
84 | VT -0.1355 -0.0070 0.0970 0.892 -0.180 0.414 0.7383 0.207
85 | VT -0.1355 0.0000 0.1000 0.734 0.000 0.679 0.7363 0.25
86 | VT -0.1355 0.0070 0.0970 0.730 0.483 0.483 0.7373 0.251
87 | VT -0.1354 0.0000 0.0900 1.000 0.000 0.000 0.7375 0.2507
88 | VT -0.1355 -0.0070 0.0970 0.892 -0.180 0.414 0.7373 0.251
89 | VT -0.1355 -0.0100 0.0900 1.000 -0.007 0.000 0.7373 0.25
90 | VT -0.1355 -0.0070 0.0830 1.000 -0.005 -0.005 0.7373 0.25
91 | VT -0.1355 0.0000 0.0800 0.892 0.176 -0.416 0.7373 0.25
92 | VT -0.1355 0.0070 0.0830 0.730 0.483 -0.483 0.7363 0.251
93 | VT -0.1355 0.0100 0.0900 0.734 0.679 0.000 0.7373 0.25
94 | VT -0.1804 0.0000 0.1000 -0.697 -0.000 0.717 0.7383 0.2266
95 | VT -0.1705 0.0400 0.1000 -0.520 0.666 0.535 0.7383 0.2285
96 | VT -0.1504 0.0400 0.1000 0.612 0.478 0.631 0.7363 0.2285
97 | VT -0.1604 0.0000 0.1000 0.452 -0.006 0.892 0.7363 0.2266
98 | VT -0.1704 0.0400 0.0800 -0.616 0.788 -0.001 0.7363 0.2285
99 | VT -0.1804 0.0000 0.0800 -1.000 -0.000 -0.001 0.7363 0.2266
100 | VT -0.1504 0.0400 0.0800 0.788 0.615 0.000 0.7383 0.2285
101 | VT -0.1604 0.0000 0.0800 0.891 0.169 -0.421 0.7383 0.2266
102 | VT -0.1504 0.0400 0.1000 0.612 0.478 0.631 0.7363 0.209
103 | VT -0.1705 0.0400 0.1000 -0.520 0.666 0.535 0.7383 0.209
104 | VT -0.1704 0.0400 0.0800 -0.616 0.788 -0.001 0.7383 0.207
105 | VT -0.1504 0.0400 0.0800 0.788 0.615 0.000 0.7363 0.207
106 | VT -0.1404 -0.0900 0.1000 0.385 0.477 0.790 0.7363 0.252
107 | VT -0.1504 -0.1200 0.1000 -0.409 -0.114 0.905 0.7383 0.252
108 | VT -0.1804 0.0000 0.1000 -0.697 -0.000 0.717 0.7383 0.25
109 | VT -0.1604 0.0000 0.1000 0.452 -0.006 0.892 0.7363 0.25
110 | VT -0.1804 0.0000 0.0800 -1.000 -0.000 -0.001 0.7363 0.25
111 | VT -0.1504 -0.1200 0.0800 -0.712 -0.160 -0.684 0.7363 0.252
112 | VT -0.1604 0.0000 0.0800 0.891 0.169 -0.421 0.7383 0.25
113 | VT -0.1404 -0.0900 0.0800 0.468 0.685 -0.559 0.7383 0.252
114 | VT 0.0350 0.0000 0.0000 1.000 0.000 0.000 0.0 0.0
115 | VT 0.0350 0.8000 0.0000 1.000 0.000 0.000 0.0 0.0
116 | VT 0.0250 0.8000 -0.0250 0.707 0.000 -0.707 0.0 0.0
117 | VT 0.0250 0.0000 -0.0250 0.707 0.000 -0.707 0.0 0.0
118 | VT 0.0250 0.0000 0.0250 0.707 0.000 0.707 0.0 0.0
119 | VT 0.0250 0.8000 0.0250 0.707 0.000 0.707 0.0 0.0
120 | VT 0.0000 0.0000 0.0350 0.000 0.000 1.000 0.0 0.0
121 | VT 0.0000 0.8000 0.0350 0.000 0.000 1.000 0.0 0.0
122 | VT -0.0250 0.0000 0.0250 -0.707 0.000 0.707 0.0 0.0
123 | VT -0.0250 0.8000 0.0250 -0.707 0.000 0.707 0.0 0.0
124 | VT -0.0350 0.0000 0.0000 -1.000 0.000 0.000 0.0 0.0
125 | VT -0.0350 0.8000 0.0000 -1.000 0.000 0.000 0.0 0.0
126 | VT -0.0250 0.0000 -0.0250 -0.707 0.000 -0.707 0.0 0.0
127 | VT -0.0250 0.8000 -0.0250 -0.707 0.000 -0.707 0.0 0.0
128 | VT 0.0000 0.0000 -0.0350 0.000 0.000 -1.000 0.0 0.0
129 | VT 0.0000 0.8000 -0.0350 0.000 0.000 -1.000 0.0 0.0
130 | VT 0.0287 0.8287 0.1000 0.503 0.503 0.702 0.0 0.0
131 | VT 0.0161 0.8367 0.1000 0.269 0.662 0.700 0.0 0.0
132 | VT 0.0140 0.8320 -0.0350 0.259 0.637 -0.726 0.0 0.0
133 | VT 0.0250 0.8250 -0.0350 0.484 0.484 -0.729 0.0 0.0
134 | VT -0.0010 0.8350 -0.0350 -0.006 0.876 -0.482 0.0 0.0
135 | VT 0.0000 0.8401 0.1000 -0.005 0.712 0.702 0.0 0.0
136 | VT -0.0161 0.8367 0.1000 -0.273 0.660 0.699 0.0 0.0
137 | VT -0.0140 0.8320 -0.0350 -0.263 0.636 -0.725 0.0 0.0
138 | VT -0.0287 0.7713 0.1000 -0.503 -0.503 0.702 0.0 0.0
139 | VT -0.0161 0.7633 0.1000 -0.244 -0.383 0.891 0.0 0.0
140 | VT -0.0140 0.7680 -0.0350 -0.536 -0.843 -0.037 0.0 0.0
141 | VT -0.0250 0.7750 -0.0350 -0.619 -0.619 -0.482 0.0 0.0
142 | VT -0.0401 0.8000 0.1000 -0.712 0.000 0.702 0.0 0.0
143 | VT -0.0367 0.7839 0.1000 -0.661 -0.271 0.700 0.0 0.0
144 | VT -0.0320 0.7860 -0.0350 -0.637 -0.261 -0.726 0.0 0.0
145 | VT -0.0350 0.8000 -0.0350 -0.686 0.000 -0.728 0.0 0.0
146 | VT -0.0287 0.8287 0.1000 -0.503 0.503 0.702 0.0 0.0
147 | VT -0.0367 0.8161 0.1000 -0.661 0.271 0.700 0.0 0.0
148 | VT -0.0320 0.8140 -0.0350 -0.637 0.261 -0.726 0.0 0.0
149 | VT -0.0250 0.8250 -0.0350 -0.484 0.484 -0.729 0.0 0.0
150 | VT 0.0401 0.8000 0.1000 0.712 0.000 0.702 0.0 0.0
151 | VT 0.0367 0.8161 0.1000 0.661 0.271 0.700 0.0 0.0
152 | VT 0.0320 0.8140 -0.0350 0.637 0.261 -0.726 0.0 0.0
153 | VT 0.0350 0.8000 -0.0350 0.686 0.000 -0.728 0.0 0.0
154 | VT 0.0287 0.7713 0.1000 0.503 -0.503 0.702 0.0 0.0
155 | VT 0.0367 0.7839 0.1000 0.661 -0.271 0.700 0.0 0.0
156 | VT 0.0320 0.7860 -0.0350 0.637 -0.261 -0.726 0.0 0.0
157 | VT 0.0250 0.7750 -0.0350 0.619 -0.619 -0.482 0.0 0.0
158 | VT 0.0140 0.7680 -0.0350 0.536 -0.843 -0.037 0.0 0.0
159 | VT 0.0161 0.7633 0.1000 0.244 -0.383 0.891 0.0 0.0
160 | VT 0.0000 0.8000 0.1000 0.000 0.000 1.000 0.0 0.0
161 | VT 0.0000 0.7599 0.1000 0.000 0.000 1.000 0.0 0.0
162 | VT 0.0010 0.8350 -0.0350 0.000 0.000 -1.000 0.0 0.0
163 |
164 | IDX10 106 107 108 106 108 109 110 111 107 110
165 | IDX10 107 106 112 113 111 112 111 110 114 115
166 | IDX10 113 114 113 112 116 117 115 116 115 114
167 | IDX10 118 119 117 118 117 116 120 121 119 120
168 | IDX10 119 118 121 120 109 121 109 108 122 123
169 | IDX10 124 122 124 125 126 124 123 126 123 127
170 | IDX10 127 128 129 127 129 126 130 131 132 130
171 | IDX10 132 133 134 135 136 134 136 137 138 139
172 | IDX10 140 138 140 141 142 143 144 142 144 145
173 | IDX10 146 147 148 146 148 149 141 129 128 141
174 | IDX10 128 138 137 140 139 137 139 134 133 136
175 | IDX10 135 133 135 130 149 150 151 149 151 146
176 | IDX10 145 148 147 145 147 142 125 144 143 125
177 | IDX10 143 122 123 152 127 152 123 122 143 152
178 | IDX10 122 152 143 142 147 152 142 152 147 146
179 | IDX10 151 152 146 152 151 153 131 152 153 152
180 | IDX10 131 130 135 152 130 152 135 134 139 152
181 | IDX10 134 152 139 138 128 152 138 152 128 127
182 | IDX10 140 137 145 140 145 144 125 141 140 125
183 | IDX10 140 144 141 125 124 141 124 129 145 137
184 | IDX10 136 145 136 148 149 148 136 149 136 133
185 | IDX10 124 154 126 124 126 129 0 1 2 0
186 | IDX10 2 3 4 0 3 4 3 5 6 7
187 | IDX10 2 6 2 1 6 4 5 6 5 7
188 | IDX10 8 9 10 8 10 11 12 13 14 12
189 | IDX10 14 15 16 17 14 16 14 13 18 19
190 | IDX10 9 18 9 8 17 16 20 17 20 21
191 | IDX10 22 19 18 22 18 23 24 25 26 24
192 | IDX10 26 27 28 24 27 28 27 29 25 30
193 | IDX10 31 25 31 26 32 33 34 32 34 35
194 | IDX10 36 37 38 36 38 39 38 40 41 38
195 | IDX10 41 39 40 42 43 40 43 41 44 45
196 | IDX10 46 45 47 46 47 48 46 48 49 46
197 | IDX10 49 50 46 50 51 46 51 52 46 52
198 | IDX10 44 46 53 54 55 53 55 56 57 58
199 | IDX10 59 57 59 60 61 57 60 61 60 62
200 | IDX10 63 61 62 63 62 64 54 63 64 54
201 | IDX10 64 55 65 66 67 65 67 68 66 69
202 | IDX10 70 66 70 67 69 71 72 69 72 70
203 | IDX10 73 74 75 73 75 76 74 65 68 74
204 | IDX10 68 75 77 78 79 80 77 79 81 80
205 | IDX10 79 82 81 79 83 82 79 84 83 79
206 | IDX10 85 84 79 78 85 79 86 87 88 86
207 | IDX10 88 89 90 87 86 90 86 91 89 88
208 | IDX10 92 89 92 93 94 95 96 94 96 97
209 | IDX10 98 99 100 98 100 101 102 100 99 102
210 | IDX 99
211 | IDX 103
212 | IDX 101
213 | IDX 104
214 | IDX 105
215 | IDX 101
216 | IDX 105
217 | IDX 98
218 |
219 | ANIM_begin
220 | ANIM_rotate -1.0000 0.0000 0.0000 15.00 -15.00 -1 1 sim/joystick/yolk_pitch_ratio
221 | TRIS 0 216
222 | ANIM_begin
223 | ANIM_trans 0.0000 0.8000 0.0000 0.0000 0.8000 0.0000 0 0 no_ref
224 | ANIM_rotate 0.0000 0.0000 1.0000 30.00 -30.00 -1 1 sim/joystick/yolk_roll_ratio
225 | TRIS 216 252
226 | ANIM_end
227 | ANIM_end
228 |
229 | # Built with Blender 2.45. Exported with XPlane2Blender 3.00.
230 |
--------------------------------------------------------------------------------
/uvFixupACF.py:
--------------------------------------------------------------------------------
1 | #!BPY
2 | """ Registration info for Blender menus:
3 | Name: 'Merge _paint and _paint2'
4 | Blender: 243
5 | Group: 'Image'
6 | Tooltip: 'Merge X-Plane plane_paint and plane_paint2 bitmaps'
7 | """
8 | __author__ = "Jonathan Harris"
9 | __email__ = "Jonathan Harris, Jonathan Harris "
10 | __url__ = "XPlane2Blender, http://marginal.org.uk/x-planescenery/"
11 | __version__ = "3.11"
12 | __bpydoc__ = """\
13 | This script fixes up an imported plane's texture assignments to use
14 | a single bitmap file.
15 |
16 | Usage:
17 | * Create a new texture bitmap with plane_paint on the left
18 | and plane paint2 on the right.
19 | * Save the new texture bitmap as a PNG with the same name
20 | as the blend file.
21 | * Run this script from the UVs menu in the UV/Image Editor
22 | window.
23 | """
24 |
25 | #------------------------------------------------------------------------
26 | # UV Resize for blender 2.43 or above
27 | #
28 | # Copyright (c) 2006,2007 Jonathan Harris
29 | #
30 | # Mail:
31 | # Web: http://marginal.org.uk/x-planescenery/
32 | #
33 | # See XPlane2Blender.html for usage.
34 | #
35 | # This software is licensed under a Creative Commons License
36 | # Attribution-Noncommercial-Share Alike 3.0:
37 | #
38 | # You are free:
39 | # * to Share - to copy, distribute and transmit the work
40 | # * to Remix - to adapt the work
41 | #
42 | # Under the following conditions:
43 | # * Attribution. You must attribute the work in the manner specified
44 | # by the author or licensor (but not in any way that suggests that
45 | # they endorse you or your use of the work).
46 | # * Noncommercial. You may not use this work for commercial purposes.
47 | # * Share Alike. If you alter, transform, or build upon this work,
48 | # you may distribute the resulting work only under the same or
49 | # similar license to this one.
50 | #
51 | # For any reuse or distribution, you must make clear to others the
52 | # license terms of this work.
53 | #
54 | # This is a human-readable summary of the Legal Code (the full license):
55 | # http://creativecommons.org/licenses/by-nc-sa/3.0/
56 | #
57 | #
58 | # 2006-04-07 v2.20
59 | # - New file
60 | #
61 | # 2007-10-16 v2.45
62 | # - Fix for Blender 2.45
63 | #
64 | # 2008-04-08 v3.09
65 | # - Fix for break in version 3.03
66 | #
67 |
68 | import Blender
69 | from Blender import Draw, Image, Scene, NMesh, Window
70 | from os.path import splitext
71 |
72 | (newfile,ext)=splitext(Blender.Get('filename'))
73 | for ext in ['.dds', '.DDS', '.png', '.PNG', '.bmp', '.BMP']:
74 | try:
75 | tex=Image.Load(newfile+ext)
76 | dim=tex.getSize()
77 |
78 | for ob in Scene.GetCurrent().objects:
79 | if ob.getType() == "Mesh" and ob.getData().hasFaceUV():
80 | mesh = ob.getData()
81 | for face in mesh.faces:
82 | if face.mode & NMesh.FaceModes.TEX and face.image:
83 | oldfile=face.image.filename.lower()
84 | if '_paint.' in oldfile:
85 | for i in range(len(face.uv)):
86 | (s,t)=face.uv[i]
87 | face.uv[i]=(s/2, t)
88 | face.image=tex
89 | elif '_paint2.' in oldfile:
90 | for i in range(len(face.uv)):
91 | (s,t)=face.uv[i]
92 | face.uv[i]=(0.5+s/2, t)
93 | face.image=tex
94 | ob.setName(ob.name.replace('*',''))
95 | mesh.name=mesh.name.replace('*','')
96 | mesh.update()
97 |
98 | Window.RedrawAll()
99 | break
100 |
101 | except (RuntimeError, IOError):
102 | pass
103 |
104 | else:
105 | msg='Can\'t load texture file %s.png or .bmp' % newfile
106 | print "ERROR:\t%s\n" % msg
107 | Draw.PupMenu("ERROR: %s" % msg)
108 |
--------------------------------------------------------------------------------
/uvResize.py:
--------------------------------------------------------------------------------
1 | #!BPY
2 | """ Registration info for Blender menus:
3 | Name: 'Replace and fixup UV mapping...'
4 | Blender: 243
5 | Group: 'Image'
6 | Tooltip: 'Adjust UV assignments to enlarged bitmap'
7 | """
8 | __author__ = "Jonathan Harris"
9 | __email__ = "Jonathan Harris, Jonathan Harris "
10 | __url__ = "XPlane2Blender, http://marginal.org.uk/x-planescenery/"
11 | __version__ = "3.11"
12 | __bpydoc__ = """\
13 | This script fixes up selected meshes' texture assignments after increasing
14 | the size of the image.
15 |
16 | Usage:
17 | * Double the size of the texture bitmap file in an image editor.
18 | * Use Image->Reload to load the resized bitmap.
19 | * Select a mesh or meshes.
20 | * Run this script from the UVs menu in the UV/Image Editor
21 | window.
22 | * Choose the location of the textures in the bitmap file.
23 | * Press the Resize button.
24 | """
25 |
26 | #------------------------------------------------------------------------
27 | # UV Resize for blender 2.43 or above
28 | #
29 | # Copyright (c) 2005,2007 Jonathan Harris
30 | #
31 | # Mail:
32 | # Web: http://marginal.org.uk/x-planescenery/
33 | #
34 | # See XPlane2Blender.html for usage.
35 | #
36 | # This software is licensed under a Creative Commons License
37 | # Attribution-Noncommercial-Share Alike 3.0:
38 | #
39 | # You are free:
40 | # * to Share - to copy, distribute and transmit the work
41 | # * to Remix - to adapt the work
42 | #
43 | # Under the following conditions:
44 | # * Attribution. You must attribute the work in the manner specified
45 | # by the author or licensor (but not in any way that suggests that
46 | # they endorse you or your use of the work).
47 | # * Noncommercial. You may not use this work for commercial purposes.
48 | # * Share Alike. If you alter, transform, or build upon this work,
49 | # you may distribute the resulting work only under the same or
50 | # similar license to this one.
51 | #
52 | # For any reuse or distribution, you must make clear to others the
53 | # license terms of this work.
54 | #
55 | # This is a human-readable summary of the Legal Code (the full license):
56 | # http://creativecommons.org/licenses/by-nc-sa/3.0/
57 | #
58 | #
59 | # 2005-03-02 v2.00
60 | # - New file
61 | #
62 | # 2007-12-06 v3.03
63 | # - Generalise to handle cases where new image is multiple size of old
64 | # - Handle case where new image is not a multiple of the old
65 | #
66 |
67 | import Blender
68 | from Blender import BGL, Draw, Image, NMesh, Scene, Window
69 |
70 | # Constants
71 | CANCEL=0
72 | PANELPAD=7
73 | PANELINDENT=8
74 | PANELTOP=8
75 | PANELHEAD=20
76 | PANELWIDTH=304
77 | CONTROLSIZE=19
78 |
79 | # Globals
80 | oldimage=None
81 | newimage=None
82 | oldsize=None
83 | newsize=None
84 | buttons=[]
85 | offsets=[]
86 | rows=0
87 | cols=0
88 |
89 | def dodialog(newname):
90 | global newimage, newsize, offsets, rows, cols
91 |
92 | try:
93 | newimage=Image.Load(newname)
94 | newsize=newimage.getSize()
95 | except:
96 | Draw.PupMenu("Can't read image %s" % newname)
97 | return
98 |
99 | if newsize[0]==oldsize[0] and newsize[1]==oldsize[1]:
100 | # same size, just replace
101 | doapply(0,0)
102 | return
103 | elif newsize[0]= 235:
154 | theme=Blender.Window.Theme.Get()
155 | if theme:
156 | theme=theme[0]
157 | text=theme.get('ui').text
158 | space=theme.get('buts')
159 | text_hi=space.text_hi
160 | header=space.header
161 | header=[max(header[0]-30, 0), # 30 appears to be hard coded
162 | max(header[1]-30, 0),
163 | max(header[2]-30, 0),
164 | header[3]]
165 | panel=space.panel
166 | back=space.back
167 |
168 | BGL.glEnable (BGL.GL_BLEND)
169 | BGL.glBlendFunc (BGL.GL_SRC_ALPHA, BGL.GL_ONE_MINUS_SRC_ALPHA)
170 | BGL.glClearColor(float(back[0])/255, float(back[1])/255, float(back[2])/255, 1)
171 | BGL.glClear (BGL.GL_COLOR_BUFFER_BIT)
172 |
173 | BGL.glColor4ub(*header)
174 | BGL.glRectd(xoff, yoff-PANELTOP, xoff-PANELINDENT+PANELWIDTH, yoff-PANELTOP-PANELHEAD)
175 | BGL.glColor4ub(*panel)
176 | BGL.glRectd(xoff, yoff-PANELTOP-PANELHEAD, xoff-PANELINDENT+PANELWIDTH, yoff-60-PANELINDENT-rows*CONTROLSIZE)
177 | BGL.glColor4ub(*text_hi)
178 | BGL.glRasterPos2d(xoff+PANELINDENT, yoff-23)
179 | Draw.Text("Fixup UV mapping")
180 |
181 | BGL.glColor4ub(*text)
182 | BGL.glRasterPos2d(xoff+PANELINDENT, yoff-48)
183 | Draw.Text("Select where the old image is located in the new:")
184 |
185 | buttons=[]
186 | for i in range(rows):
187 | for j in range(cols):
188 | buttons.append(Draw.Button('', len(buttons)+CANCEL+1, xoff+PANELINDENT+j*CONTROLSIZE, yoff-80-i*CONTROLSIZE, CONTROLSIZE, CONTROLSIZE))
189 |
190 | buttons.append(Draw.Button("Cancel", CANCEL, xoff-PANELINDENT*2+PANELWIDTH-4*CONTROLSIZE, yoff-60-rows*CONTROLSIZE, 4*CONTROLSIZE, CONTROLSIZE))
191 |
192 |
193 | def doapply(xoff,yoff):
194 | xscale=oldsize[0]/float(newsize[0])
195 | yscale=oldsize[1]/float(newsize[1])
196 | xoff/=float(newsize[0])
197 | yoff/=float(newsize[1])
198 |
199 | Draw.Exit()
200 | for ob in Scene.GetCurrent().objects:
201 | if ob.getType() == "Mesh":
202 | mesh = ob.getData()
203 | if mesh.hasFaceUV():
204 | for face in mesh.faces:
205 | if face.mode & NMesh.FaceModes.TEX and face.image==oldimage:
206 | for i in range(len(face.uv)):
207 | (s,t)=face.uv[i]
208 | face.uv[i]=(xoff+s*xscale, yoff+t*yscale)
209 | face.image=newimage
210 | mesh.update()
211 |
212 | newimage.makeCurrent()
213 | Window.RedrawAll()
214 |
215 |
216 | #---------------------------------------------------------------------------
217 | oldimage=Image.GetCurrent()
218 | if oldimage:
219 | try:
220 | oldsize=oldimage.getSize()
221 | except:
222 | Draw.PupMenu("Can't read image %s" % oldimage.name)
223 | else:
224 | #Window.ImageSelector(dodialog, 'Replace image', oldimage.filename)
225 | Window.FileSelector(dodialog, 'Replace image', oldimage.filename)
226 |
--------------------------------------------------------------------------------