Quite a few modifications were made to finish the API: - Freestyle's SConscript was modified to catch all files within the intern/python directory, allowing integration of future shaders implemented in C++. - the Operators class was ported, with a special care of making its methods static (using the METH_STATIC flag in the tp_methods method definitions) - all of the type-checking functions [ BPy_[class name]_Check(obj) ] were changed to allow subclasses to be seen as that type too: instead on looking at the ob_type value, the PyObject_IsInstance function is used. - all of the iterators can now retrieve the object pointed to by the operator, using the getObject() method. A directedViewEdge pair is returned as a list of the two elements in the pair. - all of the style modules were copied to a style_modules_blender/ folder and were modified to use Freestyle as a Blender's submodule. IntegrationType and MediumType was also integrated (for example, changing MEAN to IntegrationType.MEAN). Testing now begins. If everything works correctly, I'll move on to lib3ds removal right away.
35 lines
1.0 KiB
C++
35 lines
1.0 KiB
C++
#ifndef FREESTYLE_PYTHON_UNARYFUNCTION1DUNSIGNED_H
|
|
#define FREESTYLE_PYTHON_UNARYFUNCTION1DUNSIGNED_H
|
|
|
|
#include "../BPy_UnaryFunction1D.h"
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
///////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
#include <Python.h>
|
|
|
|
extern PyTypeObject UnaryFunction1DUnsigned_Type;
|
|
|
|
#define BPy_UnaryFunction1DUnsigned_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &UnaryFunction1DUnsigned_Type) )
|
|
|
|
/*---------------------------Python BPy_UnaryFunction1DUnsigned structure definition----------*/
|
|
typedef struct {
|
|
BPy_UnaryFunction1D py_uf1D;
|
|
UnaryFunction1D<unsigned int> *uf1D_unsigned;
|
|
} BPy_UnaryFunction1DUnsigned;
|
|
|
|
/*---------------------------Python BPy_UnaryFunction1DUnsigned visible prototypes-----------*/
|
|
PyMODINIT_FUNC UnaryFunction1DUnsigned_Init( PyObject *module );
|
|
|
|
|
|
///////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif /* FREESTYLE_PYTHON_UNARYFUNCTION1DUNSIGNED_H */
|