diff --git a/SConstruct b/SConstruct index 45e48478..8d3ee649 100644 --- a/SConstruct +++ b/SConstruct @@ -34,6 +34,8 @@ build('src/librender/SConscript') build('src/libhw/SConscript') # Bidirectional support library build('src/libbidir/SConscript') +# Python binding library +build('src/libpython/SConscript') # ===== Build the applications ===== env = env.Clone() @@ -49,9 +51,6 @@ build('src/mtsgui/SConscript', ['mainEnv', 'converter_objects'], duplicate=True) env['SHLIBPREFIX']='' -# Python binding library -build('src/mtspy/SConscript') - # ===== Build the plugins ===== Export('env') diff --git a/build/SConscript.install b/build/SConscript.install index fe074257..7fe30d39 100644 --- a/build/SConscript.install +++ b/build/SConscript.install @@ -43,7 +43,7 @@ if sys.platform == 'linux2': install(distDir, ['libcore/libmitsuba-core.so', 'libhw/libmitsuba-hw.so', 'librender/libmitsuba-render.so', 'libbidir/libmitsuba-bidir.so']) if hasPython: - install(distDir, ['mtspy/mtspy.so']) + install(os.path.join(distDir, 'mitsuba.so'), ['libpython/mitsuba.so']) install(distDir, ['mitsuba/mitsuba', 'mitsuba/mtssrv', 'mitsuba/mtsutil', 'mtsgui/mtsgui']) if hasCollada: install(distDir, ['converter/mtsimport']) @@ -70,7 +70,7 @@ if sys.platform == 'win32': install(distDir, ['libcore/libmitsuba-core.dll', 'libhw/libmitsuba-hw.dll', 'librender/libmitsuba-render.dll', 'libbidir/libmitsuba-bidir.dll']) if hasPython: - installAs(os.path.join(distDir, 'mtspy.pyd'), 'mtspy/mtspy.dylib') + installAs(os.path.join(distDir, 'python/mitsuba.pyd'), 'libpython/mitsuba.dll') install(distDir, ['Iex.dll', 'Half.dll','IlmThread.dll', 'Imath.dll','IlmImf.dll','zlib1.dll', 'libpng13.dll', 'jpeg62.dll', 'pthreadVCE2.dll', 'xerces-c_3_0.dll', 'glew32mx.dll'], prefix=dllprefix) @@ -115,7 +115,7 @@ elif sys.platform == 'darwin': install(frameworkDir, ['libcore/libmitsuba-core.dylib', 'libhw/libmitsuba-hw.dylib', 'librender/libmitsuba-render.dylib', 'libbidir/libmitsuba-bidir.dylib']) if hasPython: - installAs(os.path.join(frameworkDir, 'mtspy.so'), 'mtspy/mtspy.dylib') + installAs(os.path.join(distDir, 'python/mitsuba.so'), 'libpython/mitsuba.dylib') install(frameworkDir, [ 'GLEW.framework/Resources/libs/libGLEW.dylib', 'OpenEXR.framework/Resources/lib/libHalf.6.dylib', 'OpenEXR.framework/Resources/lib/libIex.6.dylib', 'OpenEXR.framework/Resources/lib/libImath.6.dylib', diff --git a/include/mitsuba/core/matrix.h b/include/mitsuba/core/matrix.h index 0b4cef50..7601b3e9 100644 --- a/include/mitsuba/core/matrix.h +++ b/include/mitsuba/core/matrix.h @@ -187,6 +187,14 @@ public: return *this; } + /// Matrix-scalar addition + inline const Matrix &operator-=(T value) { + for (int i=0; i, bp::bases, boost::noncopyable>("Stream", bp::no_init) - .def("getRefCount", &Object::getRefCount) - .def("__str__", &Object::toString); + bp::class_, bp::bases, boost::noncopyable>("Stream", bp::no_init); bp::enum_("EByteOrder") .value("EBigEndian", Stream::EBigEndian) @@ -341,7 +339,6 @@ void export_core() { .def("__setitem__", &Matrix4x4_setItem) .def("__getitem__", &Matrix4x4_getItem) .def("setIdentity", &Matrix4x4::setIdentity) - .def("setZero", &Matrix4x4::setZero) .def("isZero", &Matrix4x4::isZero) .def("trace", &Matrix4x4::trace) .def("det", &Matrix4x4::det) diff --git a/src/mtspy/mtspy.h b/src/libpython/mtspy.h similarity index 100% rename from src/mtspy/mtspy.h rename to src/libpython/mtspy.h