~ubuntu-branches/ubuntu/trusty/blender/trusty

« back to all changes in this revision

Viewing changes to source/blender/blenpluginapi/plugin.h

  • Committer: Package Import Robot
  • Author(s): Jeremy Bicha
  • Date: 2013-03-06 12:08:47 UTC
  • mfrom: (1.5.1) (14.1.8 experimental)
  • Revision ID: package-import@ubuntu.com-20130306120847-frjfaryb2zrotwcg
Tags: 2.66a-1ubuntu1
* Resynchronize with Debian (LP: #1076930, #1089256, #1052743, #999024,
  #1122888, #1147084)
* debian/control:
  - Lower build-depends on libavcodec-dev since we're not
    doing the libav9 transition in Ubuntu yet

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/** \file blender/blenpluginapi/plugin.h
2
 
 *  \ingroup blpluginapi
3
 
 */
4
 
/* Copyright (c) 1999, Not a Number / NeoGeo b.v. 
5
 
 * 
6
 
 * All rights reserved.
7
 
 * 
8
 
 * Contact:      info@blender.org   
9
 
 * Information:  http://www.blender.org
10
 
 *
11
 
 * Redistribution and use in source and binary forms, with or without
12
 
 * modification, are permitted provided that the following conditions
13
 
 * are met:
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.
19
 
 *
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
30
 
 * SUCH DAMAGE.
31
 
 */
32
 
 
33
 
#ifndef __PLUGIN_H__
34
 
#define __PLUGIN_H__
35
 
 
36
 
#include "externdef.h"
37
 
#include "iff.h"
38
 
#include "util.h"
39
 
#include "floatpatch.h"
40
 
 
41
 
#define B_PLUGIN_VERSION        6
42
 
 
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*);
46
 
 
47
 
typedef struct VarStruct {
48
 
        int type;
49
 
        char name[16];
50
 
        float def, min, max;
51
 
        char tip[80];
52
 
} VarStruct;
53
 
 
54
 
typedef struct _PluginInfo {
55
 
        char *name;
56
 
        char *snames;
57
 
 
58
 
        int stypes;
59
 
        int nvars;
60
 
        VarStruct *varstr;
61
 
        float *result;
62
 
        float *cfra;
63
 
 
64
 
        void (*init)(void);
65
 
        void (*callback)(int);
66
 
        TexDoit tex_doit;
67
 
        SeqDoit seq_doit;
68
 
 
69
 
        void (*instance_init)(void *);
70
 
} PluginInfo;
71
 
 
72
 
LIBEXPORT int plugin_tex_getversion(void);
73
 
LIBEXPORT int plugin_seq_getversion(void);
74
 
LIBEXPORT void plugin_getinfo(PluginInfo *);
75
 
 
76
 
/* *************** defines for button types ************** */
77
 
 
78
 
#define CHA     32
79
 
#define INT     96
80
 
#define FLO     128
81
 
 
82
 
#define TOG     (3<<9)
83
 
#define NUM     (5<<9)
84
 
#define LABEL   (10<<9)
85
 
#define NUMSLI  (14<<9)
86
 
#define COL     (15<<9)
87
 
 
88
 
/* return values (bitfield like) for textures (DNA_texture_types.h) */
89
 
#define TEX_INT         0
90
 
#define TEX_RGB         1
91
 
#define TEX_NOR         2
92
 
 
93
 
/* *************** API functions ******************** */
94
 
 
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);
99
 
 
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);
104
 
 
105
 
#endif /* __PLUGIN_H__ */
106