Index: blender/blenkernel/BKE_plugin_types.h =================================================================== --- blender/blenkernel/BKE_plugin_types.h (revision 13075) +++ blender/blenkernel/BKE_plugin_types.h (working copy) @@ -39,7 +39,14 @@ struct ImBuf; +// XXX changed by davywavy +typedef int (*TexDoit)(int stype, void *cast, float *texvec, float *dxt, float *dyt, float *result ); +/* +// original version: typedef int (*TexDoit)(int, void*, float*, float*, float*); +*/ +// XXX end changed by davywavy + typedef void (*SeqDoit)(void*, float, float, int, int, struct ImBuf*, struct ImBuf*, struct ImBuf*, struct ImBuf*); Index: blender/blenkernel/intern/texture.c =================================================================== --- blender/blenkernel/intern/texture.c (revision 13075) +++ blender/blenkernel/intern/texture.c (working copy) @@ -126,7 +126,8 @@ if (version != 0) { pit->version= version(); - if (pit->version>=2 && pit->version<=5) { + //if (pit->version>=2 && pit->version<=5) { + if( pit->version == 6 ) { int (*info_func)(PluginInfo *); PluginInfo *info= (PluginInfo*) MEM_mallocN(sizeof(PluginInfo), "plugin_info"); Index: blender/blenpluginapi/externdef.h =================================================================== --- blender/blenpluginapi/externdef.h (revision 13075) +++ blender/blenpluginapi/externdef.h (working copy) @@ -33,8 +33,10 @@ #ifdef WIN32 #ifdef PLUGIN_INTERN #define LIBEXPORT __declspec(dllexport) + #define LIBIMPORT __declspec(dllexport) #else - #define LIBEXPORT extern __declspec(dllimport) + #define LIBEXPORT __declspec(dllexport) + #define LIBIMPORT extern __declspec(dllimport) #endif #elif !defined(WIN32) #define LIBEXPORT extern Index: blender/blenpluginapi/iff.h =================================================================== --- blender/blenpluginapi/iff.h (revision 13075) +++ blender/blenpluginapi/iff.h (working copy) @@ -167,49 +167,49 @@ struct ImBuf *mipmap[IB_MIPMAP_LEVELS]; /**< MipMap levels, a series of halved images */ } ImBuf; -LIBEXPORT struct ImBuf *allocImBuf(short,short,uchar,uint,uchar); -LIBEXPORT struct ImBuf *dupImBuf(struct ImBuf *); -LIBEXPORT void freeImBuf(struct ImBuf*); +LIBIMPORT struct ImBuf *allocImBuf(short,short,uchar,uint,uchar); +LIBIMPORT struct ImBuf *dupImBuf(struct ImBuf *); +LIBIMPORT void freeImBuf(struct ImBuf*); -LIBEXPORT short converttocmap(struct ImBuf* ibuf); +LIBIMPORT short converttocmap(struct ImBuf* ibuf); -LIBEXPORT short saveiff(struct ImBuf *,char *,int); +LIBIMPORT short saveiff(struct ImBuf *,char *,int); -LIBEXPORT struct ImBuf *loadiffmem(int *,int); -LIBEXPORT struct ImBuf *loadifffile(int,int); -LIBEXPORT struct ImBuf *loadiffname(char *,int); -LIBEXPORT struct ImBuf *testiffname(char *,int); +LIBIMPORT struct ImBuf *loadiffmem(int *,int); +LIBIMPORT struct ImBuf *loadifffile(int,int); +LIBIMPORT struct ImBuf *loadiffname(char *,int); +LIBIMPORT struct ImBuf *testiffname(char *,int); -LIBEXPORT struct ImBuf *onehalf(struct ImBuf *); -LIBEXPORT struct ImBuf *onethird(struct ImBuf *); -LIBEXPORT struct ImBuf *halflace(struct ImBuf *); -LIBEXPORT struct ImBuf *half_x(struct ImBuf *); -LIBEXPORT struct ImBuf *half_y(struct ImBuf *); -LIBEXPORT struct ImBuf *double_x(struct ImBuf *); -LIBEXPORT struct ImBuf *double_y(struct ImBuf *); -LIBEXPORT struct ImBuf *double_fast_x(struct ImBuf *); -LIBEXPORT struct ImBuf *double_fast_y(struct ImBuf *); +LIBIMPORT struct ImBuf *onehalf(struct ImBuf *); +LIBIMPORT struct ImBuf *onethird(struct ImBuf *); +LIBIMPORT struct ImBuf *halflace(struct ImBuf *); +LIBIMPORT struct ImBuf *half_x(struct ImBuf *); +LIBIMPORT struct ImBuf *half_y(struct ImBuf *); +LIBIMPORT struct ImBuf *double_x(struct ImBuf *); +LIBIMPORT struct ImBuf *double_y(struct ImBuf *); +LIBIMPORT struct ImBuf *double_fast_x(struct ImBuf *); +LIBIMPORT struct ImBuf *double_fast_y(struct ImBuf *); -LIBEXPORT int ispic(char *); +LIBIMPORT int ispic(char *); -LIBEXPORT void dit2(struct ImBuf *, short, short); -LIBEXPORT void dit0(struct ImBuf *, short, short); +LIBIMPORT void dit2(struct ImBuf *, short, short); +LIBIMPORT void dit0(struct ImBuf *, short, short); -LIBEXPORT struct ImBuf *scaleImBuf(struct ImBuf *, short, short); -LIBEXPORT struct ImBuf *scalefastImBuf(struct ImBuf *, short, short); -LIBEXPORT struct ImBuf *scalefieldImBuf(struct ImBuf *, short, short); -LIBEXPORT struct ImBuf *scalefastfieldImBuf(struct ImBuf *, short, short); +LIBIMPORT struct ImBuf *scaleImBuf(struct ImBuf *, short, short); +LIBIMPORT struct ImBuf *scalefastImBuf(struct ImBuf *, short, short); +LIBIMPORT struct ImBuf *scalefieldImBuf(struct ImBuf *, short, short); +LIBIMPORT struct ImBuf *scalefastfieldImBuf(struct ImBuf *, short, short); -LIBEXPORT void de_interlace(struct ImBuf *ib); -LIBEXPORT void interlace(struct ImBuf *ib); -LIBEXPORT void gamwarp(struct ImBuf *ibuf, double gamma); +LIBIMPORT void de_interlace(struct ImBuf *ib); +LIBIMPORT void interlace(struct ImBuf *ib); +LIBIMPORT void gamwarp(struct ImBuf *ibuf, double gamma); -LIBEXPORT void IMB_rectcpy(struct ImBuf *dbuf, struct ImBuf *sbuf, +LIBIMPORT void IMB_rectcpy(struct ImBuf *dbuf, struct ImBuf *sbuf, int destx, int desty, int srcx, int srcy, int width, int height); -LIBEXPORT void IMB_rectfill(struct ImBuf *drect, float col[4]); -LIBEXPORT void IMB_rectfill_area(struct ImBuf *ibuf, float *col, int x1, int y1, int x2, int y2); -LIBEXPORT void buf_rectfill_area(unsigned char *rect, float *rectf, int width, int height, float *col, int x1, int y1, int x2, int y2); +LIBIMPORT void IMB_rectfill(struct ImBuf *drect, float col[4]); +LIBIMPORT void IMB_rectfill_area(struct ImBuf *ibuf, float *col, int x1, int y1, int x2, int y2); +LIBIMPORT void buf_rectfill_area(unsigned char *rect, float *rectf, int width, int height, float *col, int x1, int y1, int x2, int y2); #endif /* IFF_H */ Index: blender/blenpluginapi/plugin.h =================================================================== --- blender/blenpluginapi/plugin.h (revision 13075) +++ blender/blenpluginapi/plugin.h (working copy) @@ -36,9 +36,9 @@ #include "util.h" #include "floatpatch.h" -#define B_PLUGIN_VERSION 5 +#define B_PLUGIN_VERSION 6 -typedef int (*TexDoit)(int, void*, float*, float*, float*); +typedef int (*TexDoit)(int, void*, float*, float*, float*, float*); typedef void (*SeqDoit)(void*, float, float, int, int, ImBuf*, ImBuf*, ImBuf*, ImBuf*); typedef struct VarStruct { @@ -66,9 +66,9 @@ void (*instance_init)(void *); } PluginInfo; -int plugin_tex_getversion(void); -int plugin_seq_getversion(void); -void plugin_getinfo(PluginInfo *); +LIBEXPORT int plugin_tex_getversion(void); +LIBEXPORT int plugin_seq_getversion(void); +LIBEXPORT void plugin_getinfo(PluginInfo *); /* *************** defines for button types ************** */ @@ -90,14 +90,14 @@ /* *************** API functions ******************** */ /* derived from the famous Perlin noise */ -LIBEXPORT float hnoise(float noisesize, float x, float y, float z); +LIBIMPORT float hnoise(float noisesize, float x, float y, float z); /* the original Perlin noise */ -LIBEXPORT float hnoisep(float noisesize, float x, float y, float z); +LIBIMPORT float hnoisep(float noisesize, float x, float y, float z); /* soft turbulence */ -LIBEXPORT float turbulence(float noisesize, float x, float y, float z, int depth); +LIBIMPORT float turbulence(float noisesize, float x, float y, float z, int depth); /* hard turbulence */ -LIBEXPORT float turbulence1(float noisesize, float x, float y, float z, int depth); +LIBIMPORT float turbulence1(float noisesize, float x, float y, float z, int depth); #endif /* PLUGIN_H */ Index: blender/render/intern/source/texture.c =================================================================== --- blender/render/intern/source/texture.c (revision 13075) +++ blender/render/intern/source/texture.c (working copy) @@ -720,30 +720,41 @@ { PluginTex *pit; int rgbnor=0; + float result[ 8 ]; texres->tin= 0.0; pit= tex->plugin; if(pit && pit->doit) { if(texres->nor) { - VECCOPY(pit->result+5, texres->nor); + VECCOPY(result+5, texres->nor); + // orginal: + //VECCOPY(pit->result+5, texres->nor); } - if(osatex) rgbnor= ((TexDoit)pit->doit)(tex->stype, pit->data, texvec, dxt, dyt); - else rgbnor= ((TexDoit)pit->doit)(tex->stype, pit->data, texvec, 0, 0); + //if(osatex) rgbnor= ((TexDoit)pit->doit)(tex->stype, pit->data, texvec, dxt, dyt); + //else rgbnor= ((TexDoit)pit->doit)(tex->stype, pit->data, texvec, 0, 0); + if(osatex) rgbnor= ((TexDoit)pit->doit)(tex->stype, pit->data, texvec, dxt, dyt, result ); + else rgbnor= ((TexDoit)pit->doit)(tex->stype, pit->data, texvec, 0, 0, result ); - texres->tin= pit->result[0]; + //texres->tin= pit->result[0]; + texres->tin= result[0]; if(rgbnor & TEX_NOR) { if(texres->nor) { - VECCOPY(texres->nor, pit->result+5); + //VECCOPY(texres->nor, pit->result+5); + VECCOPY(texres->nor, result+5); } } if(rgbnor & TEX_RGB) { - texres->tr= pit->result[1]; - texres->tg= pit->result[2]; - texres->tb= pit->result[3]; - texres->ta= pit->result[4]; + //texres->tr= pit->result[1]; + //texres->tg= pit->result[2]; + //texres->tb= pit->result[3]; + //texres->ta= pit->result[4]; + texres->tr= result[1]; + texres->tg= result[2]; + texres->tb= result[3]; + texres->ta= result[4]; BRICONTRGB; }