From 17555efed7583c12459d4f3044dfdd457489ab39 Mon Sep 17 00:00:00 2001 From: Tamito Kajiyama Date: Mon, 1 Dec 2008 11:14:33 +0000 Subject: Added changes to support Python's native iterator protocol in Stroke and StrokeVertexIterator. freestyle_init.py * Added a generic getName() method that allows subclasses to omit the method to return their class names. BPy_Convert.cpp BPy_Convert.h * Added to BPy_StrokeVertexIterator_from_StrokeVertexIterator() a second argument to specify the direction (reversed or not) of the iterator to be created. BPy_Stroke.cpp * Added support for Python's native iterator protocol. * Added code to parse the optional argument of strokeVerticesBegin(). BPy_StrokeVertexIterator.cpp BPy_StrokeVertexIterator.h * Added support for Python's native iterator protocol. Stroke.cpp * Fixed a null pointer reference. Stroke.h * Added new method Stroke::strokeVerticeAt(i) that returns the i-th StrokeVertex of the Stroke. --- source/blender/freestyle/intern/stroke/Stroke.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'source/blender/freestyle/intern/stroke/Stroke.cpp') diff --git a/source/blender/freestyle/intern/stroke/Stroke.cpp b/source/blender/freestyle/intern/stroke/Stroke.cpp index dbb49bab45d..01a71f2d4eb 100755 --- a/source/blender/freestyle/intern/stroke/Stroke.cpp +++ b/source/blender/freestyle/intern/stroke/Stroke.cpp @@ -416,7 +416,10 @@ Stroke::Stroke(const Stroke& iBrother) _mediumType = iBrother._mediumType; _textureId = iBrother._textureId; _tips = iBrother._tips; + if(iBrother._rep) _rep = new StrokeRep(*(iBrother._rep)); + else + _rep = 0; } -- cgit v1.2.3