e4748940c0
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.
37 lines
800 B
C++
37 lines
800 B
C++
#ifndef FREESTYLE_PYTHON_CONVERT_H
|
|
#define FREESTYLE_PYTHON_CONVERT_H
|
|
|
|
#include "../geometry/Geom.h"
|
|
using namespace Geometry;
|
|
|
|
#include "Id.h"
|
|
#include "Interface0D/SVertex.h"
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
///////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
#include <Python.h>
|
|
#include "api2_2x/vector.h"
|
|
#include "api2_2x/gen_utils.h"
|
|
|
|
PyObject *PyBool_from_bool( bool b );
|
|
|
|
PyObject *Vector_from_Vec2f( Vec2f v );
|
|
PyObject *Vector_from_Vec3f( Vec3f v );
|
|
PyObject *Vector_from_Vec3r( Vec3r v );
|
|
|
|
PyObject *BPy_Id_from_Id( Id id );
|
|
PyObject *BPy_SVertex_from_SVertex( SVertex sv );
|
|
|
|
///////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
|
|
#endif /* FREESTYLE_PYTHON_CONVERT_H */
|