EDIT: Think I managed to get it to work - I added
Code: Select all
nla.is_solo = True
Code: Select all
nla.is_solo = True
Code: Select all
<track bone="FrontDownLeftLeg" >
<keyframes >
<keyframe time="0.0" >
<translate z="0.000000" x="0.000000" y="0.000000" />
<rotate angle="0.000000" >
<axis z="-0.000000" x="-0.000000" y="0.000000" />
</rotate>
<scale z="1.000000" x="1.000000" y="1.000000" />
</keyframe>
<keyframe time="0.041666666666666664" >
<translate z="0.000000" x="0.000000" y="0.000000" />
<rotate angle="0.022355" >
<axis z="0.000000" x="1.000038" y="0.000000" />
</rotate>
<scale z="1.000000" x="1.000000" y="1.000000" />
</keyframe>
Did you ever solve this? I'm having the same problem. I set my "SHADER_PROGRAMS" path in the config file to the path of my OgreSDK\media\materials\programs, I am not seeing any shaders under that dropbox. Anyone have any ideas?efaj wrote:How do you use the script inheritance option? Is it what I think it is?
I have a base .material that all my other mats inherit from, and until now, I've just been opening the file myself and adding it..... each time I export. But, does this mean now I can tell the exporter in the blend once and never worry more?
When clicking the dropbox I only get "Script Inheritance", aka probably blank.
Did you apply scale/rotation/location to both mesh and armature before actually doing the animation?xXx wrote:When i export my animated model and open it in OgreMeshy (or use it in Ogre), whenever i play an animation, the model is translated down, passing through the bounding box... What's wrong? Anyone knows how to fix this?
Code: Select all
blender <my.blend> --factory-settings --background --python /absolute/path/to/blender-export-mesh.py -- <object> <mesh_name> <material_name> <outdir>
Code: Select all
import sys, os
import bpy
try:
myargs = sys.argv[sys.argv.index('--')+1:]
except:
print("Bad arguments.")
exit(-1)
# In case blender2ogre is not in the user's blender installation, also try to
# load it from the same directory as this helper script.
try:
helper_path = os.path.dirname(os.path.abspath(sys.argv[sys.argv.index('--python')+1]))
if helper_path not in sys.path:
sys.path.append(helper_path)
except:
print("Can't find helper path.")
exit(-1)
import io_export_ogreDotScene
# reset all config to default, overriding anything saved by the user
for tag in io_export_ogreDotScene._CONFIG_DEFAULTS_ALL:
io_export_ogreDotScene.CONFIG[ tag ] = io_export_ogreDotScene._CONFIG_DEFAULTS_ALL[ tag ]
# enable edge lists for stencil shadows
io_export_ogreDotScene.CONFIG['generateEdgeLists'] = True;
def export_mesh(o, mesh_name, material_name, outdir):
o.data.materials[0].name = material_name
o.data.update(calc_tessface=True)
io_export_ogreDotScene.dot_mesh(o, path=outdir, force_name=mesh_name)
export_mesh(bpy.data.objects[myargs[0]], myargs[1], myargs[2], myargs[3])
Code: Select all
<keyframe time="0.75" >
<translate z="0.000000" y="0.000000" x="0.000000" />
<rotate angle="0.000000" >
<axis z="0.000000" y="0.000000" x="1.000000" />
</rotate>
<scale z="1.000000" y="1.000000" x="1.000000" />
</keyframe>