hartsantler wrote:Download: (old)
.
http://blender2ogre.googlecode.com/file ... -0.5.5.zip
Download Beta: requires Blender2.63 or newer
.
http://blender2ogre.googlecode.com/file ... eview1.rar
Installing:
. see README.txt
.
jMonkeyEngine users do not need to install OgreCommandLineTools
Ogre Exporter Features:
.
http://code.google.com/p/blender2ogre/w/list
Known Issues:
. previews in OgreMeshy will not show object-level scaling, rotation, or location
. make sure objects with an Armature have zero scaling, the mesh should also be a child of the Armature.
. the root bone should not have any rotation in edit mode (its straight up and down)
. live streaming may not work with the latest RealXtend (Tundra)
Whats New:
. library linked groups will auto-merge into a single mesh
. ogre-dot-material script inheritance
. one-click-preview in RealXtend Tundra2
. supports all collision types of Tundra2 (saves .txml format)
. eight pass material layers
. normal maps and per-pixel shaders
. real-time streaming of object location and scale into RealXtend Tundra2
i found a bug (maybe)
if ob.modifiers:
cleanup = True
copy = ob.copy()
#bpy.context.scene.objects.link(copy)
rem = []
for mod in copy.modifiers: # remove armature and array modifiers before collaspe
if mod.type in 'ARMATURE ARRAY'.split(): rem.append( mod )
for mod in rem: copy.modifiers.remove( mod )
## bake mesh ##
mesh = copy.to_mesh(bpy.context.scene, True, "PREVIEW") # collaspe
else:
copy = ob
mesh = ob.data
in blender documentation, it says that
Upgrading Exporters from 2.62
For exporters the most direct way to upgrade is to use tessfaces as with importing however its important to know that tessfaces may not exist for a mesh, the array will be empty as if there are no faces.
So before accessing tessface data call: bpy.types.Mesh.update (calc_tessface=True).
and
for F in mesh.tessfaces:
smooth = F.use_smooth
I found that the length of mesh.tessfaces is always 0 when you press the preview button。
if you add
ob.data.calc_tessface()
if ob.modifiers: #Original code
cleanup = True #Original code
copy = ob.copy() #Original code
#bpy.context.scene.objects.link(copy) #Original code
The preview button will act right。