1 /** \file blender/blenpluginapi/plugin.h
4 /* Copyright (c) 1999, Not a Number / NeoGeo b.v.
8 * Contact: info@blender.org
9 * Information: http://www.blender.org
11 * Redistribution and use in source and binary forms, with or without
12 * modification, are permitted provided that the following conditions
14 * 1. Redistributions of source code must retain the above copyright
15 * notice, this list of conditions and the following disclaimer.
16 * 2. Redistributions in binary form must reproduce the above copyright
17 * notice, this list of conditions and the following disclaimer in the
18 * documentation and/or other materials provided with the distribution.
20 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
21 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
24 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
36 #include "externdef.h"
39 #include "floatpatch.h"
41 #define B_PLUGIN_VERSION 6
43 typedef int (*TexDoit)(int, void*, float*, float*, float*, float*);
44 typedef int (*TexDoitold)(int, void*, float*, float*, float*);
45 typedef void (*SeqDoit)(void*, float, float, int, int, ImBuf*, ImBuf*, ImBuf*, ImBuf*);
47 typedef struct VarStruct {
54 typedef struct _PluginInfo {
65 void (*callback)(int);
69 void (*instance_init)(void *);
72 LIBEXPORT int plugin_tex_getversion(void);
73 LIBEXPORT int plugin_seq_getversion(void);
74 LIBEXPORT void plugin_getinfo(PluginInfo *);
76 /* *************** defines for button types ************** */
85 #define NUMSLI (14<<9)
88 /* return values (bitfield like) for textures (DNA_texture_types.h) */
93 /* *************** API functions ******************** */
95 /* derived from the famous Perlin noise */
96 LIBIMPORT float hnoise(float noisesize, float x, float y, float z);
97 /* the original Perlin noise */
98 LIBIMPORT float hnoisep(float noisesize, float x, float y, float z);
100 /* soft turbulence */
101 LIBIMPORT float turbulence(float noisesize, float x, float y, float z, int depth);
102 /* hard turbulence */
103 LIBIMPORT float turbulence1(float noisesize, float x, float y, float z, int depth);
105 #endif /* __PLUGIN_H__ */