Skip to content
Snippets Groups Projects
Commit d124d3c5 authored by Maxime Curioni's avatar Maxime Curioni
Browse files

soc-2008-mxcurioni: first part of the Freestyle Python implementation. A new...

soc-2008-mxcurioni: first part of the Freestyle Python implementation. A new Freestyle module is added. The following modules are implemented: BinaryPredicate0D, BinaryPredicate1D, Id, Interface0D, Interface1D. I added a Convert module to help in the creation of Python objects for Freestyle's data structures. I also added a missing file for guarded_alloc needed for compilation on Windows.
parent d760119f
No related branches found
No related tags found
No related merge requests found
Showing
with 1276 additions and 173 deletions
/**
* $Id: $
*
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
* The Original Code is Copyright (C) 2008 Blender Foundation.
* All rights reserved.
*
* The Original Code is: all of this file.
*
* Contributor(s): Andrea Weikert.
*
* ***** END GPL LICENSE BLOCK *****
*/
#if defined(WIN32)
#include <windows.h>
#include <errno.h>
#include <io.h>
#include <sys/types.h>
#include <stdio.h>
#include "mmap_win.h"
#ifndef FILE_MAP_EXECUTE
//not defined in earlier versions of the Platform SDK (before February 2003)
#define FILE_MAP_EXECUTE 0x0020
#endif
/* --------------------------------------------------------------------- */
/* local storage definitions */
/* --------------------------------------------------------------------- */
/* all memory mapped chunks are put in linked lists */
typedef struct mmapLink
{
struct mmapLink *next,*prev;
} mmapLink;
typedef struct mmapListBase
{
void *first, *last;
} mmapListBase;
typedef struct MemMap {
struct MemMap *next,*prev;
void *mmap;
HANDLE fhandle;
HANDLE maphandle;
} MemMap;
/* --------------------------------------------------------------------- */
/* local functions */
/* --------------------------------------------------------------------- */
static void mmap_addtail(volatile mmapListBase *listbase, void *vlink);
static void mmap_remlink(volatile mmapListBase *listbase, void *vlink);
static void *mmap_findlink(volatile mmapListBase *listbase, void *ptr);
static int mmap_get_prot_flags (int flags);
static int mmap_get_access_flags (int flags);
/* --------------------------------------------------------------------- */
/* vars */
/* --------------------------------------------------------------------- */
volatile static struct mmapListBase _mmapbase;
volatile static struct mmapListBase *mmapbase = &_mmapbase;
/* --------------------------------------------------------------------- */
/* implementation */
/* --------------------------------------------------------------------- */
/* mmap for windows */
void *mmap(void *start, size_t len, int prot, int flags, int fd, off_t offset)
{
HANDLE fhandle = INVALID_HANDLE_VALUE;
HANDLE maphandle;
int prot_flags = mmap_get_prot_flags(prot);
int access_flags = mmap_get_access_flags(prot);
MemMap *mm = NULL;
void *ptr = NULL;
if ( flags & MAP_FIXED ) {
return MAP_FAILED;
}
/*
if ( fd == -1 ) {
_set_errno( EBADF );
return MAP_FAILED;
}
*/
if ( fd != -1 ) {
fhandle = (HANDLE) _get_osfhandle (fd);
}
if ( fhandle == INVALID_HANDLE_VALUE ) {
if (!(flags & MAP_ANONYMOUS)) {
errno = EBADF;
return MAP_FAILED;
}
} else {
if ( !DuplicateHandle( GetCurrentProcess(), fhandle, GetCurrentProcess(),
&fhandle, 0, FALSE, DUPLICATE_SAME_ACCESS ) ) {
return MAP_FAILED;
}
}
maphandle = CreateFileMapping(fhandle, NULL, prot_flags, 0, len, NULL);
if ( maphandle == 0 ) {
errno = EBADF;
return MAP_FAILED;
}
ptr = MapViewOfFile(maphandle, access_flags, 0, offset, 0);
if ( ptr == NULL ) {
DWORD dwLastErr = GetLastError();
if ( dwLastErr == ERROR_MAPPED_ALIGNMENT )
errno=EINVAL;
else
errno=EACCES;
CloseHandle(maphandle);
return MAP_FAILED;
}
mm= (MemMap *)malloc(sizeof(MemMap));
if (!mm) {
errno=ENOMEM;
}
mm->fhandle = fhandle;
mm->maphandle = maphandle;
mm->mmap = ptr;
mmap_addtail(mmapbase, mm);
return ptr;
}
/* munmap for windows */
long munmap(void *ptr, long size)
{
MemMap *mm = mmap_findlink(mmapbase, ptr);
if (!mm) {
errno=EINVAL;
return -1;
}
UnmapViewOfFile( mm->mmap );
CloseHandle( mm->maphandle );
CloseHandle( mm->fhandle);
mmap_remlink(mmapbase, mm);
return 0;
}
/* --------------------------------------------------------------------- */
/* local functions */
/* --------------------------------------------------------------------- */
static void mmap_addtail(volatile mmapListBase *listbase, void *vlink)
{
struct mmapLink *link= vlink;
if (link == 0) return;
if (listbase == 0) return;
link->next = 0;
link->prev = listbase->last;
if (listbase->last) ((struct mmapLink *)listbase->last)->next = link;
if (listbase->first == 0) listbase->first = link;
listbase->last = link;
}
static void mmap_remlink(volatile mmapListBase *listbase, void *vlink)
{
struct mmapLink *link= vlink;
if (link == 0) return;
if (listbase == 0) return;
if (link->next) link->next->prev = link->prev;
if (link->prev) link->prev->next = link->next;
if (listbase->last == link) listbase->last = link->prev;
if (listbase->first == link) listbase->first = link->next;
}
static void *mmap_findlink(volatile mmapListBase *listbase, void *ptr)
{
MemMap *mm;
if (ptr == 0) return NULL;
if (listbase == 0) return NULL;
mm = (MemMap *)listbase->first;
while (mm) {
if (mm->mmap == ptr) {
return mm;
}
mm = mm->next;
}
return NULL;
}
static int mmap_get_prot_flags (int flags)
{
int prot = PAGE_NOACCESS;
if ( ( flags & PROT_READ ) == PROT_READ ) {
if ( ( flags & PROT_WRITE ) == PROT_WRITE ) {
prot = (flags & PROT_EXEC) ? PAGE_EXECUTE_READWRITE : PAGE_READWRITE;
} else {
prot = (flags & PROT_EXEC) ? PAGE_EXECUTE_READ : PAGE_READONLY;
}
} else if ( ( flags & PROT_WRITE ) == PROT_WRITE ) {
prot = (flags & PROT_EXEC) ? PAGE_EXECUTE_READ : PAGE_WRITECOPY;
} else if ( ( flags & PROT_EXEC ) == PROT_EXEC ) {
prot = PAGE_EXECUTE_READ;
}
return prot;
}
static int mmap_get_access_flags (int flags)
{
int access = 0;
if ( ( flags & PROT_READ ) == PROT_READ ) {
if ( ( flags & PROT_WRITE ) == PROT_WRITE ) {
access = FILE_MAP_WRITE;
} else {
access = (flags & PROT_EXEC) ? FILE_MAP_EXECUTE : FILE_MAP_READ;
}
} else if ( ( flags & PROT_WRITE ) == PROT_WRITE ) {
access = FILE_MAP_COPY;
} else if ( ( flags & PROT_EXEC ) == PROT_EXEC ) {
access = FILE_MAP_EXECUTE;
}
return access;
}
#endif // WIN32
/**
* $Id: $
*
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
* The Original Code is Copyright (C) 2008 Blender Foundation.
* All rights reserved.
*
* The Original Code is: all of this file.
*
* Contributor(s): Andrea Weikert.
*
* ***** END GPL LICENSE BLOCK *****
*/
#ifndef MMAP_WIN_H
#define MMAP_WIN_H
#define PROT_NONE 0
#define PROT_READ 1
#define PROT_WRITE 2
#define PROT_EXEC 4
#define MAP_FILE 0
#define MAP_SHARED 1
#define MAP_PRIVATE 2
#define MAP_TYPE 0xF
#define MAP_FIXED 0x10
#define MAP_ANONYMOUS 0x20
#define MAP_ANON MAP_ANONYMOUS
#define MAP_FAILED ((void *)-1)
void *mmap(void *start, size_t len, int prot, int flags, int fd, off_t offset);
long munmap(void *ptr, long size);
#endif
\ No newline at end of file
......@@ -56,10 +56,22 @@ if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw'):
prefix = 'intern/app_blender'
app_sources = env.Glob(prefix + '/*.cpp')
# Python
prefix = 'intern/python'
# python_sources = env.Glob(prefix + '/*.cpp')
python_sources = [
prefix + '/Freestyle.cpp',
prefix + '/Convert.cpp',
prefix + '/BinaryPredicate0D.cpp',
prefix + '/BinaryPredicate1D.cpp',
prefix + '/Id.cpp',
prefix + '/Interface0D.cpp',
prefix + '/Interface1D.cpp'
]
sources = system_sources + image_sources + geometry_sources + scene_graph_sources \
+ winged_edge_sources + view_map_sources + stroke_sources + rendering_sources \
+ app_sources
+ app_sources + python_sources
env.BlenderLib (libname="bf_freestyle",
sources=sources,
......
......@@ -106,12 +106,11 @@ extern "C" {
void FRS_render(Render* re, int render_in_layer) {
// if(render_in_layer) {
// view->workingBuffer = GL_COLOR_ATTACHMENT0_EXT;
// } else {
// view->workingBuffer = GL_BACK;
// }
if(render_in_layer) {
view->workingBuffer = GL_COLOR_ATTACHMENT1_EXT;
} else {
view->workingBuffer = GL_BACK;
}
// add style module
string style_module = pathconfig->getProjectDir() +
......@@ -132,77 +131,53 @@ extern "C" {
void FRS_execute(Render* re, int render_in_layer) {
GLuint framebuffer, renderbuffers[2];
GLenum status;
RenderLayer *rl;
GLubyte *pixc;
if(render_in_layer) {
pixc = (GLubyte *) malloc( 4 * re->winx * re->winy * sizeof(GLubyte) );
cout << "Freestyle as a render layer - SETUP" << endl;
// set up frame buffer
glGenFramebuffersEXT(1, &framebuffer);
glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, framebuffer);
// set up render buffer: one color buffer, one depth buffer
glGenRenderbuffersEXT(2, renderbuffers);
glBindRenderbufferEXT(GL_RENDERBUFFER_EXT, renderbuffers[0]);
glRenderbufferStorageEXT(GL_RENDERBUFFER_EXT, GL_RGBA, re->winx, re->winy);
glFramebufferRenderbufferEXT(GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT, GL_RENDERBUFFER_EXT, renderbuffers[0]);
glBindRenderbufferEXT(GL_RENDERBUFFER_EXT, renderbuffers[1]);
glRenderbufferStorageEXT(GL_RENDERBUFFER_EXT, GL_DEPTH_COMPONENT, re->winx, re->winy);
glFramebufferRenderbufferEXT(GL_FRAMEBUFFER_EXT, GL_DEPTH_ATTACHMENT_EXT, GL_RENDERBUFFER_EXT, renderbuffers[1]);
// status verification
status = glCheckFramebufferStatusEXT(GL_FRAMEBUFFER_EXT);
if (status != GL_FRAMEBUFFER_COMPLETE_EXT){
cout << "Framebuffer setup error" << endl;
glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);
glDeleteRenderbuffersEXT(2, renderbuffers);
glDeleteFramebuffersEXT(1, &framebuffer);
return;
}
glPushAttrib(GL_VIEWPORT_BIT);
glDrawBuffer(GL_COLOR_ATTACHMENT0_EXT); // should not be needed
glViewport(0, 0, re->winx, re->winy);
// GLenum status = glCheckFramebufferStatusEXT(GL_FRAMEBUFFER_EXT);
// switch(status){
// case GL_FRAMEBUFFER_COMPLETE_EXT:
// cout << "CORRECT: GL_FRAMEBUFFER_COMPLETE" << endl;
// break;
// case GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT:
// cout << "ERROR: GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT" << endl;
// break;
// case GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT:
// cout << "ERROR: GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT" << endl;
// break;
// case GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT:
// cout << "ERROR: GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT" << endl;
// break;
// case GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT:
// cout << "ERROR: GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT" << endl;
// break;
// case GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT:
// cout << "ERROR: GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT" << endl;
// break;
// case GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT:
// cout << "ERROR: GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT" << endl;
// break;
// case GL_FRAMEBUFFER_UNSUPPORTED_EXT:
// cout << "ERROR: GL_FRAMEBUFFER_UNSUPPORTED" << endl;
// break;
// }
FRS_render(re, render_in_layer);
RenderLayer *rl;
// keep first Freestyle layer
for(rl = (RenderLayer *)re->result->layers.first; rl; rl= rl->next)
if(rl->layflag & SCE_LAY_FRS)
break;
cout << "Freestyle as a render layer - RESULT" << endl;
// transfer render to layer
glReadBuffer(GL_COLOR_ATTACHMENT0_EXT);
glReadPixels(0, 0, re->winx, re->winy, GL_RGBA, GL_UNSIGNED_BYTE, pixc );
int p;
for(int i = 0; i < re->winx; i++) {
for(int j = 0; j < re->winy; j++) {
p = 4*(i*re->winy + j);
*(rl->rectf + p ) = 1.0*pixc[ p ]/255.0;
*(rl->rectf + p + 1) = 1.0*pixc[ p+1 ]/255.0;
*(rl->rectf + p + 2) = 1.0*pixc[ p+2 ]/255.0;
*(rl->rectf + p + 3) = 1.0*pixc[ p+3 ]/255.0;
for(int i = 0; i < re->winx; i++){
p = 4*(j*re->winx + i);
rl->rectf[p] *= 0.6;
rl->rectf[p + 1] = 0.6 * rl->rectf[p + 1];
rl->rectf[p + 2] *= 0.6;
rl->rectf[p + 3] = 1.0;
}
}
// bind window
glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);
glDrawBuffer(GL_BACK);
glPopAttrib();
glDeleteRenderbuffersEXT(2, renderbuffers);
glDeleteFramebuffersEXT(1, &framebuffer);
} else {
FRS_render(re, render_in_layer);
......
SWIGINTERN PyObject *_wrap_BinaryPredicate0D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
#include "BinaryPredicate0D.h"
#include "Convert.h"
#include "Interface0D.h"
#ifdef __cplusplus
extern "C" {
#endif
///////////////////////////////////////////////////////////////////////////////////////////
/*-----------------------Python API function prototypes for the BinaryPredicate0D module--*/
//static PyObject *Freestyle_testOutput( BPy_Freestyle * self );
/*-----------------------BinaryPredicate0D module doc strings-----------------------------*/
static char M_BinaryPredicate0D_doc[] = "The Blender.Freestyle.BinaryPredicate0D submodule";
/*----------------------BinaryPredicate0D module method def----------------------------*/
struct PyMethodDef M_BinaryPredicate0D_methods[] = {
// {"testOutput", ( PyCFunction ) Freestyle_testOutput, METH_NOARGS, "() - Return Curve Data name"},
{NULL, NULL, 0, NULL}
};
/*-----------------------BPy_Freestyle method def------------------------------*/
PyTypeObject BinaryPredicate0D_Type = {
PyObject_HEAD_INIT( NULL )
0, /* ob_size */
"BinaryPredicate0D", /* tp_name */
sizeof( BPy_BinaryPredicate0D ), /* tp_basicsize */
0, /* tp_itemsize */
/* methods */
NULL, /* tp_dealloc */
NULL, /* printfunc tp_print; */
NULL, /* getattrfunc tp_getattr; */
NULL, /* setattrfunc tp_setattr; */
NULL, /* tp_compare */
NULL, /* tp_repr */
/* Method suites for standard classes */
NULL, /* PyNumberMethods *tp_as_number; */
NULL, /* PySequenceMethods *tp_as_sequence; */
NULL, /* PyMappingMethods *tp_as_mapping; */
/* More standard operations (here for binary compatibility) */
NULL, /* hashfunc tp_hash; */
NULL, /* ternaryfunc tp_call; */
NULL, /* reprfunc tp_str; */
NULL, /* getattrofunc tp_getattro; */
NULL, /* setattrofunc tp_setattro; */
/* Functions to access object as input/output buffer */
NULL, /* PyBufferProcs *tp_as_buffer; */
/*** Flags to define presence of optional/expanded features ***/
Py_TPFLAGS_DEFAULT, /* long tp_flags; */
NULL, /* char *tp_doc; Documentation string */
/*** Assigned meaning in release 2.0 ***/
/* call function for all accessible objects */
NULL, /* traverseproc tp_traverse; */
/* delete references to contained objects */
NULL, /* inquiry tp_clear; */
/*** Assigned meaning in release 2.1 ***/
/*** rich comparisons ***/
NULL, /* richcmpfunc tp_richcompare; */
/*** weak reference enabler ***/
0, /* long tp_weaklistoffset; */
/*** Added in release 2.2 ***/
/* Iterators */
NULL, /* getiterfunc tp_iter; */
NULL, /* iternextfunc tp_iternext; */
/*** Attribute descriptor and subclassing stuff ***/
NULL, /* struct PyMethodDef *tp_methods; */
NULL, /* struct PyMemberDef *tp_members; */
NULL, /* struct PyGetSetDef *tp_getset; */
NULL, /* struct _typeobject *tp_base; */
NULL, /* PyObject *tp_dict; */
NULL, /* descrgetfunc tp_descr_get; */
NULL, /* descrsetfunc tp_descr_set; */
0, /* long tp_dictoffset; */
NULL, /* initproc tp_init; */
NULL, /* allocfunc tp_alloc; */
NULL, /* newfunc tp_new; */
/* Low-level free-memory routine */
NULL, /* freefunc tp_free; */
/* For PyObject_IS_GC */
NULL, /* inquiry tp_is_gc; */
NULL, /* PyObject *tp_bases; */
/* method resolution order */
NULL, /* PyObject *tp_mro; */
NULL, /* PyObject *tp_cache; */
NULL, /* PyObject *tp_subclasses; */
NULL, /* PyObject *tp_weaklist; */
NULL
};
//-------------------MODULE INITIALIZATION--------------------------------
PyObject *BinaryPredicate0D_Init( void )
{
PyObject *submodule;
if( PyType_Ready( &BinaryPredicate0D_Type ) < 0 )
return NULL;
submodule = Py_InitModule3( "Blender.Freestyle.BinaryPredicate0D", M_BinaryPredicate0D_methods, M_BinaryPredicate0D_doc );
return submodule;
}
//------------------------INSTANCE METHODS ----------------------------------
PyObject *BinaryPredicate0D_getName( BPy_BinaryPredicate0D *self, PyObject *args)
{
return PyString_FromString( self->bp0D->getName().c_str() );
}
PyObject *BinaryPredicate0D___call__( BPy_BinaryPredicate0D *self, PyObject *args)
{
BPy_BinaryPredicate0D *obj1;
BPy_Interface0D *obj2, *obj3;
bool b;
if (!PyArg_ParseTuple(args,(char *)"OOO:BinaryPredicate0D___call__", &obj1, obj2, &obj3))
cout << "ERROR: BinaryPredicate0D___call__ " << endl;
b = self->bp0D->operator()( *(obj2->if0D) , *(obj3->if0D) );
return PyBool_from_bool( b );
SWIGINTERN PyObject *_wrap_BinaryPredicate0D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
}
///////////////////////////////////////////////////////////////////////////////////////////
#ifdef __cplusplus
}
#endif
#ifndef FREESTYLE_PYTHON_BINARYPREDICATE0D_H
#define FREESTYLE_PYTHON_BINARYPREDICATE0D_H
#include "../stroke/Predicates0D.h"
#ifdef __cplusplus
extern "C" {
#endif
///////////////////////////////////////////////////////////////////////////////////////////
#include <Python.h>
extern PyTypeObject BinaryPredicate0D_Type;
#define BPy_BinaryPredicate0D_Check(v) \
((v)->ob_type == &BinaryPredicate0D_Type)
/*---------------------------Python BPy_BinaryPredicate0D structure definition----------*/
typedef struct {
PyObject_HEAD
BinaryPredicate0D *bp0D;
} BPy_BinaryPredicate0D;
/*---------------------------Python BPy_BinaryPredicate0D visible prototypes-----------*/
PyObject *BinaryPredicate0D_Init( void );
///////////////////////////////////////////////////////////////////////////////////////////
#ifdef __cplusplus
}
#endif
#endif /* FREESTYLE_PYTHON_BINARYPREDICATE0D_H */
SWIGINTERN PyObject *_wrap_BinaryPredicate1D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
#include "BinaryPredicate1D.h"
#include "Convert.h"
#include "Interface1D.h"
#ifdef __cplusplus
extern "C" {
#endif
///////////////////////////////////////////////////////////////////////////////////////////
/*-----------------------Python API function prototypes for the BinaryPredicate1D module--*/
//static PyObject *Freestyle_testOutput( BPy_Freestyle * self );
/*-----------------------BinaryPredicate1D module doc strings-----------------------------*/
static char M_BinaryPredicate1D_doc[] = "The Blender.Freestyle.BinaryPredicate1D submodule";
/*----------------------BinaryPredicate1D module method def----------------------------*/
struct PyMethodDef M_BinaryPredicate1D_methods[] = {
// {"testOutput", ( PyCFunction ) Freestyle_testOutput, METH_NOARGS, "() - Return Curve Data name"},
{NULL, NULL, 0, NULL}
};
/*-----------------------BPy_Freestyle method def------------------------------*/
PyTypeObject BinaryPredicate1D_Type = {
PyObject_HEAD_INIT( NULL )
0, /* ob_size */
"BinaryPredicate1D", /* tp_name */
sizeof( BPy_BinaryPredicate1D ), /* tp_basicsize */
0, /* tp_itemsize */
/* methods */
NULL, /* tp_dealloc */
NULL, /* printfunc tp_print; */
NULL, /* getattrfunc tp_getattr; */
NULL, /* setattrfunc tp_setattr; */
NULL, /* tp_compare */
NULL, /* tp_repr */
/* Method suites for standard classes */
NULL, /* PyNumberMethods *tp_as_number; */
NULL, /* PySequenceMethods *tp_as_sequence; */
NULL, /* PyMappingMethods *tp_as_mapping; */
/* More standard operations (here for binary compatibility) */
NULL, /* hashfunc tp_hash; */
NULL, /* ternaryfunc tp_call; */
NULL, /* reprfunc tp_str; */
NULL, /* getattrofunc tp_getattro; */
NULL, /* setattrofunc tp_setattro; */
/* Functions to access object as input/output buffer */
NULL, /* PyBufferProcs *tp_as_buffer; */
/*** Flags to define presence of optional/expanded features ***/
Py_TPFLAGS_DEFAULT, /* long tp_flags; */
NULL, /* char *tp_doc; Documentation string */
/*** Assigned meaning in release 2.0 ***/
/* call function for all accessible objects */
NULL, /* traverseproc tp_traverse; */
/* delete references to contained objects */
NULL, /* inquiry tp_clear; */
/*** Assigned meaning in release 2.1 ***/
/*** rich comparisons ***/
NULL, /* richcmpfunc tp_richcompare; */
/*** weak reference enabler ***/
0, /* long tp_weaklistoffset; */
/*** Added in release 2.2 ***/
/* Iterators */
NULL, /* getiterfunc tp_iter; */
NULL, /* iternextfunc tp_iternext; */
/*** Attribute descriptor and subclassing stuff ***/
NULL, /* struct PyMethodDef *tp_methods; */
NULL, /* struct PyMemberDef *tp_members; */
NULL, /* struct PyGetSetDef *tp_getset; */
NULL, /* struct _typeobject *tp_base; */
NULL, /* PyObject *tp_dict; */
NULL, /* descrgetfunc tp_descr_get; */
NULL, /* descrsetfunc tp_descr_set; */
0, /* long tp_dictoffset; */
NULL, /* initproc tp_init; */
NULL, /* allocfunc tp_alloc; */
NULL, /* newfunc tp_new; */
/* Low-level free-memory routine */
NULL, /* freefunc tp_free; */
/* For PyObject_IS_GC */
NULL, /* inquiry tp_is_gc; */
NULL, /* PyObject *tp_bases; */
/* method resolution order */
NULL, /* PyObject *tp_mro; */
NULL, /* PyObject *tp_cache; */
NULL, /* PyObject *tp_subclasses; */
NULL, /* PyObject *tp_weaklist; */
NULL
};
//-------------------MODULE INITIALIZATION--------------------------------
PyObject *BinaryPredicate1D_Init( void )
{
PyObject *submodule;
if( PyType_Ready( &BinaryPredicate1D_Type ) < 0 )
return NULL;
submodule = Py_InitModule3( "Blender.Freestyle.BinaryPredicate1D", M_BinaryPredicate1D_methods, M_BinaryPredicate1D_doc );
return submodule;
}
//------------------------INSTANCE METHODS ----------------------------------
SWIGINTERN PyObject *_wrap_BinaryPredicate1D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *BinaryPredicate1D_getName( BPy_BinaryPredicate1D *self, PyObject *args)
{
return PyString_FromString( self->bp1D->getName().c_str() );
}
PyObject *BinaryPredicate1D___call__( BPy_BinaryPredicate1D *self, PyObject *args)
{
BPy_BinaryPredicate1D *obj1;
BPy_Interface1D *obj2, *obj3;
bool b;
SWIGINTERN PyObject *_wrap_disown_BinaryPredicate1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
if (!PyArg_ParseTuple(args,(char *)"OOO:BinaryPredicate1D___call__", &obj1, &obj2, &obj3))
cout << "ERROR: BinaryPredicate1D___call__ " << endl;
b = self->bp1D->operator()( *(obj2->if1D) , *(obj3->if1D) );
return PyBool_from_bool( b );
}
///////////////////////////////////////////////////////////////////////////////////////////
#ifdef __cplusplus
}
#endif
#ifndef FREESTYLE_PYTHON_BINARYPREDICATE1D_H
#define FREESTYLE_PYTHON_BINARYPREDICATE1D_H
#include "../stroke/Predicates1D.h"
#ifdef __cplusplus
extern "C" {
#endif
///////////////////////////////////////////////////////////////////////////////////////////
#include <Python.h>
extern PyTypeObject BinaryPredicate1D_Type;
#define BPy_BinaryPredicate1D_Check(v) \
((v)->ob_type == &BinaryPredicate1D_Type)
/*---------------------------Python BPy_BinaryPredicate1D structure definition----------*/
typedef struct {
PyObject_HEAD
BinaryPredicate1D *bp1D;
} BPy_BinaryPredicate1D;
/*---------------------------Python BPy_BinaryPredicate1D visible prototypes-----------*/
PyObject *BinaryPredicate1D_Init( void );
///////////////////////////////////////////////////////////////////////////////////////////
#ifdef __cplusplus
}
#endif
#endif /* FREESTYLE_PYTHON_BINARYPREDICATE1D_H */
SWIGINTERN PyObject *_wrap_FalseBP1D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *_wrap_FalseBP1D_getName(PyObject *self , PyObject *args) {
}
SWIGINTERN PyObject *_wrap_FalseBP1D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *_wrap_FalseBP1D___call__(PyObject *self , PyObject *args) {
}
SWIGINTERN PyObject *_wrap_new_FalseBP1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *_wrap_new_FalseBP1D(PyObject *self , PyObject *args) {
}
SWIGINTERN PyObject *_wrap_delete_FalseBP1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *_wrap_delete_FalseBP1D(PyObject *self , PyObject *args) {
}
SWIGINTERN PyObject *_wrap_Length2DBP1D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *_wrap_Length2DBP1D_getName(PyObject *self , PyObject *args) {
}
SWIGINTERN PyObject *_wrap_Length2DBP1D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *_wrap_Length2DBP1D___call__(PyObject *self , PyObject *args) {
}
SWIGINTERN PyObject *_wrap_new_Length2DBP1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *_wrap_new_Length2DBP1D(PyObject *self , PyObject *args) {
}
SWIGINTERN PyObject *_wrap_delete_Length2DBP1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *_wrap_delete_Length2DBP1D(PyObject *self , PyObject *args) {
}
SWIGINTERN PyObject *_wrap_SameShapeIdBP1D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *_wrap_SameShapeIdBP1D_getName(PyObject *self , PyObject *args) {
}
SWIGINTERN PyObject *_wrap_SameShapeIdBP1D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *_wrap_SameShapeIdBP1D___call__(PyObject *self , PyObject *args) {
}
SWIGINTERN PyObject *_wrap_new_SameShapeIdBP1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *_wrap_new_SameShapeIdBP1D(PyObject *self , PyObject *args) {
}
SWIGINTERN PyObject *_wrap_delete_SameShapeIdBP1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *_wrap_delete_SameShapeIdBP1D(PyObject *self , PyObject *args) {
}
SWIGINTERN PyObject *_wrap_TrueBP1D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *_wrap_TrueBP1D_getName(PyObject *self , PyObject *args) {
}
SWIGINTERN PyObject *_wrap_TrueBP1D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *_wrap_TrueBP1D___call__(PyObject *self , PyObject *args) {
}
SWIGINTERN PyObject *_wrap_new_TrueBP1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *_wrap_new_TrueBP1D(PyObject *self , PyObject *args) {
}
SWIGINTERN PyObject *_wrap_delete_TrueBP1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *_wrap_delete_TrueBP1D(PyObject *self , PyObject *args) {
}
SWIGINTERN PyObject *_wrap_ViewMapGradientNormBP1D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *_wrap_ViewMapGradientNormBP1D_getName(PyObject *self , PyObject *args) {
}
SWIGINTERN PyObject *_wrap_ViewMapGradientNormBP1D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *_wrap_ViewMapGradientNormBP1D___call__(PyObject *self , PyObject *args) {
}
SWIGINTERN PyObject *_wrap_delete_ViewMapGradientNormBP1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *_wrap_delete_ViewMapGradientNormBP1D(PyObject *self , PyObject *args) {
}
#include "Convert.h"
#ifdef __cplusplus
extern "C" {
#endif
///////////////////////////////////////////////////////////////////////////////////////////
static char M_Convert_doc[] = "The Blender.Freestyle.Convert utility submodule";
/*----------------------Freestyle module method def----------------------------*/
struct PyMethodDef M_Convert_methods[] = {
// {"testOutput", ( PyCFunction ) Freestyle_testOutput, METH_NOARGS, "() - Return Curve Data name"},
{NULL, NULL, 0, NULL}
};
//-------------------MODULE INITIALIZATION--------------------------------
PyObject *Convert_Init( void )
{
return Py_InitModule3( "Blender.Freestyle.Convert", M_Convert_methods, M_Convert_doc );
}
//-------------------------------------------------------------------------
PyObject *PyBool_from_bool( bool b ){
// SWIG_From_bool
return PyBool_FromLong( b ? 1 : 0);
}
PyObject *Vector_from_Vec2f( Vec2f vec ) {
float vec_data[2]; // because vec->_coord is protected
vec_data[0] = vec.x(); vec_data[1] = vec.y();
return newVectorObject( vec_data, 3, Py_NEW);
}
PyObject *Vector_from_Vec3f( Vec3f vec ) {
float vec_data[3]; // because vec->_coord is protected
vec_data[0] = vec.x(); vec_data[1] = vec.y(); vec_data[2] = vec.z();
return newVectorObject( vec_data, 3, Py_NEW);
}
PyObject *Vector_from_Vec3r( Vec3r vec ) {
float vec_data[3]; // because vec->_coord is protected
vec_data[0] = vec.x(); vec_data[1] = vec.y(); vec_data[2] = vec.z();
return newVectorObject( vec_data, 3, Py_NEW);
}
///////////////////////////////////////////////////////////////////////////////////////////
#ifdef __cplusplus
}
#endif
\ No newline at end of file
#ifndef FREESTYLE_PYTHON_CONVERT_H
#define FREESTYLE_PYTHON_CONVERT_H
#include "../geometry/Geom.h"
using namespace Geometry;
#ifdef __cplusplus
extern "C" {
#endif
///////////////////////////////////////////////////////////////////////////////////////////
#include <Python.h>
#include "api2_2x/vector.h"
#include "api2_2x/gen_utils.h"
PyObject *Convert_Init( void );
PyObject *PyBool_from_bool( bool b );
PyObject *Vector_from_Vec2f( Vec2f v );
PyObject *Vector_from_Vec3f( Vec3f v );
PyObject *Vector_from_Vec3r( Vec3r v );
///////////////////////////////////////////////////////////////////////////////////////////
#ifdef __cplusplus
}
#endif
#endif /* FREESTYLE_PYTHON_CONVERT_H */
SWIGINTERN PyObject *_wrap_CurvePointIterator__CurvilinearLength_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *_wrap_CurvePointIterator__CurvilinearLength_set(PyObject *self , PyObject *args) {
}
SWIGINTERN PyObject *_wrap_CurvePointIterator__CurvilinearLength_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *_wrap_CurvePointIterator__CurvilinearLength_get(PyObject *self , PyObject *args) {
}
SWIGINTERN PyObject *_wrap_CurvePointIterator__step_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *_wrap_CurvePointIterator__step_set(PyObject *self , PyObject *args) {
}
SWIGINTERN PyObject *_wrap_CurvePointIterator__step_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *_wrap_CurvePointIterator__step_get(PyObject *self , PyObject *args) {
}
SWIGINTERN PyObject *_wrap_CurvePointIterator___A_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *_wrap_CurvePointIterator___A_set(PyObject *self , PyObject *args) {
}
SWIGINTERN PyObject *_wrap_CurvePointIterator___A_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *_wrap_CurvePointIterator___A_get(PyObject *self , PyObject *args) {
}
SWIGINTERN PyObject *_wrap_CurvePointIterator___B_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *_wrap_CurvePointIterator___B_set(PyObject *self , PyObject *args) {
}
SWIGINTERN PyObject *_wrap_CurvePointIterator___B_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *_wrap_CurvePointIterator___B_get(PyObject *self , PyObject *args) {
}
SWIGINTERN PyObject *_wrap_CurvePointIterator__begin_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *_wrap_CurvePointIterator__begin_set(PyObject *self , PyObject *args) {
}
SWIGINTERN PyObject *_wrap_CurvePointIterator__begin_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *_wrap_CurvePointIterator__begin_get(PyObject *self , PyObject *args) {
}
SWIGINTERN PyObject *_wrap_CurvePointIterator__end_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *_wrap_CurvePointIterator__end_set(PyObject *self , PyObject *args) {
}
SWIGINTERN PyObject *_wrap_CurvePointIterator__end_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *_wrap_CurvePointIterator__end_get(PyObject *self , PyObject *args) {
}
SWIGINTERN PyObject *_wrap_CurvePointIterator__n_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *_wrap_CurvePointIterator__n_set(PyObject *self , PyObject *args) {
}
SWIGINTERN PyObject *_wrap_CurvePointIterator__n_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *_wrap_CurvePointIterator__n_get(PyObject *self , PyObject *args) {
}
SWIGINTERN PyObject *_wrap_CurvePointIterator__currentn_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *_wrap_CurvePointIterator__currentn_set(PyObject *self , PyObject *args) {
}
SWIGINTERN PyObject *_wrap_CurvePointIterator__currentn_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *_wrap_CurvePointIterator__currentn_get(PyObject *self , PyObject *args) {
}
SWIGINTERN PyObject *_wrap_CurvePointIterator__t_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *_wrap_CurvePointIterator__t_set(PyObject *self , PyObject *args) {
}
SWIGINTERN PyObject *_wrap_CurvePointIterator__t_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *_wrap_CurvePointIterator__t_get(PyObject *self , PyObject *args) {
}
SWIGINTERN PyObject *_wrap_CurvePointIterator__Point_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *_wrap_CurvePointIterator__Point_set(PyObject *self , PyObject *args) {
}
SWIGINTERN PyObject *_wrap_CurvePointIterator__Point_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *_wrap_CurvePointIterator__Point_get(PyObject *self , PyObject *args) {
}
SWIGINTERN PyObject *_wrap_CurvePointIterator__CurveLength_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *_wrap_CurvePointIterator__CurveLength_set(PyObject *self , PyObject *args) {
}
SWIGINTERN PyObject *_wrap_CurvePointIterator__CurveLength_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *_wrap_CurvePointIterator__CurveLength_get(PyObject *self , PyObject *args) {
}
SWIGINTERN PyObject *_wrap_new_CurvePointIterator__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *_wrap_new_CurvePointIterator__SWIG_0(PyObject *self , PyObject *args) {
}
SWIGINTERN PyObject *_wrap_new_CurvePointIterator__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *_wrap_new_CurvePointIterator__SWIG_1(PyObject *self , PyObject *args) {
}
SWIGINTERN PyObject *_wrap_new_CurvePointIterator__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *_wrap_new_CurvePointIterator__SWIG_2(PyObject *self , PyObject *args) {
}
SWIGINTERN PyObject *_wrap_new_CurvePointIterator(PyObject *self, PyObject *args) {
PyObject *_wrap_new_CurvePointIterator(PyObject *self, PyObject *args) {
}
SWIGINTERN PyObject *_wrap_delete_CurvePointIterator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *_wrap_delete_CurvePointIterator(PyObject *self , PyObject *args) {
}
SWIGINTERN PyObject *_wrap_CurvePointIterator_copy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *_wrap_CurvePointIterator_copy(PyObject *self , PyObject *args) {
}
SWIGINTERN PyObject *_wrap_CurvePointIterator_CastToInterface0DIterator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *_wrap_CurvePointIterator_CastToInterface0DIterator(PyObject *self , PyObject *args) {
}
SWIGINTERN PyObject *_wrap_CurvePointIterator_getExactTypeName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *_wrap_CurvePointIterator_getExactTypeName(PyObject *self , PyObject *args) {
}
SWIGINTERN PyObject *_wrap_CurvePointIterator___eq__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *_wrap_CurvePointIterator___eq__(PyObject *self , PyObject *args) {
}
SWIGINTERN PyObject *_wrap_CurvePointIterator_getObject(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *_wrap_CurvePointIterator_getObject(PyObject *self , PyObject *args) {
}
SWIGINTERN PyObject *_wrap_CurvePointIterator___deref__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *_wrap_CurvePointIterator___deref__(PyObject *self , PyObject *args) {
}
SWIGINTERN PyObject *_wrap_CurvePointIterator_isBegin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *_wrap_CurvePointIterator_isBegin(PyObject *self , PyObject *args) {
}
SWIGINTERN PyObject *_wrap_CurvePointIterator_isEnd(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *_wrap_CurvePointIterator_isEnd(PyObject *self , PyObject *args) {
}
SWIGINTERN PyObject *_wrap_CurvePointIterator_getX(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *_wrap_CurvePointIterator_getX(PyObject *self , PyObject *args) {
}
SWIGINTERN PyObject *_wrap_CurvePointIterator_getY(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *_wrap_CurvePointIterator_getY(PyObject *self , PyObject *args) {
}
SWIGINTERN PyObject *_wrap_CurvePointIterator_getZ(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *_wrap_CurvePointIterator_getZ(PyObject *self , PyObject *args) {
}
SWIGINTERN PyObject *_wrap_CurvePointIterator_getPoint3D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *_wrap_CurvePointIterator_getPoint3D(PyObject *self , PyObject *args) {
}
SWIGINTERN PyObject *_wrap_CurvePointIterator_getProjectedX(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *_wrap_CurvePointIterator_getProjectedX(PyObject *self , PyObject *args) {
}
SWIGINTERN PyObject *_wrap_CurvePointIterator_getProjectedY(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *_wrap_CurvePointIterator_getProjectedY(PyObject *self , PyObject *args) {
}
SWIGINTERN PyObject *_wrap_CurvePointIterator_getProjectedZ(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *_wrap_CurvePointIterator_getProjectedZ(PyObject *self , PyObject *args) {
}
SWIGINTERN PyObject *_wrap_CurvePointIterator_getPoint2D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *_wrap_CurvePointIterator_getPoint2D(PyObject *self , PyObject *args) {
}
SWIGINTERN PyObject *_wrap_CurvePointIterator_getFEdge(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *_wrap_CurvePointIterator_getFEdge(PyObject *self , PyObject *args) {
}
SWIGINTERN PyObject *_wrap_CurvePointIterator_getId(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *_wrap_CurvePointIterator_getId(PyObject *self , PyObject *args) {
}
SWIGINTERN PyObject *_wrap_CurvePointIterator_getNature(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *_wrap_CurvePointIterator_getNature(PyObject *self , PyObject *args) {
}
SWIGINTERN PyObject *_wrap_CurvePointIterator_castToSVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *_wrap_CurvePointIterator_castToSVertex(PyObject *self , PyObject *args) {
}
SWIGINTERN PyObject *_wrap_CurvePointIterator_castToViewVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *_wrap_CurvePointIterator_castToViewVertex(PyObject *self , PyObject *args) {
}
SWIGINTERN PyObject *_wrap_CurvePointIterator_castToNonTVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *_wrap_CurvePointIterator_castToNonTVertex(PyObject *self , PyObject *args) {
}
SWIGINTERN PyObject *_wrap_CurvePointIterator_castToTVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *_wrap_CurvePointIterator_castToTVertex(PyObject *self , PyObject *args) {
}
SWIGINTERN PyObject *_wrap_CurvePointIterator_A(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *_wrap_CurvePointIterator_A(PyObject *self , PyObject *args) {
}
SWIGINTERN PyObject *_wrap_CurvePointIterator_B(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *_wrap_CurvePointIterator_B(PyObject *self , PyObject *args) {
}
SWIGINTERN PyObject *_wrap_CurvePointIterator_t2d(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *_wrap_CurvePointIterator_t2d(PyObject *self , PyObject *args) {
}
SWIGINTERN PyObject *_wrap_CurvePointIterator_SetA(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *_wrap_CurvePointIterator_SetA(PyObject *self , PyObject *args) {
}
SWIGINTERN PyObject *_wrap_CurvePointIterator_SetB(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *_wrap_CurvePointIterator_SetB(PyObject *self , PyObject *args) {
}
SWIGINTERN PyObject *_wrap_CurvePointIterator_SetT2d(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *_wrap_CurvePointIterator_SetT2d(PyObject *self , PyObject *args) {
}
SWIGINTERN PyObject *_wrap_CurvePointIterator_fedge(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *_wrap_CurvePointIterator_fedge(PyObject *self , PyObject *args) {
}
SWIGINTERN PyObject *_wrap_CurvePointIterator_point2d(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *_wrap_CurvePointIterator_point2d(PyObject *self , PyObject *args) {
}
SWIGINTERN PyObject *_wrap_CurvePointIterator_point3d(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *_wrap_CurvePointIterator_point3d(PyObject *self , PyObject *args) {
}
SWIGINTERN PyObject *_wrap_CurvePointIterator_normal(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *_wrap_CurvePointIterator_normal(PyObject *self , PyObject *args) {
}
SWIGINTERN PyObject *_wrap_CurvePointIterator_shape(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *_wrap_CurvePointIterator_shape(PyObject *self , PyObject *args) {
}
SWIGINTERN PyObject *_wrap_CurvePointIterator_occluders_begin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *_wrap_CurvePointIterator_occluders_begin(PyObject *self , PyObject *args) {
}
SWIGINTERN PyObject *_wrap_CurvePointIterator_occluders_end(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *_wrap_CurvePointIterator_occluders_end(PyObject *self , PyObject *args) {
}
SWIGINTERN PyObject *_wrap_CurvePointIterator_occluders_empty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *_wrap_CurvePointIterator_occluders_empty(PyObject *self , PyObject *args) {
}
SWIGINTERN PyObject *_wrap_CurvePointIterator_occluders_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *_wrap_CurvePointIterator_occluders_size(PyObject *self , PyObject *args) {
}
SWIGINTERN PyObject *_wrap_CurvePointIterator_occludee(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *_wrap_CurvePointIterator_occludee(PyObject *self , PyObject *args) {
}
SWIGINTERN PyObject *_wrap_CurvePointIterator_occluded_shape(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *_wrap_CurvePointIterator_occluded_shape(PyObject *self , PyObject *args) {
}
SWIGINTERN PyObject *_wrap_CurvePointIterator_occludee_empty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *_wrap_CurvePointIterator_occludee_empty(PyObject *self , PyObject *args) {
}
SWIGINTERN PyObject *_wrap_CurvePointIterator_z_discontinuity(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *_wrap_CurvePointIterator_z_discontinuity(PyObject *self , PyObject *args) {
}
SWIGINTERN PyObject *_wrap_CurvePointIterator_curvatureFredo(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *_wrap_CurvePointIterator_curvatureFredo(PyObject *self , PyObject *args) {
}
SWIGINTERN PyObject *_wrap_CurvePointIterator_directionFredo(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *_wrap_CurvePointIterator_directionFredo(PyObject *self , PyObject *args) {
}
#include "Freestyle.h"
#include "BinaryPredicate0D.h"
#include "BinaryPredicate1D.h"
#include "Id.h"
#include "Interface0D.h"
#include "Interface1D.h"
#ifdef __cplusplus
extern "C" {
#endif
///////////////////////////////////////////////////////////////////////////////////////////
/*-----------------------Python API function prototypes for the Freestyle module--*/
//static PyObject *Freestyle_testOutput( BPy_Freestyle * self );
/*-----------------------Freestyle module doc strings-----------------------------*/
static char M_Freestyle_doc[] = "The Blender.Freestyle submodule";
/*----------------------Freestyle module method def----------------------------*/
struct PyMethodDef M_Freestyle_methods[] = {
// {"testOutput", ( PyCFunction ) Freestyle_testOutput, METH_NOARGS, "() - Return Curve Data name"},
{NULL, NULL, 0, NULL}
};
/*-----------------------BPy_Freestyle method def------------------------------*/
PyTypeObject Freestyle_Type = {
PyObject_HEAD_INIT( NULL )
0, /* ob_size */
"Freestyle", /* tp_name */
sizeof( BPy_Freestyle ), /* tp_basicsize */
0, /* tp_itemsize */
/* methods */
NULL, /* tp_dealloc */
NULL, /* printfunc tp_print; */
NULL, /* getattrfunc tp_getattr; */
NULL, /* setattrfunc tp_setattr; */
NULL, /* tp_compare */
NULL, /* tp_repr */
/* Method suites for standard classes */
NULL, /* PyNumberMethods *tp_as_number; */
NULL, /* PySequenceMethods *tp_as_sequence; */
NULL, /* PyMappingMethods *tp_as_mapping; */
/* More standard operations (here for binary compatibility) */
NULL, /* hashfunc tp_hash; */
NULL, /* ternaryfunc tp_call; */
NULL, /* reprfunc tp_str; */
NULL, /* getattrofunc tp_getattro; */
NULL, /* setattrofunc tp_setattro; */
/* Functions to access object as input/output buffer */
NULL, /* PyBufferProcs *tp_as_buffer; */
/*** Flags to define presence of optional/expanded features ***/
Py_TPFLAGS_DEFAULT, /* long tp_flags; */
NULL, /* char *tp_doc; Documentation string */
/*** Assigned meaning in release 2.0 ***/
/* call function for all accessible objects */
NULL, /* traverseproc tp_traverse; */
/* delete references to contained objects */
NULL, /* inquiry tp_clear; */
/*** Assigned meaning in release 2.1 ***/
/*** rich comparisons ***/
NULL, /* richcmpfunc tp_richcompare; */
/*** weak reference enabler ***/
0, /* long tp_weaklistoffset; */
/*** Added in release 2.2 ***/
/* Iterators */
NULL, /* getiterfunc tp_iter; */
NULL, /* iternextfunc tp_iternext; */
/*** Attribute descriptor and subclassing stuff ***/
NULL, /* struct PyMethodDef *tp_methods; */
NULL, /* struct PyMemberDef *tp_members; */
NULL, /* struct PyGetSetDef *tp_getset; */
NULL, /* struct _typeobject *tp_base; */
NULL, /* PyObject *tp_dict; */
NULL, /* descrgetfunc tp_descr_get; */
NULL, /* descrsetfunc tp_descr_set; */
0, /* long tp_dictoffset; */
NULL, /* initproc tp_init; */
NULL, /* allocfunc tp_alloc; */
NULL, /* newfunc tp_new; */
/* Low-level free-memory routine */
NULL, /* freefunc tp_free; */
/* For PyObject_IS_GC */
NULL, /* inquiry tp_is_gc; */
NULL, /* PyObject *tp_bases; */
/* method resolution order */
NULL, /* PyObject *tp_mro; */
NULL, /* PyObject *tp_cache; */
NULL, /* PyObject *tp_subclasses; */
NULL, /* PyObject *tp_weaklist; */
NULL
};
//-------------------MODULE INITIALIZATION--------------------------------
PyObject *Freestyle_Init( void )
{
PyObject *submodule;
PyObject *dict;
if( PyType_Ready( &Freestyle_Type ) < 0 )
return NULL;
submodule = Py_InitModule3( "Blender.Freestyle", M_Freestyle_methods, M_Freestyle_doc );
dict = PyModule_GetDict( submodule );
PyDict_SetItemString( dict, "BinaryPredicate0D", BinaryPredicate0D_Init() );
PyDict_SetItemString( dict, "BinaryPredicate1D", BinaryPredicate1D_Init() );
PyDict_SetItemString( dict, "Interface0D", Interface0D_Init() );
PyDict_SetItemString( dict, "Interface1D", Interface1D_Init() );
PyDict_SetItemString( dict, "Id", Id_Init() );
return submodule;
}
///////////////////////////////////////////////////////////////////////////////////////////
#ifdef __cplusplus
}
#endif
\ No newline at end of file
#ifndef FREESTYLE_PYTHON_FREESTYLE_H
#define FREESTYLE_PYTHON_FREESTYLE_H
#ifdef __cplusplus
extern "C" {
#endif
///////////////////////////////////////////////////////////////////////////////////////////
#include <Python.h>
extern PyTypeObject Freestyle_Type;
#define BPy_Freestyle_Check(v) \
((v)->ob_type == &Freestyle_Type)
/*---------------------------Python BPy_Freestyle structure definition----------*/
typedef struct {
PyObject_HEAD
} BPy_Freestyle;
/*---------------------------Python BPy_Freestyle visible prototypes-----------*/
PyObject *Freestyle_Init( void );
///////////////////////////////////////////////////////////////////////////////////////////
#ifdef __cplusplus
}
#endif
#endif /* FREESTYLE_PYTHON_FREESTYLE_H */
SWIGINTERN PyObject *_wrap_Id_getFirst(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
#include "Id.h"
#include "Convert.h"
#ifdef __cplusplus
extern "C" {
#endif
///////////////////////////////////////////////////////////////////////////////////////////
/*-----------------------Python API function prototypes for the Id module--*/
//static PyObject *Freestyle_testOutput( BPy_Freestyle * self );
/*-----------------------Id module doc strings-----------------------------*/
static char M_Id_doc[] = "The Blender.Freestyle.Id submodule";
/*----------------------Id module method def----------------------------*/
struct PyMethodDef M_Id_methods[] = {
// {"testOutput", ( PyCFunction ) Freestyle_testOutput, METH_NOARGS, "() - Return Curve Data name"},
{NULL, NULL, 0, NULL}
};
/*-----------------------BPy_Freestyle method def------------------------------*/
PyTypeObject Id_Type = {
PyObject_HEAD_INIT( NULL )
0, /* ob_size */
"Id", /* tp_name */
sizeof( BPy_Id ), /* tp_basicsize */
0, /* tp_itemsize */
/* methods */
NULL, /* tp_dealloc */
NULL, /* printfunc tp_print; */
NULL, /* getattrfunc tp_getattr; */
NULL, /* setattrfunc tp_setattr; */
NULL, /* tp_compare */
NULL, /* tp_repr */
/* Method suites for standard classes */
NULL, /* PyNumberMethods *tp_as_number; */
NULL, /* PySequenceMethods *tp_as_sequence; */
NULL, /* PyMappingMethods *tp_as_mapping; */
/* More standard operations (here for binary compatibility) */
NULL, /* hashfunc tp_hash; */
NULL, /* ternaryfunc tp_call; */
NULL, /* reprfunc tp_str; */
NULL, /* getattrofunc tp_getattro; */
NULL, /* setattrofunc tp_setattro; */
/* Functions to access object as input/output buffer */
NULL, /* PyBufferProcs *tp_as_buffer; */
/*** Flags to define presence of optional/expanded features ***/
Py_TPFLAGS_DEFAULT, /* long tp_flags; */
NULL, /* char *tp_doc; Documentation string */
/*** Assigned meaning in release 2.0 ***/
/* call function for all accessible objects */
NULL, /* traverseproc tp_traverse; */
/* delete references to contained objects */
NULL, /* inquiry tp_clear; */
/*** Assigned meaning in release 2.1 ***/
/*** rich comparisons ***/
NULL, /* richcmpfunc tp_richcompare; */
/*** weak reference enabler ***/
0, /* long tp_weaklistoffset; */
/*** Added in release 2.2 ***/
/* Iterators */
NULL, /* getiterfunc tp_iter; */
NULL, /* iternextfunc tp_iternext; */
/*** Attribute descriptor and subclassing stuff ***/
NULL, /* struct PyMethodDef *tp_methods; */
NULL, /* struct PyMemberDef *tp_members; */
NULL, /* struct PyGetSetDef *tp_getset; */
NULL, /* struct _typeobject *tp_base; */
NULL, /* PyObject *tp_dict; */
NULL, /* descrgetfunc tp_descr_get; */
NULL, /* descrsetfunc tp_descr_set; */
0, /* long tp_dictoffset; */
NULL, /* initproc tp_init; */
NULL, /* allocfunc tp_alloc; */
NULL, /* newfunc tp_new; */
/* Low-level free-memory routine */
NULL, /* freefunc tp_free; */
/* For PyObject_IS_GC */
NULL, /* inquiry tp_is_gc; */
NULL, /* PyObject *tp_bases; */
/* method resolution order */
NULL, /* PyObject *tp_mro; */
NULL, /* PyObject *tp_cache; */
NULL, /* PyObject *tp_subclasses; */
NULL, /* PyObject *tp_weaklist; */
NULL
};
//-------------------MODULE INITIALIZATION--------------------------------
PyObject *Id_Init( void )
{
PyObject *submodule;
if( PyType_Ready( &Id_Type ) < 0 )
return NULL;
submodule = Py_InitModule3( "Blender.Freestyle.Id", M_Id_methods, M_Id_doc );
return submodule;
}
//------------------------INSTANCE METHODS ----------------------------------
SWIGINTERN PyObject *_wrap_Id_getSecond(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *Id_getFirst( BPy_Id *self ) {
return PyInt_FromLong( self->id->getFirst() );
}
SWIGINTERN PyObject *_wrap_Id_setFirst(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *Id_getSecond( BPy_Id *self) {
return PyInt_FromLong( self->id->getSecond() );
}
SWIGINTERN PyObject *_wrap_Id_setSecond(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *Id_setFirst( BPy_Id *self , PyObject *args) {
PyObject * obj1 = 0 ;
PyObject * obj2 = 0 ;
unsigned int i;
if( !PyArg_ParseTuple(args, (char *)"OO:Id_setFirst", &obj1, &obj2) )
cout << "ERROR: Id_setFirst" << endl;
i = static_cast<unsigned int>( PyInt_AsLong(obj2) );
self->id->setFirst( i );
Py_RETURN_NONE;
}
SWIGINTERN PyObject *_wrap_Id___eq__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *Id_setSecond( BPy_Id *self , PyObject *args) {
PyObject * obj1 = 0 ;
PyObject * obj2 = 0 ;
unsigned int i;
if( !PyArg_ParseTuple(args, (char *)"OO:Id_setSecond", &obj1, &obj2) )
cout << "ERROR: Id_setSecond" << endl;
i = static_cast<unsigned int>( PyInt_AsLong(obj2) );
self->id->setSecond( i );
Py_RETURN_NONE;
}
PyObject *Id___eq__( BPy_Id *self , PyObject *args) {
BPy_Id * obj1 = 0 ;
BPy_Id * obj2 = 0 ;
SWIGINTERN PyObject *_wrap_Id___ne__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
if( !PyArg_ParseTuple(args, (char *)"OO:Id___eq__", &obj1, &obj2) )
cout << "ERROR: Id___eq__" << endl;
return PyBool_from_bool( obj1->id == obj2->id );
}
SWIGINTERN PyObject *_wrap_Id___lt__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *Id___ne__(PyObject *self , PyObject *args) {
BPy_Id * obj1 = 0 ;
BPy_Id * obj2 = 0 ;
if( !PyArg_ParseTuple(args, (char *)"OO:Id___ne__", &obj1, &obj2) )
cout << "ERROR: Id___ne__" << endl;
return PyBool_from_bool( obj1->id != obj2->id );
}
PyObject *Id___lt__(PyObject *self , PyObject *args) {
BPy_Id * obj1 = 0 ;
BPy_Id * obj2 = 0 ;
SWIGINTERN PyObject *_wrap_delete_Id(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
if( !PyArg_ParseTuple(args, (char *)"OO:Id___lt__", &obj1, &obj2) )
cout << "ERROR: Id___lt__" << endl;
return PyBool_from_bool( obj1->id < obj2->id );
}
///////////////////////////////////////////////////////////////////////////////////////////
#ifdef __cplusplus
}
#endif
\ No newline at end of file
#ifndef FREESTYLE_PYTHON_ID_H
#define FREESTYLE_PYTHON_ID_H
#include <iostream>
using namespace std;
#include "../system/Id.h"
#ifdef __cplusplus
extern "C" {
#endif
///////////////////////////////////////////////////////////////////////////////////////////
#include <Python.h>
extern PyTypeObject Id_Type;
#define BPy_Id_Check(v) \
((v)->ob_type == &Id_Type)
/*---------------------------Python BPy_Id structure definition----------*/
typedef struct {
PyObject_HEAD
Id *id;
} BPy_Id;
/*---------------------------Python BPy_Id visible prototypes-----------*/
PyObject *Id_Init( void );
///////////////////////////////////////////////////////////////////////////////////////////
#ifdef __cplusplus
}
#endif
#endif /* FREESTYLE_PYTHON_ID_H */
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment