From e4748940c0a61171d5c4e45d8d5a9637d05ac429 Mon Sep 17 00:00:00 2001 From: Maxime Curioni Date: Thu, 17 Jul 2008 06:35:30 +0000 Subject: soc-2008-mxcurioni: SWIG removal - completed SVertex and CurvePoint classes migration. Stabilized a lot of the code for C++ -> Python conversion. Added the correct rich comparison operator and tested it. Corrected 'dupplicate' typo and changde to __copy__ for Python API. From now on, when a set should be output (PySet_Type), it is given as a list (PyList_Type). The reason is that it doesn't really matter what we bring back to the Python interpreter. The set is guaranteed in memory on the C++ side. For the CurvePoint class, the userdata variable is not yet ported (and will probably available as a list or a dictionary). The CurvePoint implementation works except for the initialization from other CurvePoints: somehow, the inner variables don't seem to be correctly handled. I do not know if it is a bug in Freestyle or if the CurvePoint object's state is correct for my test case. CurvePoint needs more testing. --- .../blender/freestyle/intern/winged_edge/WEdge.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'source/blender/freestyle/intern/winged_edge/WEdge.cpp') diff --git a/source/blender/freestyle/intern/winged_edge/WEdge.cpp b/source/blender/freestyle/intern/winged_edge/WEdge.cpp index 79b3a8dae26..3f27bf6a8a0 100755 --- a/source/blender/freestyle/intern/winged_edge/WEdge.cpp +++ b/source/blender/freestyle/intern/winged_edge/WEdge.cpp @@ -70,7 +70,7 @@ WVertex::WVertex(WVertex& iBrother) ((vertexdata*)(iBrother.userdata))->_copy = this; } -WVertex* WVertex::dupplicate() +WVertex* WVertex::duplicate() { WVertex *clone = new WVertex(*this); return clone; @@ -180,7 +180,7 @@ WOEdge::WOEdge(WOEdge& iBrother) ((oedgedata*)(iBrother.userdata))->_copy = this; } -WOEdge * WOEdge::dupplicate() +WOEdge * WOEdge::duplicate() { WOEdge *clone = new WOEdge(*this); return clone; @@ -221,10 +221,10 @@ WEdge::WEdge(WEdge& iBrother) if(NULL != aoedge) //_paOEdge = new WOEdge(*aoedge); - _paOEdge = aoedge->dupplicate(); + _paOEdge = aoedge->duplicate(); if(NULL != boedge) //_pbOEdge = new WOEdge(*boedge); - _pbOEdge = boedge->dupplicate(); + _pbOEdge = boedge->duplicate(); _nOEdges = iBrother.GetNumberOfOEdges(); _Id = iBrother.GetId(); @@ -232,7 +232,7 @@ WEdge::WEdge(WEdge& iBrother) ((edgedata*)(iBrother.userdata))->_copy = this; } -WEdge * WEdge::dupplicate() +WEdge * WEdge::duplicate() { WEdge *clone = new WEdge(*this); return clone; @@ -260,7 +260,7 @@ WFace::WFace(WFace& iBrother) ((facedata*)(iBrother.userdata))->_copy = this; } -WFace * WFace::dupplicate() +WFace * WFace::duplicate() { WFace * clone = new WFace(*this); return clone; @@ -466,7 +466,7 @@ WShape * WFace::getShape() LIB_WINGED_EDGE_EXPORT unsigned WShape::_SceneCurrentId = 0; -WShape * WShape::dupplicate() +WShape * WShape::duplicate() { WShape *clone = new WShape(*this); return clone; @@ -485,7 +485,7 @@ WShape::WShape(WShape& iBrother) v++) { //WVertex *newVertex = new WVertex(*(*v)); - WVertex *newVertex = (*v)->dupplicate(); + WVertex *newVertex = (*v)->duplicate(); newVertex->SetShape(this); AddVertex(newVertex); @@ -498,7 +498,7 @@ WShape::WShape(WShape& iBrother) e++) { //WEdge *newEdge = new WEdge(*(*e)); - WEdge *newEdge = (*e)->dupplicate(); + WEdge *newEdge = (*e)->duplicate(); AddEdge(newEdge); } @@ -509,7 +509,7 @@ WShape::WShape(WShape& iBrother) f++) { //WFace *newFace = new WFace(*(*f)); - WFace *newFace = (*f)->dupplicate(); + WFace *newFace = (*f)->duplicate(); AddFace(newFace); } -- cgit v1.2.3