Skip to content

OpenMW/osgexport

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OpenMW OpenSceneGraph exporter for Blender

OpenMW OpenSceneGraph exporter for Blender, making the format viable for importing meshes into OpenMW using a libre format.

This is a fork of the Blender OpenSceneGraph Exporter updated for 2.80+ Blender versions and adjusted to support the specifics of Blender to OpenMW asset pipeline.

Installation (Blender 2.8+)

  1. Copy the osg directory to the location where Blender stores the scripts/addons folder on your system (you should see other io_scene_* folders there from other addons). Copy the entire dir and not just its contents.
  2. Go to the Blender settings and enable the "OpenMW Native" addon.

Command line usage

osgexport needs to inject the path to exporter modules into PYTHONPATH. The injection is done by reading the value of the BlenderExporter environment variable (see __init__.py).

$ BlenderExporter="/path-to-osgexport/blender-2.5/exporter" \
    blender -b "input.blend" \
    -P "${BlenderExporter}/osg/__init__.py" \
    -- --output="output.osgt" \
    [--apply-modifiers] [--enable-animation] [--json-materials] [--enable-animation] \
    [--bake-all] [--bake-quaternions]

Tests

To run tests:

mkdir tests && cd tests
cmake ../ -DBLENDER:FILEPATH="/my/path/to/blender" -DTEST=ON
make  # runs test building osgt files for models in blender-2.xx/data/
make test  # runs python test located in blender-2.xx/test/

To troubleshoot python tests: ctest --debug or ctest --output-on-failure

About

OpenMW-tailored changes to the Blender exporter for OpenSceneGraph

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 97.0%
  • CMake 2.9%
  • Shell 0.1%