From b75feadba2021699e09cb611ed00e2f0ff7de3b3 Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Thu, 29 Sep 2011 12:43:27 -0400 Subject: Make the default background for a scene Black. Fixes segfault on Scene(...).raytrace(). --- libdimension-python/dimension.pyx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/libdimension-python/dimension.pyx b/libdimension-python/dimension.pyx index c90bf9e..3fff622 100644 --- a/libdimension-python/dimension.pyx +++ b/libdimension-python/dimension.pyx @@ -1390,6 +1390,7 @@ cdef class Scene: DMNSN_INCREF(self._scene.canvas) self.outer_width = self._scene.canvas.width self.outer_height = self._scene.canvas.height + self.background = Black cdef dmnsn_object *o for obj in objects: @@ -1452,10 +1453,7 @@ cdef class Scene: property background: """The background pigment of the scene (default: Black).""" def __get__(self): - if self._scene.background == NULL: - return None - else: - return _Pigment(self._scene.background) + return _Pigment(self._scene.background) def __set__(self, pigment): dmnsn_delete_pigment(self._scene.background) cdef Pigment real_pigment = Pigment(pigment) -- cgit v1.2.3