Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

Python/pyglet library for importing Wavefront .obj files

Project Description
PyWavefront
===========

This python module allows you to read Wavefront 3D object files
(`something.obj` and `something.mtl`) and use them as Python objects.
Currently Pyglet is required to render and display these objects.

Currently, only a subset of [the defined
specification](https://en.wikipedia.org/wiki/Wavefront_.obj_file) has
been implemented.

Requirements
------------

* [Pyglet](http://www.pyglet.org/)

Usage
-----

### From Python

import pywavefront
meshes = pywavefront.Wavefront('something.obj')
meshes.draw()

### Example Script

There are two pyglet example scripts with included `.obj` and `.mtl` files in the `example` directory. To run them, change to the `example`
directory and run either `./pyglet_demo.py` or `.pyglet_demo2.py`.

### Generating a Wavefront file with Blender

The following presumes you are using [Blender](http://www.blender.org/) to generate your mesh:

* Using Blender, create a mesh with a UV-mapped texture. The UV-mapping is important! If it is working properly, you will see the texture applied within Blender's 3d view.
* Export the mesh from Blender using the Wavefront format, including normals.
* Reference your `*.obj` file as in the pywavefront example above.

Installation
------------

### Source distribution

Assuming you are in the top-level PyWavefront directory:

python setup.py install

### Pip

pip install PyWavefront

Tests
-----

All tests can be found in the `test` directory. To run the tests:

* Install nose: `pip install nose`
* Change to the top-level directory, e.g. `PyWavefront`, the directory that contains this `README` file.
* Run `nosetests`

Contributors
-------

* dav92lee
* Jerek Shoemaker
* Kurt Yoder
* Zohar Jackson

License
-------

PyWavefront is BSD-licensed; see file `LICENSE`.
Release History

Release History

This version
History Node

0.1.5

History Node

0.1.4

History Node

0.1.3

History Node

0.1.2

History Node

0.1.1

History Node

0.1

Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
PyWavefront-0.1.5.tar.gz (8.1 kB) Copy SHA256 Checksum SHA256 Source Apr 2, 2017

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting