soc-2008-mxcurioni: Tested SWIG-less environment more and understood why the former predicate methods were not working. As Stéphane had mentioned a few months ago, Freestyle uses SWIG directors to provide cross-language polymorphism. The API and the system I had provided did not support that feature and only implementations in C++ were supported. To correct the problem, after researching how directors are implemented in SWIG, I provided the same functionality. So far, I only provided the code for the UnaryPredicate1D class and it works. The implementation is in intern/python/Director.cpp and Operators.cpp. I will port the remaining directors tonight and continue to test it.

To prevent strokes from piling up after each render,  I clear the canvas at each render now (as it should have been all along)
This commit is contained in:
Maxime Curioni
2008-07-30 01:51:40 +00:00
parent 7d5eaa674b
commit a482f64424
11 changed files with 94 additions and 15 deletions
@@ -9,6 +9,7 @@
#include "Interface0D/CurvePoint/BPy_StrokeVertex.h"
#include "Interface0D/BPy_SVertex.h"
#include "Interface0D/BPy_ViewVertex.h"
#include "BPy_Interface1D.h"
#include "Interface1D/BPy_FEdge.h"
#include "Interface1D/BPy_ViewEdge.h"
#include "BPy_Nature.h"
@@ -79,6 +80,14 @@ PyObject * BPy_Interface0D_from_Interface0D( Interface0D& if0D ) {
return py_if0D;
}
PyObject * BPy_Interface1D_from_Interface1D( Interface1D& if1D ) {
PyObject *py_if1D = Interface1D_Type.tp_new( &Interface1D_Type, 0, 0 );
((BPy_Interface1D *) py_if1D)->if1D = &if1D;
return py_if1D;
}
PyObject * BPy_SVertex_from_SVertex( SVertex& sv ) {
PyObject *py_sv = SVertex_Type.tp_new( &SVertex_Type, 0, 0 );
((BPy_SVertex *) py_sv)->sv = new SVertex( sv );