diff options
author | Maxime Curioni <maxime.curioni@gmail.com> | 2008-08-02 11:39:49 +0400 |
---|---|---|
committer | Maxime Curioni <maxime.curioni@gmail.com> | 2008-08-02 11:39:49 +0400 |
commit | e385d69580de32df6dcfd009853ddd4eb8a3191e (patch) | |
tree | ef141019b1e00f03da689be0cea0b1a1bf6eb457 /source/blender/freestyle/intern/python/BPy_StrokeAttribute.cpp | |
parent | 7565990db264dbb7771744cea0a1c87b3e11fc3f (diff) |
soc-2008-mxcurioni: Made crucial corrections to stabilize the system. Most of the original styles are supported: stroke attributes are correctly taken into account, Python shaders are supported. Added SamplingShader.
Diffstat (limited to 'source/blender/freestyle/intern/python/BPy_StrokeAttribute.cpp')
-rw-r--r-- | source/blender/freestyle/intern/python/BPy_StrokeAttribute.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/freestyle/intern/python/BPy_StrokeAttribute.cpp b/source/blender/freestyle/intern/python/BPy_StrokeAttribute.cpp index 541ef4f4516..cc4c8288233 100644 --- a/source/blender/freestyle/intern/python/BPy_StrokeAttribute.cpp +++ b/source/blender/freestyle/intern/python/BPy_StrokeAttribute.cpp @@ -199,6 +199,7 @@ int StrokeAttribute___init__(BPy_StrokeAttribute *self, PyObject *args, PyObject return -1; } + self->sa->py_sa = (PyObject *) self; return 0; @@ -206,7 +207,8 @@ int StrokeAttribute___init__(BPy_StrokeAttribute *self, PyObject *args, PyObject void StrokeAttribute___dealloc__(BPy_StrokeAttribute* self) { - delete self->sa; + if( self->sa->py_sa ) + delete self->sa; self->ob_type->tp_free((PyObject*)self); } @@ -384,7 +386,7 @@ PyObject * StrokeAttribute_setThickness( BPy_StrokeAttribute *self, PyObject *ar PyFloat_AsDouble( PyList_GetItem(obj1, 1) ) ); self->sa->setThickness( v ); - + } else if( obj1 && obj2 ){ self->sa->setThickness( PyFloat_AsDouble(obj1), |