Forums
You are not logged in.
#1 2012-06-01 21:29:00
Python Binding
If anybody is interested, I'm writing a Python binding around the 3Delight C API.
It's still a bit rough, but most of the functionality is working. A few functions are missing, mostly because I haven't needed them yet. I think the most important missing functions are RiProcedural, RiProcRunProgram, and RiMake*.
I've put the code up on GitHub: https://github.com/jl2/pyrib
Using the library only requires one file, ri.py, so I haven't bothered creating an installer yet. To use it, copy ri.py into the same directory as the rest of your .py files or into Python's "site" package location.
The examples directory shows a few examples of how to use it. demo.py is probably the best place to start.
I've tested primarily with Python3, but I think it's compatible with Python 2 also. The examples, at least, run under Python 2.7.
I've been using it on OSX and Linux and as long as the DELIGHT environment variable is set correctly it should work without problems.
I'd be interested to know If anybody ends up using it, if they find any bugs, or if they'd want me to implement some of the missing functions. I'll try to keep an eye out here and also on the GitHub "issues" page here: https://github.com/jl2/pyrib/issues
Offline
#2 2012-06-02 03:42:06
Re: Python Binding
Two questions:
You are aware that there are two Python bindings for 3Delight already?
Is your's going to be compatible with Pixar's Python binding?
.mm
Render faster, get to the party earlier — /*jupiter jazz*/
Offline
#3 2012-06-02 21:29:06
Re: Python Binding
I know of Terry and CGKIT. Are there others?
Terry looked old and unsupported. cgkit was a lot better, but came with a lot of stuff I didn't need and doesn't support the newer versions of Python.
I considered compatibility with Pixar's binding, but couldn't find much information about it and don't have a way to test it. Is there a good source of information about PRMan's Python binding?
Offline
#4 2012-06-04 16:10:12
Re: Python Binding
Afaik Nicholas Yue has been working on a binding that is compatible with Pixar's.
.mm
Render faster, get to the party earlier — /*jupiter jazz*/
Offline

