diff options
Diffstat (limited to 'libdimension-python/dimension.pyx')
-rw-r--r-- | libdimension-python/dimension.pyx | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/libdimension-python/dimension.pyx b/libdimension-python/dimension.pyx index cc8efdb..dd91b0e 100644 --- a/libdimension-python/dimension.pyx +++ b/libdimension-python/dimension.pyx @@ -272,7 +272,7 @@ cdef class Matrix: cpdef Matrix inverse(self): """Return the inverse of a matrix.""" - return _Matrix(dmnsn_matrix_inverse(self._m)); + return _Matrix(dmnsn_matrix_inverse(self._m)) def __repr__(self): return \ @@ -1404,6 +1404,8 @@ cdef class Scene: def __get__(self): return self._scene.nthreads def __set__(self, n): + if n <= 0: + raise ValueError("%d is an invalid thread count." % n) self._scene.nthreads = n property quality: @@ -1464,6 +1466,9 @@ def _string_to_quality(str quality not None): cdef int q = DMNSN_RENDER_NONE inverse = False + if quality == "": + return q + if quality[0] == '^': inverse = True quality = quality[1:] |