Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Dinges <blender@dingto.org>2012-05-29 14:21:07 +0400
committerThomas Dinges <blender@dingto.org>2012-05-29 14:21:07 +0400
commit16117143d8f12dac65caa8368f56a7e8af8f0db2 (patch)
tree365d68a11bc4a898a863bf8c229d8cda629d9dc7 /source/blender
parentdf8880a81f5ba212c49c357294774119c16fd13e (diff)
Massive Code cleanup:
* Remove all code for Texture and Sequencer plugin system, this never worked in 2.5x / 2.6x and is therefore not needed anymore. * DNA structures are kept, all read/writefile code is gone.
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/CMakeLists.txt1
-rw-r--r--source/blender/SConscript1
-rw-r--r--source/blender/blenkernel/BKE_plugin_types.h68
-rw-r--r--source/blender/blenkernel/BKE_sequencer.h3
-rw-r--r--source/blender/blenkernel/BKE_texture.h5
-rw-r--r--source/blender/blenkernel/CMakeLists.txt1
-rw-r--r--source/blender/blenkernel/intern/material.c2
-rw-r--r--source/blender/blenkernel/intern/seqeffects.c297
-rw-r--r--source/blender/blenkernel/intern/sequencer.c10
-rw-r--r--source/blender/blenkernel/intern/texture.c166
-rw-r--r--source/blender/blenlib/intern/bpath.c8
-rw-r--r--source/blender/blenloader/intern/readfile.c14
-rw-r--r--source/blender/blenloader/intern/versioning_250.c2
-rw-r--r--source/blender/blenloader/intern/writefile.c2
-rw-r--r--source/blender/blenpluginapi/CMakeLists.txt58
-rw-r--r--source/blender/blenpluginapi/SConscript23
-rw-r--r--source/blender/blenpluginapi/documentation.h71
-rw-r--r--source/blender/blenpluginapi/externdef.h50
-rw-r--r--source/blender/blenpluginapi/floatpatch.h93
-rw-r--r--source/blender/blenpluginapi/iff.h122
-rw-r--r--source/blender/blenpluginapi/intern/pluginapi.c305
-rw-r--r--source/blender/blenpluginapi/plugin.DEF40
-rw-r--r--source/blender/blenpluginapi/plugin.h107
-rw-r--r--source/blender/blenpluginapi/util.h103
-rw-r--r--source/blender/editors/include/UI_resources.h1
-rw-r--r--source/blender/editors/interface/resources.c4
-rw-r--r--source/blender/editors/space_sequencer/sequencer_add.c24
-rw-r--r--source/blender/editors/space_sequencer/sequencer_draw.c20
-rw-r--r--source/blender/editors/space_sequencer/sequencer_edit.c21
-rw-r--r--source/blender/imbuf/IMB_imbuf_types.h5
-rw-r--r--source/blender/makesdna/DNA_sequence_types.h2
-rw-r--r--source/blender/makesdna/DNA_texture_types.h2
-rw-r--r--source/blender/makesrna/RNA_access.h2
-rw-r--r--source/blender/makesrna/intern/rna_sequencer.c1
-rw-r--r--source/blender/makesrna/intern/rna_sequencer_api.c1
-rw-r--r--source/blender/makesrna/intern/rna_texture.c1
-rw-r--r--source/blender/nodes/shader/node_shader_util.c2
-rw-r--r--source/blender/render/intern/source/render_texture.c78
38 files changed, 12 insertions, 1704 deletions
diff --git a/source/blender/CMakeLists.txt b/source/blender/CMakeLists.txt
index e0fd33d1316..ed1308d41ba 100644
--- a/source/blender/CMakeLists.txt
+++ b/source/blender/CMakeLists.txt
@@ -97,7 +97,6 @@ add_subdirectory(render)
add_subdirectory(compositor)
add_subdirectory(blenfont)
add_subdirectory(blenloader)
-add_subdirectory(blenpluginapi)
add_subdirectory(ikplugin)
add_subdirectory(gpu)
add_subdirectory(opencl)
diff --git a/source/blender/SConscript b/source/blender/SConscript
index 411a04528c5..c2ca6eb5ae5 100644
--- a/source/blender/SConscript
+++ b/source/blender/SConscript
@@ -7,7 +7,6 @@ SConscript(['avi/SConscript',
'blenkernel/SConscript',
'blenlib/SConscript',
'blenloader/SConscript',
- 'blenpluginapi/SConscript',
'gpu/SConscript',
'opencl/SConscript',
'editors/SConscript',
diff --git a/source/blender/blenkernel/BKE_plugin_types.h b/source/blender/blenkernel/BKE_plugin_types.h
deleted file mode 100644
index f3c5db02427..00000000000
--- a/source/blender/blenkernel/BKE_plugin_types.h
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * ***** 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
- * All rights reserved.
- *
- * The Original Code is: all of this file.
- *
- * Contributor(s): none yet.
- *
- * ***** END GPL LICENSE BLOCK *****
- */
-#ifndef __BKE_PLUGIN_TYPES_H__
-#define __BKE_PLUGIN_TYPES_H__
-
-/** \file BKE_plugin_types.h
- * \ingroup bke
- * \author nzc
- */
-
-struct ImBuf;
-
-typedef int (*TexDoitold)(int stype, void *cast, float *texvec, float *dxt, float *dyt);
-typedef int (*TexDoit)(int stype, void *cast, float *texvec, float *dxt, float *dyt, float *result);
-typedef void (*SeqDoit)(void *, float, float, int, int,
- struct ImBuf *, struct ImBuf *,
- struct ImBuf *, struct ImBuf *);
-
-typedef struct VarStruct {
- int type;
- char name[16];
- float def, min, max;
- char tip[80];
-} VarStruct;
-
-typedef struct _PluginInfo {
- char *name;
- char *snames;
-
- int stypes;
- int nvars;
- VarStruct *varstr;
- float *result;
- float *cfra;
-
- void (*init)(void);
- void (*callback)(int);
- void (*tex_doit)(void *);
- SeqDoit seq_doit;
- void (*instance_init)(void *);
-} PluginInfo;
-
-#endif
-
diff --git a/source/blender/blenkernel/BKE_sequencer.h b/source/blender/blenkernel/BKE_sequencer.h
index f06e0e2f71a..d6c1a26fdba 100644
--- a/source/blender/blenkernel/BKE_sequencer.h
+++ b/source/blender/blenkernel/BKE_sequencer.h
@@ -113,9 +113,8 @@ enum {
struct SeqEffectHandle {
/* constructors & destructor */
- /* init & init_plugin are _only_ called on first creation */
+ /* init is _only_ called on first creation */
void (*init)(struct Sequence *seq);
- void (*init_plugin)(struct Sequence *seq, const char *fname);
/* number of input strips needed
* (called directly after construction) */
diff --git a/source/blender/blenkernel/BKE_texture.h b/source/blender/blenkernel/BKE_texture.h
index 339b78ae2d1..78fdd26c9e0 100644
--- a/source/blender/blenkernel/BKE_texture.h
+++ b/source/blender/blenkernel/BKE_texture.h
@@ -48,7 +48,6 @@ struct Material;
struct MTex;
struct OceanTex;
struct ParticleSettings;
-struct PluginTex;
struct PointDensity;
struct Tex;
struct TexMapping;
@@ -60,10 +59,6 @@ struct World;
void BKE_texture_free(struct Tex *t);
-int test_dlerr(const char *name, const char *symbol);
-void open_plugin_tex(struct PluginTex *pit);
-struct PluginTex *add_plugin_tex(char *str);
-void free_plugin_tex(struct PluginTex *pit);
void init_colorband(struct ColorBand *coba, int rangetype);
struct ColorBand *add_colorband(int rangetype);
diff --git a/source/blender/blenkernel/CMakeLists.txt b/source/blender/blenkernel/CMakeLists.txt
index a791d6f269f..d207a08c6cb 100644
--- a/source/blender/blenkernel/CMakeLists.txt
+++ b/source/blender/blenkernel/CMakeLists.txt
@@ -201,7 +201,6 @@ set(SRC
BKE_packedFile.h
BKE_paint.h
BKE_particle.h
- BKE_plugin_types.h
BKE_pointcache.h
BKE_property.h
BKE_report.h
diff --git a/source/blender/blenkernel/intern/material.c b/source/blender/blenkernel/intern/material.c
index 55ae7e4d11a..adf268d4d02 100644
--- a/source/blender/blenkernel/intern/material.c
+++ b/source/blender/blenkernel/intern/material.c
@@ -903,7 +903,7 @@ static void do_init_render_material(Material *ma, int r_mode, float *amb)
ma->mapto |= mtex->mapto;
/* always get derivatives for these textures */
- if (ELEM3(mtex->tex->type, TEX_IMAGE, TEX_PLUGIN, TEX_ENVMAP)) ma->texco |= TEXCO_OSA;
+ if (ELEM(mtex->tex->type, TEX_IMAGE, TEX_ENVMAP)) ma->texco |= TEXCO_OSA;
else if (mtex->texflag & (MTEX_COMPAT_BUMP | MTEX_3TAP_BUMP | MTEX_5TAP_BUMP | MTEX_BICUBIC_BUMP)) ma->texco |= TEXCO_OSA;
if (ma->texco & (TEXCO_ORCO | TEXCO_REFL | TEXCO_NORM | TEXCO_STRAND | TEXCO_STRESS)) needuv = 1;
diff --git a/source/blender/blenkernel/intern/seqeffects.c b/source/blender/blenkernel/intern/seqeffects.c
index 252ddb78887..cea041eb294 100644
--- a/source/blender/blenkernel/intern/seqeffects.c
+++ b/source/blender/blenkernel/intern/seqeffects.c
@@ -47,7 +47,6 @@
#include "BKE_fcurve.h"
#include "BKE_main.h"
-#include "BKE_plugin_types.h"
#include "BKE_sequencer.h"
#include "BKE_texture.h"
#include "BKE_utildefines.h"
@@ -60,11 +59,6 @@
/* **** XXX **** */
static void error(const char *UNUSED(error), ...) {}
-#define INT 96
-#define FLO 128
-
-/* **** XXX **** */
-
/* Glow effect */
enum {
GlowR = 0,
@@ -122,281 +116,6 @@ static ImBuf *prepare_effect_imbufs(
}
/* **********************************************************************
- * PLUGINS
- * ********************************************************************** */
-
-static void open_plugin_seq(PluginSeq *pis, const char *seqname)
-{
- int (*version)(void);
- void * (*alloc_private)(void);
- char *cp;
-
- /* to be sure: (is tested for) */
- pis->doit = NULL;
- pis->pname = NULL;
- pis->varstr = NULL;
- pis->cfra = NULL;
- pis->version = 0;
- pis->instance_private_data = NULL;
-
- /* clear the error list */
- BLI_dynlib_get_error_as_string(NULL);
-
- /* if (pis->handle) BLI_dynlib_close(pis->handle); */
- /* pis->handle = 0; */
-
- /* open the needed object */
- pis->handle = BLI_dynlib_open(pis->name);
- if (test_dlerr(pis->name, pis->name)) return;
-
- if (pis->handle != NULL) {
- /* find the address of the version function */
- version = (int (*)(void))BLI_dynlib_find_symbol(pis->handle, "plugin_seq_getversion");
- if (test_dlerr(pis->name, "plugin_seq_getversion")) return;
-
- if (version != NULL) {
- pis->version = version();
- if (pis->version >= 2 && pis->version <= 6) {
- int (*info_func)(PluginInfo *);
- PluginInfo *info = (PluginInfo *) MEM_mallocN(sizeof(PluginInfo), "plugin_info");
-
- info_func = (int (*)(PluginInfo *))BLI_dynlib_find_symbol(pis->handle, "plugin_getinfo");
-
- if (info_func == NULL) error("No info func");
- else {
- info_func(info);
-
- pis->pname = info->name;
- pis->vars = info->nvars;
- pis->cfra = info->cfra;
-
- pis->varstr = info->varstr;
-
- pis->doit = (void (*)(void))info->seq_doit;
- if (info->init)
- info->init();
- }
- MEM_freeN(info);
-
- cp = BLI_dynlib_find_symbol(pis->handle, "seqname");
- if (cp) BLI_strncpy(cp, seqname, SEQ_NAME_MAXSTR);
- }
- else {
- printf("Plugin returned unrecognized version number\n");
- return;
- }
- }
- alloc_private = (void * (*)(void))BLI_dynlib_find_symbol(
- pis->handle, "plugin_seq_alloc_private_data");
- if (alloc_private) {
- pis->instance_private_data = alloc_private();
- }
-
- pis->current_private_data = (void **)
- BLI_dynlib_find_symbol(pis->handle, "plugin_private_data");
- }
-}
-
-static PluginSeq *add_plugin_seq(const char *str, const char *seqname)
-{
- PluginSeq *pis;
- VarStruct *varstr;
- int a;
-
- pis = MEM_callocN(sizeof(PluginSeq), "PluginSeq");
-
- BLI_strncpy(pis->name, str, FILE_MAX);
- open_plugin_seq(pis, seqname);
-
- if (pis->doit == NULL) {
- if (pis->handle == NULL) error("no plugin: %s", str);
- else error("in plugin: %s", str);
- MEM_freeN(pis);
- return NULL;
- }
-
- /* default values */
- varstr = pis->varstr;
- for (a = 0; a < pis->vars; a++, varstr++) {
- if ( (varstr->type & FLO) == FLO)
- pis->data[a] = varstr->def;
- else if ( (varstr->type & INT) == INT)
- *((int *)(pis->data + a)) = (int) varstr->def;
- }
-
- return pis;
-}
-
-static void free_plugin_seq(PluginSeq *pis)
-{
- if (pis == NULL) return;
-
- /* no BLI_dynlib_close: same plugin can be opened multiple times with 1 handle */
-
- if (pis->instance_private_data) {
- void (*free_private)(void *);
-
- free_private = (void (*)(void *))BLI_dynlib_find_symbol(
- pis->handle, "plugin_seq_free_private_data");
- if (free_private) {
- free_private(pis->instance_private_data);
- }
- }
-
- MEM_freeN(pis);
-}
-
-static void init_plugin(Sequence *seq, const char *fname)
-{
- seq->plugin = (PluginSeq *)add_plugin_seq(fname, seq->name + 2);
-}
-
-/*
- * FIXME: should query plugin! Could be generator, that needs zero inputs...
- */
-static int num_inputs_plugin(void)
-{
- return 1;
-}
-
-static void load_plugin(Sequence *seq)
-{
- if (seq) {
- open_plugin_seq(seq->plugin, seq->name + 2);
- }
-}
-
-static void copy_plugin(Sequence *dst, Sequence *src)
-{
- if (src->plugin) {
- dst->plugin = MEM_dupallocN(src->plugin);
- open_plugin_seq(dst->plugin, dst->name + 2);
- }
-}
-
-static ImBuf *IMB_cast_away_list(ImBuf *i)
-{
- if (!i) {
- return NULL;
- }
- return (ImBuf *) (((void **) i) + 2);
-}
-
-static ImBuf *do_plugin_effect(
- SeqRenderData context, Sequence *seq, float cfra,
- float facf0, float facf1,
- struct ImBuf *ibuf1, struct ImBuf *ibuf2,
- struct ImBuf *ibuf3)
-{
- char *cp;
- int float_rendering;
- int use_temp_bufs = FALSE; /* Are needed since blur.c (and maybe some other
- * old plugins) do very bad stuff
- * with imbuf-internals */
-
- struct ImBuf *out = prepare_effect_imbufs(context, ibuf1, ibuf2, ibuf3);
- int x = context.rectx;
- int y = context.recty;
-
- if (seq->plugin && seq->plugin->doit) {
-
- if (seq->plugin->cfra)
- *(seq->plugin->cfra) = cfra;
-
- cp = BLI_dynlib_find_symbol(
- seq->plugin->handle, "seqname");
-
- /* XXX: it's crappy to limit copying buffer by it's lemgth,
- * but assuming plugin stuff is using correct buffer size
- * it should be fine */
- if (cp) strncpy(cp, seq->name + 2, sizeof(seq->name) - 2);
-
- if (seq->plugin->current_private_data) {
- *seq->plugin->current_private_data = seq->plugin->instance_private_data;
- }
-
- float_rendering = (out->rect_float != NULL);
-
- if (seq->plugin->version <= 3 && float_rendering) {
- use_temp_bufs = TRUE;
-
- if (ibuf1) {
- ibuf1 = IMB_dupImBuf(ibuf1);
- IMB_rect_from_float(ibuf1);
- imb_freerectfloatImBuf(ibuf1);
- ibuf1->flags &= ~IB_rectfloat;
- }
- if (ibuf2) {
- ibuf2 = IMB_dupImBuf(ibuf2);
- IMB_rect_from_float(ibuf2);
- imb_freerectfloatImBuf(ibuf2);
- ibuf2->flags &= ~IB_rectfloat;
- }
- if (ibuf3) {
- ibuf3 = IMB_dupImBuf(ibuf3);
- IMB_rect_from_float(ibuf3);
- imb_freerectfloatImBuf(ibuf3);
- ibuf3->flags &= ~IB_rectfloat;
- }
- if (!out->rect) imb_addrectImBuf(out);
- imb_freerectfloatImBuf(out);
- out->flags &= ~IB_rectfloat;
- }
-
- if (seq->plugin->version <= 2) {
- if (ibuf1) IMB_convert_rgba_to_abgr(ibuf1);
- if (ibuf2) IMB_convert_rgba_to_abgr(ibuf2);
- if (ibuf3) IMB_convert_rgba_to_abgr(ibuf3);
- }
-
- if (seq->plugin->version <= 4) {
- ((SeqDoit)seq->plugin->doit)(
- seq->plugin->data, facf0, facf1, x, y,
- IMB_cast_away_list(ibuf1),
- IMB_cast_away_list(ibuf2),
- IMB_cast_away_list(out),
- IMB_cast_away_list(ibuf3));
- }
- else {
- ((SeqDoit)seq->plugin->doit)(
- seq->plugin->data, facf0, facf1, x, y,
- ibuf1, ibuf2, out, ibuf3);
- }
-
- if (seq->plugin->version <= 2) {
- if (!use_temp_bufs) {
- if (ibuf1) IMB_convert_rgba_to_abgr(ibuf1);
- if (ibuf2) IMB_convert_rgba_to_abgr(ibuf2);
- if (ibuf3) IMB_convert_rgba_to_abgr(ibuf3);
- }
- IMB_convert_rgba_to_abgr(out);
- }
- if (seq->plugin->version <= 3 && float_rendering) {
- IMB_float_from_rect_simple(out);
- }
-
- if (use_temp_bufs) {
- if (ibuf1) IMB_freeImBuf(ibuf1);
- if (ibuf2) IMB_freeImBuf(ibuf2);
- if (ibuf3) IMB_freeImBuf(ibuf3);
- }
- }
- return out;
-}
-
-static int do_plugin_early_out(struct Sequence *UNUSED(seq),
- float UNUSED(facf0), float UNUSED(facf1))
-{
- return 0;
-}
-
-static void free_plugin(struct Sequence *seq)
-{
- free_plugin_seq(seq->plugin);
- seq->plugin = NULL;
-}
-
-/* **********************************************************************
* ALPHA OVER
* ********************************************************************** */
@@ -3158,11 +2877,6 @@ static void load_noop(struct Sequence *UNUSED(seq))
}
-static void init_plugin_noop(struct Sequence *UNUSED(seq), const char *UNUSED(fname))
-{
-
-}
-
static void free_noop(struct Sequence *UNUSED(seq))
{
@@ -3264,7 +2978,6 @@ static struct SeqEffectHandle get_sequence_effect_impl(int seq_type)
int sequence_type = seq_type;
rval.init = init_noop;
- rval.init_plugin = init_plugin_noop;
rval.num_inputs = num_inputs_default;
rval.load = load_noop;
rval.free = free_noop;
@@ -3352,16 +3065,6 @@ static struct SeqEffectHandle get_sequence_effect_impl(int seq_type)
rval.copy = copy_solid_color;
rval.execute = do_solid_color;
break;
- case SEQ_PLUGIN:
- rval.init_plugin = init_plugin;
- rval.num_inputs = num_inputs_plugin;
- rval.load = load_plugin;
- rval.free = free_plugin;
- rval.copy = copy_plugin;
- rval.execute = do_plugin_effect;
- rval.early_out = do_plugin_early_out;
- rval.get_default_fac = get_default_fac_fade;
- break;
case SEQ_MULTICAM:
rval.num_inputs = num_inputs_multicam;
rval.early_out = early_out_multicam;
diff --git a/source/blender/blenkernel/intern/sequencer.c b/source/blender/blenkernel/intern/sequencer.c
index 63cabf80eae..5318c5514ca 100644
--- a/source/blender/blenkernel/intern/sequencer.c
+++ b/source/blender/blenkernel/intern/sequencer.c
@@ -929,16 +929,6 @@ const char *give_seqname(Sequence *seq)
if (seq->type < SEQ_EFFECT) {
return seq->strip->dir;
}
- else if (seq->type == SEQ_PLUGIN) {
- if (!(seq->flag & SEQ_EFFECT_NOT_LOADED) &&
- seq->plugin && seq->plugin->doit)
- {
- return seq->plugin->pname;
- }
- else {
- return "Plugin";
- }
- }
else {
return "Effect";
}
diff --git a/source/blender/blenkernel/intern/texture.c b/source/blender/blenkernel/intern/texture.c
index 2ec42b47e5c..7081a642b8a 100644
--- a/source/blender/blenkernel/intern/texture.c
+++ b/source/blender/blenkernel/intern/texture.c
@@ -56,7 +56,6 @@
#include "IMB_imbuf.h"
-#include "BKE_plugin_types.h"
#include "BKE_utildefines.h"
#include "BKE_global.h"
#include "BKE_main.h"
@@ -72,137 +71,6 @@
#include "BKE_animsys.h"
#include "BKE_colortools.h"
-
-/* ------------------------------------------------------------------------- */
-
-/* All support for plugin textures: */
-int test_dlerr(const char *name, const char *symbol)
-{
- char *err;
-
- err = BLI_dynlib_get_error_as_string(NULL);
- if (err) {
- printf("var1: %s, var2: %s, var3: %s\n", name, symbol, err);
- return 1;
- }
-
- return 0;
-}
-
-/* ------------------------------------------------------------------------- */
-
-void open_plugin_tex(PluginTex *pit)
-{
- int (*version)(void);
-
- /* init all the happy variables */
- pit->doit = NULL;
- pit->pname = NULL;
- pit->stnames = NULL;
- pit->varstr = NULL;
- pit->result = NULL;
- pit->cfra = NULL;
- pit->version = 0;
- pit->instance_init = NULL;
-
- /* clear the error list */
- BLI_dynlib_get_error_as_string(NULL);
-
- /* no BLI_dynlib_close! multiple opened plugins... */
- /* if (pit->handle) BLI_dynlib_close(pit->handle); */
- /* pit->handle= 0; */
-
- /* open the needed object */
- pit->handle = BLI_dynlib_open(pit->name);
- if (test_dlerr(pit->name, pit->name)) return;
-
- if (pit->handle != NULL) {
- /* find the address of the version function */
- version = (int (*)(void))BLI_dynlib_find_symbol(pit->handle, "plugin_tex_getversion");
- if (test_dlerr(pit->name, "plugin_tex_getversion")) return;
-
- if (version != NULL) {
- pit->version = version();
- if (pit->version >= 2 && pit->version <= 6) {
- int (*info_func)(PluginInfo *);
- PluginInfo *info = (PluginInfo *) MEM_mallocN(sizeof(PluginInfo), "plugin_info");
-
- info_func = (int (*)(PluginInfo *))BLI_dynlib_find_symbol(pit->handle, "plugin_getinfo");
- if (!test_dlerr(pit->name, "plugin_getinfo")) {
- info->instance_init = NULL;
-
- info_func(info);
-
- pit->doit = (int (*)(void))info->tex_doit;
- pit->callback = (void (*)(unsigned short))info->callback;
- pit->stypes = info->stypes;
- pit->vars = info->nvars;
- pit->pname = info->name;
- pit->stnames = info->snames;
- pit->varstr = info->varstr;
- pit->result = info->result;
- pit->cfra = info->cfra;
- pit->instance_init = info->instance_init;
- if (info->init) info->init();
- }
- MEM_freeN(info);
- }
- else {
- printf("Plugin returned unrecognized version number\n");
- return;
- }
- }
- }
-}
-
-/* ------------------------------------------------------------------------- */
-
-/* very badlevel define to bypass linking with BIF_interface.h */
-#define INT 96
-#define FLO 128
-
-PluginTex *add_plugin_tex(char *str)
-{
- PluginTex *pit;
- VarStruct *varstr;
- int a;
-
- pit = MEM_callocN(sizeof(PluginTex), "plugintex");
-
- BLI_strncpy(pit->name, str, sizeof(pit->name));
- open_plugin_tex(pit);
-
- if (pit->doit == NULL) {
- if (pit->handle == NULL) {; } //XXX error("no plugin: %s", str);
- else {; } //XXX error("in plugin: %s", str);
- MEM_freeN(pit);
- return NULL;
- }
-
- varstr = pit->varstr;
- for (a = 0; a < pit->vars; a++, varstr++) {
- if ( (varstr->type & FLO) == FLO)
- pit->data[a] = varstr->def;
- else if ( (varstr->type & INT) == INT)
- *((int *)(pit->data + a)) = (int) varstr->def;
- }
-
- if (pit->instance_init)
- pit->instance_init((void *) pit->data);
-
- return pit;
-}
-
-/* ------------------------------------------------------------------------- */
-
-void free_plugin_tex(PluginTex *pit)
-{
- if (pit == NULL) return;
-
- /* no BLI_dynlib_close: same plugin can be opened multiple times, 1 handle */
- MEM_freeN(pit);
-}
-
/* ****************** Mapping ******************* */
TexMapping *add_tex_mapping(void)
@@ -550,8 +418,6 @@ int colorband_element_remove(struct ColorBand *coba, int index)
void BKE_texture_free(Tex *tex)
{
- free_plugin_tex(tex->plugin);
-
if (tex->coba) MEM_freeN(tex->coba);
if (tex->env) BKE_free_envmap(tex->env);
if (tex->pd) BKE_free_pointdensity(tex->pd);
@@ -573,10 +439,6 @@ void BKE_texture_free(Tex *tex)
void default_tex(Tex *tex)
{
- PluginTex *pit;
- VarStruct *varstr;
- int a;
-
tex->type = TEX_CLOUDS;
tex->stype = 0;
tex->flag = TEX_CHECKER_ODD;
@@ -644,15 +506,6 @@ void default_tex(Tex *tex)
tex->ot->output = TEX_OCN_DISPLACEMENT;
tex->ot->object = NULL;
}
- pit = tex->plugin;
- if (pit) {
- varstr = pit->varstr;
- if (varstr) {
- for (a = 0; a < pit->vars; a++, varstr++) {
- pit->data[a] = varstr->def;
- }
- }
- }
tex->iuser.fie_ima = 2;
tex->iuser.ok = 1;
@@ -833,11 +686,6 @@ Tex *BKE_texture_copy(Tex *tex)
if (texn->type == TEX_IMAGE) id_us_plus((ID *)texn->ima);
else texn->ima = NULL;
- if (texn->plugin) {
- texn->plugin = MEM_dupallocN(texn->plugin);
- open_plugin_tex(texn->plugin);
- }
-
if (texn->coba) texn->coba = MEM_dupallocN(texn->coba);
if (texn->env) texn->env = BKE_copy_envmap(texn->env);
if (texn->pd) texn->pd = BKE_copy_pointdensity(texn->pd);
@@ -865,11 +713,6 @@ Tex *localize_texture(Tex *tex)
/* image texture: BKE_texture_free also doesn't decrease */
- if (texn->plugin) {
- texn->plugin = MEM_dupallocN(texn->plugin);
- open_plugin_tex(texn->plugin);
- }
-
if (texn->coba) texn->coba = MEM_dupallocN(texn->coba);
if (texn->env) {
texn->env = BKE_copy_envmap(texn->env);
@@ -1058,7 +901,7 @@ void autotexname(Tex *tex)
{
Main *bmain = G.main;
char texstr[20][15] = {"None", "Clouds", "Wood", "Marble", "Magic", "Blend",
- "Stucci", "Noise", "Image", "Plugin", "EnvMap", "Musgrave",
+ "Stucci", "Noise", "Image", "EnvMap", "Musgrave",
"Voronoi", "DistNoise", "Point Density", "Voxel Data", "Ocean", "", "", ""};
Image *ima;
char di[FILE_MAXDIR], fi[FILE_MAXFILE];
@@ -1079,7 +922,6 @@ void autotexname(Tex *tex)
}
else new_id(&bmain->tex, (ID *)tex, texstr[tex->type]);
}
- else if (tex->type == TEX_PLUGIN && tex->plugin) new_id(&bmain->tex, (ID *)tex, tex->plugin->pname);
else new_id(&bmain->tex, (ID *)tex, texstr[tex->type]);
}
}
@@ -1565,11 +1407,7 @@ void BKE_free_oceantex(struct OceanTex *ot)
/* ------------------------------------------------------------------------- */
int BKE_texture_dependsOnTime(const struct Tex *texture)
{
- if (texture->plugin) {
- // assume all plugins depend on time
- return 1;
- }
- else if (texture->ima &&
+ if (texture->ima &&
ELEM(texture->ima->source, IMA_SRC_SEQUENCE, IMA_SRC_MOVIE))
{
return 1;
diff --git a/source/blender/blenlib/intern/bpath.c b/source/blender/blenlib/intern/bpath.c
index f90bb4d6152..e6c51ca0786 100644
--- a/source/blender/blenlib/intern/bpath.c
+++ b/source/blender/blenlib/intern/bpath.c
@@ -493,11 +493,6 @@ void BLI_bpath_traverse_id(Main *bmain, ID *id, BPathVisitor visit_cb, const int
case ID_TE:
{
Tex *tex = (Tex *)id;
- if (tex->plugin) {
- /* FIXME: rewrite_path assumes path length of FILE_MAX, but
- * tex->plugin->name is 160. ... is this field even a path? */
- //rewrite_path(tex->plugin->name, visit_cb, bpath_user_data);
- }
if (tex->type == TEX_VOXELDATA && TEX_VD_IS_SOURCE_PATH(tex->vd->file_format)) {
rewrite_path_fixed(tex->vd->source_path, visit_cb, absbase, bpath_user_data);
}
@@ -538,9 +533,6 @@ void BLI_bpath_traverse_id(Main *bmain, ID *id, BPathVisitor visit_cb, const int
rewrite_path_fixed(seq->strip->dir, visit_cb, absbase, bpath_user_data);
}
}
- else if (seq->plugin) {
- rewrite_path_fixed(seq->plugin->name, visit_cb, absbase, bpath_user_data);
- }
}
SEQ_END
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index baa026ae882..a0513cf55b1 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -138,7 +138,6 @@
#include "BKE_screen.h"
#include "BKE_sequencer.h"
#include "BKE_text.h" // for txt_extended_ascii_as_utf8
-#include "BKE_texture.h" // for open_plugin_tex
#include "BKE_tracking.h"
#include "BKE_utildefines.h" // SWITCH_INT DATA ENDB DNA1 O_BINARY GLOB USER TEST REND
#include "BKE_sound.h"
@@ -3164,17 +3163,7 @@ static void direct_link_texture(FileData *fd, Tex *tex)
{
tex->adt = newdataadr(fd, tex->adt);
direct_link_animdata(fd, tex->adt);
-
- tex->plugin = newdataadr(fd, tex->plugin);
- if (tex->plugin) {
- tex->plugin->handle = NULL;
- open_plugin_tex(tex->plugin);
- /* initialize data for this instance, if an initialization
- * function exists.
- */
- if (tex->plugin->instance_init)
- tex->plugin->instance_init((void *)tex->plugin->data);
- }
+
tex->coba = newdataadr(fd, tex->coba);
tex->env = newdataadr(fd, tex->env);
if (tex->env) {
@@ -4957,7 +4946,6 @@ static void direct_link_scene(FileData *fd, Scene *sce)
/* a patch: after introduction of effects with 3 input strips */
if (seq->seq3 == NULL) seq->seq3 = seq->seq2;
- seq->plugin = newdataadr(fd, seq->plugin);
seq->effectdata = newdataadr(fd, seq->effectdata);
if (seq->type & SEQ_EFFECT)
diff --git a/source/blender/blenloader/intern/versioning_250.c b/source/blender/blenloader/intern/versioning_250.c
index 4a69c37ae1b..620d15993a1 100644
--- a/source/blender/blenloader/intern/versioning_250.c
+++ b/source/blender/blenloader/intern/versioning_250.c
@@ -88,7 +88,7 @@
#include "BKE_pointcache.h"
#include "BKE_screen.h"
#include "BKE_sequencer.h"
-#include "BKE_texture.h" // for open_plugin_tex
+#include "BKE_texture.h"
#include "BKE_utildefines.h" // SWITCH_INT DATA ENDB DNA1 O_BINARY GLOB USER TEST REND
#include "BKE_sound.h"
diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c
index 3ce2068d02e..4f75e8e5fbf 100644
--- a/source/blender/blenloader/intern/writefile.c
+++ b/source/blender/blenloader/intern/writefile.c
@@ -1957,7 +1957,6 @@ static void write_textures(WriteData *wd, ListBase *idbase)
if (tex->adt) write_animdata(wd, tex->adt);
/* direct data */
- if (tex->type == TEX_PLUGIN && tex->plugin) writestruct(wd, DATA, "PluginTex", 1, tex->plugin);
if (tex->coba) writestruct(wd, DATA, "ColorBand", 1, tex->coba);
if (tex->type == TEX_ENVMAP && tex->env) writestruct(wd, DATA, "EnvMap", 1, tex->env);
if (tex->type == TEX_POINTDENSITY && tex->pd) {
@@ -2151,7 +2150,6 @@ static void write_scenes(WriteData *wd, ListBase *scebase)
if (seq->strip && seq->strip->done==0) {
/* write strip with 'done' at 0 because readfile */
- if (seq->plugin) writestruct(wd, DATA, "PluginSeq", 1, seq->plugin);
if (seq->effectdata) {
switch (seq->type) {
case SEQ_COLOR:
diff --git a/source/blender/blenpluginapi/CMakeLists.txt b/source/blender/blenpluginapi/CMakeLists.txt
deleted file mode 100644
index 3e40b5bb0e5..00000000000
--- a/source/blender/blenpluginapi/CMakeLists.txt
+++ /dev/null
@@ -1,58 +0,0 @@
-# ***** 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-# The Original Code is Copyright (C) 2006, Blender Foundation
-# All rights reserved.
-#
-# The Original Code is: all of this file.
-#
-# Contributor(s): Jacques Beaurain.
-#
-# ***** END GPL LICENSE BLOCK *****
-
-set(INC
- .
- ..
- ../blenlib
- ../blenloader
- ../imbuf
- ../makesdna
- ../../../intern/guardedalloc
-)
-
-set(INC_SYS
-
-)
-
-set(SRC
- intern/pluginapi.c
-
- documentation.h
- externdef.h
- floatpatch.h
- iff.h
- plugin.h
- util.h
-)
-
-if(WITH_CODEC_QUICKTIME)
- list(APPEND INC_SYS
- ${QUICKTIME_INCLUDE_DIRS}
- )
- add_definitions(-DWITH_QUICKTIME)
-endif()
-
-blender_add_lib(bf_blenpluginapi "${SRC}" "${INC}" "${INC_SYS}")
diff --git a/source/blender/blenpluginapi/SConscript b/source/blender/blenpluginapi/SConscript
deleted file mode 100644
index fe37091bb95..00000000000
--- a/source/blender/blenpluginapi/SConscript
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/usr/bin/python
-Import ('env')
-
-sources = env.Glob('intern/*.c')
-
-incs = '. .. #/intern/guardedalloc ../blenlib ../imbuf ../makesdna ../blenloader'
-
-defs = []
-
-incs += ' ' + env["BF_PTHREADS_INC"]
-
-if env['WITH_BF_QUICKTIME']:
- defs.append('WITH_QUICKTIME')
- incs += ' ' + env['BF_QUICKTIME_INC']
-
-if env['OURPLATFORM'] == 'linux':
- cflags='-pthread'
- incs += ' ../../../extern/binreloc/include'
-
-if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc', 'win64-mingw'):
- incs += ' ' + env['BF_PTHREADS_INC']
-
-env.BlenderLib ( libname = 'bf_blenpluginapi', sources = sources, includes = Split(incs), defines = defs, libtype=['core'], priority = [170] )
diff --git a/source/blender/blenpluginapi/documentation.h b/source/blender/blenpluginapi/documentation.h
deleted file mode 100644
index 8a15109428f..00000000000
--- a/source/blender/blenpluginapi/documentation.h
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * ***** 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
- * All rights reserved.
- *
- * The Original Code is: all of this file.
- *
- * Contributor(s): none yet.
- *
- * ***** END GPL LICENSE BLOCK *****
- */
-
-/**
- * \file blender/blenpluginapi/documentation.h
- * \ingroup blpluginapi
- *
- * \mainpage plugin API - the access point for texture and sequence
- * plugins
- *
- * \section about About the plugin API
- *
- * This API wraps functions that are used by texture and sequence
- * plugins. They are explicitly wrapped in order to make the
- * dependencies to the rest of the system clear.
- *
- * \section issues Known issues with the plugin API
- *
- * - It can be difficult at times to get access to the API functions
- * linked into the final executable. On gcc, the -fpic and -shared
- * flags take care of this. On Irix, -shared is needed, but you also
- * need a reference to the function to get the handle. This has
- * momentarily been taken care of by pluginapi_force_ref().
- *
- * - Plugins need to define three functions that are needed for
- * version bookkeeping and information. The plugin loading code
- * explicitly checks for these functions. The nanes depend on whether
- * it is a texture or sequence plugin.
- *
- * - The plugin loading occurs in sequence.c and texture.c. The
- * following functions are involved:
- * - open_plugin_seq() (used in readfile.c, editseq.c, sequence.c)
- * - add_plugin_seq() (used in editseq.c, sequence.c)
- * - free_plugin_seq() (used in editseq.c, sequence.c)
- * - open_plugin_tex() (used in texture.c, readfile.c)
- * - add_plugin_tex() (used in texture.c, buttons.c)
- * - free_plugin_tex() (used in texture.c, buttons.c)
- * - test_dlerr() (used in texture.c, sequence.c)
- * Since the plugins are about to phase out, we will not sanitize this
- * code. It will be removed as soon as the replacing system is in
- * place.
- *
- * \section dependencies Dependencies
- *
- * The plugins wraps functions from IMB and BLI. In addition, they
- * define some useful variables.
- */
diff --git a/source/blender/blenpluginapi/externdef.h b/source/blender/blenpluginapi/externdef.h
deleted file mode 100644
index 154b276c851..00000000000
--- a/source/blender/blenpluginapi/externdef.h
+++ /dev/null
@@ -1,50 +0,0 @@
-/* Copyright (c) 1999, Not a Number / NeoGeo b.v.
- *
- * All rights reserved.
- *
- * Contact: info@blender.org
- * Information: http://www.blender.org
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#ifndef __EXTERNDEF_H__
-#define __EXTERNDEF_H__
-
-/** \file blender/blenpluginapi/externdef.h
- * \ingroup blpluginapi
- */
-
-#ifdef WIN32
- #ifdef PLUGIN_INTERN
- #define LIBEXPORT __declspec(dllexport)
- #define LIBIMPORT __declspec(dllexport)
- #else
- #define LIBEXPORT __declspec(dllexport)
- #define LIBIMPORT extern __declspec(dllimport)
- #endif
-#elif !defined(WIN32)
- #define LIBEXPORT extern
- #define LIBIMPORT extern
-#endif
-
-#endif /* __EXTERNDEF_H__ */
diff --git a/source/blender/blenpluginapi/floatpatch.h b/source/blender/blenpluginapi/floatpatch.h
deleted file mode 100644
index d1c7edcc307..00000000000
--- a/source/blender/blenpluginapi/floatpatch.h
+++ /dev/null
@@ -1,93 +0,0 @@
-/* Copyright (c) 1999, Not a Number / NeoGeo b.v.
- *
- * All rights reserved.
- *
- * Contact: info@blender.org
- * Information: http://www.blender.org
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#ifndef __FLOATPATCH_H__
-#define __FLOATPATCH_H__
-
-/** \file blender/blenpluginapi/floatpatch.h
- * \ingroup blpluginapi
- */
-
-/* floating point libs differ at systems... with these defines it comilies at all! */
-
-#ifdef MIPS1
-#else
-
-#define fabsf(a) fabs((double)(a))
-
-#define facos acosf
-#define acosf(a) acos((double)(a))
-
-#define fasin asinf
-#define asinf(a) asin((double)(a))
-
-#define fatan atanf
-#define atanf(a) atan((double)(a))
-
-#define fatan2 atan2f
-#define atan2f(a, b) atan2((double)(a), (double)(b))
-
-#define fmodf(a, b) fmod((double)(a), (double)(b))
-
-#define fcos cosf
-#define cosf(a) cos((double)(a))
-
-#define fsin sinf
-#define sinf(a) sin((double)(a))
-
-#define ftan tanf
-#define tanf(a) tan((double)(a))
-
-#define fexp expf
-#define expf(a) exp((double)(a))
-
-#define flog logf
-#define logf(a) log((double)(a))
-
-#define flog10 log10f
-#define log10f(a) log10((double)(a))
-
-#define fsqrt sqrtf
-#define sqrtf(a) sqrt((double)(a))
-
-#define fceil ceilf
-#define ceilf(a) ceil((double)(a))
-
-#define ffloor floorf
-#define floorf(a) floor((double)(a))
-
-#define fpow powf
-#define powf(a, b) pow((double)(a), (double)(b))
-
-/* #endif */
-
-#endif
-
-#endif /* __FLOATPATCH_H__ */
-
diff --git a/source/blender/blenpluginapi/iff.h b/source/blender/blenpluginapi/iff.h
deleted file mode 100644
index 63d60ce7c82..00000000000
--- a/source/blender/blenpluginapi/iff.h
+++ /dev/null
@@ -1,122 +0,0 @@
-/* Copyright (c) 1999, Not a Number / NeoGeo b.v.
- *
- * All rights reserved.
- *
- * Contact: info@blender.org
- * Information: http://www.blender.org
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#ifndef __IFF_H__
-#define __IFF_H__
-
-/** \file blender/blenpluginapi/iff.h
- * \ingroup blpluginapi
- */
-
-#include <sys/types.h>
-#include "util.h"
-#include "externdef.h"
-
-struct ImMetaData;
-
-#define IB_MIPMAP_LEVELS 20
-#define IB_FILENAME_SIZE 1023
-
-typedef struct ImBuf {
- struct ImBuf *next, *prev; /**< allow lists of ImBufs, for caches or flipbooks */
- short x, y; /**< width and Height of our image buffer */
- unsigned char depth; /**< Active amount of bits/bitplanes */
- unsigned int *rect; /**< pixel values stored here */
- unsigned int *crect; /**< color corrected pixel values stored here */
- int flags; /**< Controls which components should exist. */
- int mall; /**< what is malloced internal, and can be freed */
- int *zbuf; /**< z buffer data, original zbuffer */
- float *zbuf_float; /**< z buffer data, camera coordinates */
- void *userdata; /**< temporary storage, only used by baking at the moment */
- unsigned char *encodedbuffer; /**< Compressed image only used with png currently */
- unsigned int encodedsize; /**< Size of data written to encodedbuffer */
- unsigned int encodedbuffersize; /**< Size of encodedbuffer */
-
- float *rect_float; /** < floating point Rect equivalent
- * Linear RGB color space - may need gamma correction to
- * sRGB when generating 8bit representations */
- int channels; /**< amount of channels in rect_float (0 = 4 channel default) */
- float dither; /**< random dither value, for conversion from float -> byte rect */
- short profile; /** color space/profile preset that the byte rect buffer represents */
- char profile_filename[1024]; /** to be implemented properly, specific filename for custom profiles */
-
- /* mipmapping */
- struct ImBuf *mipmap[IB_MIPMAP_LEVELS]; /**< MipMap levels, a series of halved images */
- int miplevels;
-
- /* externally used flags */
- int index; /* reference index for ImBuf lists */
- int userflags; /* used to set imbuf to dirty and other stuff */
- struct ImMetaData *metadata;
-
- /* file information */
- int ftype; /* file type we are going to save as */
- char name[IB_FILENAME_SIZE]; /* filename associated with this image */
-
- /* memory cache limiter */
- struct MEM_CacheLimiterHandle_s *c_handle; /* handle for cache limiter */
- int refcounter; /* reference counter for multiple users */
-} ImBuf;
-
-LIBIMPORT struct ImBuf *allocImBuf(short, short, uchar, uint);
-LIBIMPORT struct ImBuf *dupImBuf(struct ImBuf *);
-LIBIMPORT void freeImBuf(struct ImBuf*);
-
-LIBIMPORT short saveiff(struct ImBuf *, char *, int);
-
-LIBIMPORT struct ImBuf *loadifffile(int, int);
-LIBIMPORT struct ImBuf *loadiffname(char *, int);
-LIBIMPORT struct ImBuf *testiffname(char *, int);
-
-LIBIMPORT struct ImBuf *onehalf(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 *);
-
-LIBIMPORT int ispic(char *);
-
-LIBIMPORT struct ImBuf *scaleImBuf(struct ImBuf *, short, short);
-LIBIMPORT struct ImBuf *scalefastImBuf(struct ImBuf *, short, short);
-
-LIBIMPORT void de_interlace(struct ImBuf *ib);
-LIBIMPORT void interlace(struct ImBuf *ib);
-
-LIBIMPORT void IMB_rectcpy(struct ImBuf *dbuf, struct ImBuf *sbuf,
- int destx, int desty, int srcx, int srcy, int width, int height);
-
-LIBIMPORT void IMB_rectfill(struct ImBuf *drect, const float col[4]);
-LIBIMPORT void IMB_rectfill_area(struct ImBuf *ibuf, const float col[4], int x1, int y1, int x2, int y2);
-LIBIMPORT void buf_rectfill_area(unsigned char *rect, float *rectf, int width, int height, const float col[4], int x1, int y1, int x2, int y2);
-LIBIMPORT void IMB_rectfill_alpha(struct ImBuf *drect, const float value);
-
-#endif /* __IFF_H__ */
-
diff --git a/source/blender/blenpluginapi/intern/pluginapi.c b/source/blender/blenpluginapi/intern/pluginapi.c
deleted file mode 100644
index efdd11352c6..00000000000
--- a/source/blender/blenpluginapi/intern/pluginapi.c
+++ /dev/null
@@ -1,305 +0,0 @@
-/*
- * ***** 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
- * All rights reserved.
- *
- * The Original Code is: all of this file.
- *
- * Contributor(s): none yet.
- *
- * ***** END GPL LICENSE BLOCK *****
- * Wrappers for the plugin api. This api is up for removal.
- */
-
-/** \file blender/blenpluginapi/intern/pluginapi.c
- * \ingroup blenpluginapi
- */
-
-
-/* There are four headers making up the plugin api:
- * - floatpatch.h : Wraps math functions for mips platforms, no code
- * required.
- * - iff.h : Defines, macros and functions for dealing
- * with image buffer things.
- * - plugin.h : Wraps some plugin handling types, accesses noise
- * functions.
- * - util.h : Useful defines, memory management.
- */
-
-#define PLUGIN_INTERN /* This tells the LIBEXPORT macro to compile with
- * dll export set on windows */
-
-#ifdef WIN32
-#include "blenpluginapi/util.h"
-#else
-#include "blenpluginapi/util.h"
-#endif
-#include "iff.h"
-#include "plugin.h"
-#include "MEM_guardedalloc.h"
-
-#include "BLO_sys_types.h" // needed for intptr_t
-
-#include "BLI_blenlib.h" /* util and noise functions */
-#include "BLI_threads.h" /* For threadsfe guardedalloc malloc/calloc/free */
-#include "IMB_imbuf.h" /* image buffer stuff */
-#define GET_INT_FROM_POINTER(i) ((int)(intptr_t)(i)) /* should use BKE_utildefines.h */
-
-/* -------------------------------------------------------------------------- */
-/* stuff from util.h */
-/* -------------------------------------------------------------------------- */
-
-LIBEXPORT void *mallocN(int len, char *str)
-{
- return MEM_mallocN(len, str);
-}
-
-LIBEXPORT void *callocN(int len, char *str)
-{
- return MEM_callocN(len, str);
-}
-
-LIBEXPORT short freeN(void *vmemh)
-{
- return MEM_freeN(vmemh);
-}
-
-/* these are not needed anymore, mallocN/callocN/freeN is now threadsafe */
-LIBEXPORT void *mallocT(int len, char *str)
-{
- return MEM_mallocN(len, str);
-}
-
-LIBEXPORT void *callocT(int len, char *str)
-{
- return MEM_callocN(len, str);
-}
-
-LIBEXPORT void freeT(void *vmemh)
-{
- MEM_freeN(vmemh);
- return;
-}
-
-
-/* -------------------------------------------------------------------------- */
-/* stuff from iff.h */
-/* -------------------------------------------------------------------------- */
-
-LIBEXPORT struct ImBuf *allocImBuf(short x,
- short y,
- uchar d,
- uint flags)
-{
- return IMB_allocImBuf(x, y, d, flags);
-}
-
-
-LIBEXPORT struct ImBuf *dupImBuf(struct ImBuf *ib)
-{
- return IMB_dupImBuf(ib);
-}
-
-LIBEXPORT void freeImBuf(struct ImBuf* ib)
-{
- IMB_freeImBuf(ib);
-}
-
-LIBEXPORT short saveiff(struct ImBuf *ib,
- char *c,
- int i)
-{
- return IMB_saveiff(ib, c, i);
-}
-
-LIBEXPORT struct ImBuf *loadifffile(int a,
- int b)
-{
- return IMB_loadifffile(a, b, "loadifffile");
-}
-
-LIBEXPORT struct ImBuf *loadiffname(char *n,
- int flags)
-{
- return IMB_loadiffname(n, flags);
-}
-
-LIBEXPORT struct ImBuf *testiffname(char *n,
- int flags)
-{
- return IMB_testiffname(n, flags);
-}
-
-LIBEXPORT struct ImBuf *onehalf(struct ImBuf *ib)
-{
- return IMB_onehalf(ib);
-}
-
-LIBEXPORT struct ImBuf *half_x(struct ImBuf *ib)
-{
- return IMB_half_x(ib);
-}
-
-LIBEXPORT struct ImBuf *half_y(struct ImBuf *ib)
-{
- return IMB_half_y(ib);
-}
-
-LIBEXPORT struct ImBuf *double_x(struct ImBuf *ib)
-{
- return IMB_double_x(ib);
-}
-
-LIBEXPORT struct ImBuf *double_y(struct ImBuf *ib)
-{
- return IMB_double_y(ib);
-}
-
-LIBEXPORT struct ImBuf *double_fast_x(struct ImBuf *ib)
-{
- return IMB_double_fast_x(ib);
-}
-
-LIBEXPORT struct ImBuf *double_fast_y(struct ImBuf *ib)
-{
- return IMB_double_fast_y(ib);
-}
-
-LIBEXPORT int ispic(char * name)
-{
- return IMB_ispic(name);
-}
-
-/* still the same name */
-/* void (*ditherfunc)(struct ImBuf *, short, short) {} */
-
-LIBEXPORT struct ImBuf *scaleImBuf(struct ImBuf *ib,
- short nx,
- short ny)
-{
- return IMB_scaleImBuf(ib, nx, ny);
-}
-
-LIBEXPORT struct ImBuf *scalefastImBuf(struct ImBuf *ib,
- short x,
- short y)
-{
- return IMB_scalefastImBuf(ib, x, y);
-}
-
- /* Extra ones that some NaN (read Ton) plugins use,
- * even though they aren't in the header
- */
-
-LIBEXPORT void interlace(struct ImBuf *ibuf)
-{
- IMB_interlace(ibuf);
-}
-
-LIBEXPORT void de_interlace(struct ImBuf *ib)
-{
- IMB_de_interlace(ib);
-}
-
-/* -------------------------------------------------------------------------- */
-/* stuff from plugin.h */
-/* -------------------------------------------------------------------------- */
-
-/* These three need to be defined in the plugin itself. The plugin
- * loader looks for these functions to check whether it can use the
- * plugin. For sequences, something similar exists. */
-/* int plugin_tex_getversion(void); */
-/* int plugin_seq_getversion(void); */
-/* void plugin_getinfo(PluginInfo *); */
-
-LIBEXPORT float hnoise(float noisesize,
- float x,
- float y,
- float z)
-{
- return BLI_hnoise(noisesize, x, y, z);
-}
-
-LIBEXPORT float hnoisep(float noisesize,
- float x,
- float y,
- float z)
-{
- return BLI_hnoisep(noisesize, x, y, z);
-}
-
-LIBEXPORT float turbulence(float noisesize,
- float x,
- float y,
- float z,
- int depth)
-{
- return BLI_turbulence(noisesize, x, y, z, depth);
-}
-
-LIBEXPORT float turbulence1(float noisesize,
- float x,
- float y,
- float z,
- int depth)
-{
- return BLI_turbulence1(noisesize, x, y, z, depth);
-}
-
-/* -------------------------------------------------------------------------- */
-
- /* Stupid hack - force the inclusion of all of the
- * above functions in the binary by 'using' each one...
- * Otherwise they will not be imported from the archive
- * library on Unix. -zr
- */
-int pluginapi_force_ref(void);
-
-int pluginapi_force_ref(void)
-{
- return
- GET_INT_FROM_POINTER(mallocN) +
- GET_INT_FROM_POINTER(callocN) +
- GET_INT_FROM_POINTER(freeN) +
- GET_INT_FROM_POINTER(mallocT) +
- GET_INT_FROM_POINTER(callocT) +
- GET_INT_FROM_POINTER(freeT) +
- GET_INT_FROM_POINTER(allocImBuf) +
- GET_INT_FROM_POINTER(dupImBuf) +
- GET_INT_FROM_POINTER(freeImBuf) +
- GET_INT_FROM_POINTER(saveiff) +
- GET_INT_FROM_POINTER(loadifffile) +
- GET_INT_FROM_POINTER(loadiffname) +
- GET_INT_FROM_POINTER(testiffname) +
- GET_INT_FROM_POINTER(onehalf) +
- GET_INT_FROM_POINTER(half_x) +
- GET_INT_FROM_POINTER(half_y) +
- GET_INT_FROM_POINTER(double_x) +
- GET_INT_FROM_POINTER(double_y) +
- GET_INT_FROM_POINTER(double_fast_x) +
- GET_INT_FROM_POINTER(double_fast_y) +
- GET_INT_FROM_POINTER(ispic) +
- GET_INT_FROM_POINTER(scaleImBuf) +
- GET_INT_FROM_POINTER(scalefastImBuf) +
- GET_INT_FROM_POINTER(hnoise) +
- GET_INT_FROM_POINTER(hnoisep) +
- GET_INT_FROM_POINTER(turbulence) +
- GET_INT_FROM_POINTER(turbulence1) +
- GET_INT_FROM_POINTER(de_interlace) +
- GET_INT_FROM_POINTER(interlace);
-}
diff --git a/source/blender/blenpluginapi/plugin.DEF b/source/blender/blenpluginapi/plugin.DEF
deleted file mode 100644
index ae2692c7cff..00000000000
--- a/source/blender/blenpluginapi/plugin.DEF
+++ /dev/null
@@ -1,40 +0,0 @@
-LIBRARY
-EXPORTS
-mallocN
-callocN
-freeN
-mallocT
-callocT
-freeT
-hnoise
-hnoisep
-turbulence
-turbulence1
-allocImBuf
-dupImBuf
-freeImBuf
-converttocmap
-saveiff
-loadiffmem
-loadifffile
-loadiffname
-testiffname
-onehalf
-onethird
-halflace
-half_x
-half_y
-double_x
-double_y
-double_fast_x
-double_fast_y
-ispic
-dit2
-dit0
-scaleImBuf
-scalefastImBuf
-scalefieldImBuf
-scalefastfieldImBuf
-de_interlace
-interlace
-gamwarp
diff --git a/source/blender/blenpluginapi/plugin.h b/source/blender/blenpluginapi/plugin.h
deleted file mode 100644
index d7acb988ccd..00000000000
--- a/source/blender/blenpluginapi/plugin.h
+++ /dev/null
@@ -1,107 +0,0 @@
-/* Copyright (c) 1999, Not a Number / NeoGeo b.v.
- *
- * All rights reserved.
- *
- * Contact: info@blender.org
- * Information: http://www.blender.org
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#ifndef __PLUGIN_H__
-#define __PLUGIN_H__
-
-/** \file blender/blenpluginapi/plugin.h
- * \ingroup blpluginapi
- */
-
-#include "externdef.h"
-#include "iff.h"
-#include "util.h"
-#include "floatpatch.h"
-
-#define B_PLUGIN_VERSION 6
-
-typedef int (*TexDoit)(int, void*, float*, float*, float*, float*);
-typedef int (*TexDoitold)(int, void*, float*, float*, float*);
-typedef void (*SeqDoit)(void*, float, float, int, int, ImBuf*, ImBuf*, ImBuf*, ImBuf*);
-
-typedef struct VarStruct {
- int type;
- char name[16];
- float def, min, max;
- char tip[80];
-} VarStruct;
-
-typedef struct _PluginInfo {
- char *name;
- char *snames;
-
- int stypes;
- int nvars;
- VarStruct *varstr;
- float *result;
- float *cfra;
-
- void (*init)(void);
- void (*callback)(int);
- TexDoit tex_doit;
- SeqDoit seq_doit;
-
- void (*instance_init)(void *);
-} PluginInfo;
-
-LIBEXPORT int plugin_tex_getversion(void);
-LIBEXPORT int plugin_seq_getversion(void);
-LIBEXPORT void plugin_getinfo(PluginInfo *);
-
-/* *************** defines for button types ************** */
-
-#define CHA 32
-#define INT 96
-#define FLO 128
-
-#define TOG (3<<9)
-#define NUM (5<<9)
-#define LABEL (10<<9)
-#define NUMSLI (14<<9)
-#define COL (15<<9)
-
-/* return values (bitfield like) for textures (DNA_texture_types.h) */
-#define TEX_INT 0
-#define TEX_RGB 1
-#define TEX_NOR 2
-
-/* *************** API functions ******************** */
-
- /* derived from the famous Perlin noise */
-LIBIMPORT float hnoise(float noisesize, float x, float y, float z);
- /* the original Perlin noise */
-LIBIMPORT float hnoisep(float noisesize, float x, float y, float z);
-
- /* soft turbulence */
-LIBIMPORT float turbulence(float noisesize, float x, float y, float z, int depth);
- /* hard turbulence */
-LIBIMPORT float turbulence1(float noisesize, float x, float y, float z, int depth);
-
-#endif /* __PLUGIN_H__ */
-
diff --git a/source/blender/blenpluginapi/util.h b/source/blender/blenpluginapi/util.h
deleted file mode 100644
index 68f9626ac24..00000000000
--- a/source/blender/blenpluginapi/util.h
+++ /dev/null
@@ -1,103 +0,0 @@
-/* Copyright (c) 1999, Not a Number / NeoGeo b.v.
- *
- * All rights reserved.
- *
- * Contact: info@blender.org
- * Information: http://www.blender.org
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-/** \file blender/blenpluginapi/util.h
- * \ingroup blpluginapi
- */
-
-#ifndef __UTIL_H__
-#define __UTIL_H__
-
-#include <sys/types.h>
-#include <stdlib.h>
-#include <string.h>
-#include "externdef.h"
-
-#ifndef NULL
-#define NULL 0
-#endif
-
-#ifndef FALSE
-#define FALSE 0
-#endif
-
-#ifndef TRUE
-#define TRUE 1
-#endif
-
-#ifndef ulong
-#define ulong unsigned long
-#endif
-
-#ifndef ushort
-#define ushort unsigned short
-#endif
-
-#ifndef uchar
-#define uchar unsigned char
-#endif
-
-#ifndef uint
-#define uint unsigned int
-#endif
-
-#define MIN2(x,y) ( (x)<(y) ? (x) : (y) )
-#define MIN3(x,y,z) MIN2( MIN2((x),(y)) , (z) )
-#define MIN4(x,y,z,a) MIN2( MIN2((x),(y)) , MIN2((z),(a)) )
-
-#define MAX2(x,y) ( (x)>(y) ? (x) : (y) )
-#define MAX3(x,y,z) MAX2( MAX2((x),(y)) , (z) )
-#define MAX4(x,y,z,a) MAX2( MAX2((x),(y)) , MAX2((z),(a)) )
-
-#define SWAP(type, a, b) { type sw_ap; sw_ap=(a); (a)=(b); (b)=sw_ap; } (void)0
-
-#define ABS(x) ((x) < 0 ? -(x) : (x))
-#define FLOOR(x) ((int)(x) - ((x) < 0 && (x) != (int)(x)))
-#define CEIL(x) ((int)(x) + ((x) > 0 && (x) != (int)(x)))
-#define STEP(a,b) ( (a)>(b) ? (1) : (0) )
-#define CLAMP(val, low, high) ((val>high)?high:((val<low)?low:val))
-#define LERP(t,x0,x1) ((x0) + (t)*((x1)-(x0)))
-#define PULSE(a,b,x) (STEP((a),(x)) - STEP((b),(x)))
-#define BOXSTEP(a,b,x) CLAMP(((x)-(a))/((b)-(a)),0,1)
-
-#define PRINT(d, var1) printf(# var1 ":%" # d "\n", var1)
-#define PRINT2(d, e, var1, var2) printf(# var1 ":%" # d " " # var2 ":%" # e "\n", var1, var2)
-#define PRINT3(d, e, f, var1, var2, var3) printf(# var1 ":%" # d " " # var2 ":%" # e " " # var3 ":%" # f "\n", var1, var2, var3)
-#define PRINT4(d, e, f, g, var1, var2, var3, var4) printf(# var1 ":%" # d " " # var2 ":%" # e " " # var3 ":%" # f " " # var4 ":%" # g "\n", var1, var2, var3, var4)
-
-LIBEXPORT void *mallocN(int len, char *str);
-LIBEXPORT void *callocN(int len, char *str);
-LIBEXPORT short freeN(void *vmemh);
-
-LIBEXPORT void *mallocT(int len, char *str);
-LIBEXPORT void *callocT(int len, char *str);
-LIBEXPORT void freeT(void *vmemh);
-
-#endif /* __UTIL_H__ */
-
diff --git a/source/blender/editors/include/UI_resources.h b/source/blender/editors/include/UI_resources.h
index 2d409879ba3..852adc58762 100644
--- a/source/blender/editors/include/UI_resources.h
+++ b/source/blender/editors/include/UI_resources.h
@@ -154,7 +154,6 @@ enum {
TH_SEQ_SCENE,
TH_SEQ_AUDIO,
TH_SEQ_EFFECT,
- TH_SEQ_PLUGIN,
TH_SEQ_TRANSITION,
TH_SEQ_META,
TH_SEQ_PREVIEW,
diff --git a/source/blender/editors/interface/resources.c b/source/blender/editors/interface/resources.c
index edad33953b9..b1f353b2808 100644
--- a/source/blender/editors/interface/resources.c
+++ b/source/blender/editors/interface/resources.c
@@ -378,8 +378,6 @@ const unsigned char *UI_ThemeGetColorPtr(bTheme *btheme, int spacetype, int colo
cp = ts->audio; break;
case TH_SEQ_EFFECT:
cp = ts->effect; break;
- case TH_SEQ_PLUGIN:
- cp = ts->plugin; break;
case TH_SEQ_TRANSITION:
cp = ts->transition; break;
case TH_SEQ_META:
@@ -775,7 +773,6 @@ void ui_theme_init_default(void)
rgba_char_args_set(btheme->tseq.scene, 78, 152, 62, 255);
rgba_char_args_set(btheme->tseq.audio, 46, 143, 143, 255);
rgba_char_args_set(btheme->tseq.effect, 169, 84, 124, 255);
- rgba_char_args_set(btheme->tseq.plugin, 126, 126, 80, 255);
rgba_char_args_set(btheme->tseq.transition, 162, 95, 111, 255);
rgba_char_args_set(btheme->tseq.meta, 109, 145, 131, 255);
rgba_char_args_set(btheme->tseq.preview_back, 0, 0, 0, 255);
@@ -1369,7 +1366,6 @@ void init_userdef_do_versions(void)
rgba_char_args_set(btheme->tseq.scene, 78, 152, 62, 255);
rgba_char_args_set(btheme->tseq.audio, 46, 143, 143, 255);
rgba_char_args_set(btheme->tseq.effect, 169, 84, 124, 255);
- rgba_char_args_set(btheme->tseq.plugin, 126, 126, 80, 255);
rgba_char_args_set(btheme->tseq.transition, 162, 95, 111, 255);
rgba_char_args_set(btheme->tseq.meta, 109, 145, 131, 255);
}
diff --git a/source/blender/editors/space_sequencer/sequencer_add.c b/source/blender/editors/space_sequencer/sequencer_add.c
index 3861e2670f1..9eb4c62789e 100644
--- a/source/blender/editors/space_sequencer/sequencer_add.c
+++ b/source/blender/editors/space_sequencer/sequencer_add.c
@@ -740,20 +740,7 @@ static int sequencer_add_effect_strip_exec(bContext *C, wmOperator *op)
seq->strip = strip = MEM_callocN(sizeof(Strip), "strip");
strip->us = 1;
- if (seq->type == SEQ_PLUGIN) {
- char path[FILE_MAX];
- RNA_string_get(op->ptr, "filepath", path);
-
- sh.init_plugin(seq, path);
-
- if (seq->plugin == NULL) {
- BLI_remlink(ed->seqbasep, seq);
- seq_free_sequence(scene, seq);
- BKE_reportf(op->reports, RPT_ERROR, "Sequencer plugin \"%s\" could not load", path);
- return OPERATOR_CANCELLED;
- }
- }
- else if (seq->type == SEQ_COLOR) {
+ if (seq->type == SEQ_COLOR) {
SolidColorVars *colvars = (SolidColorVars *)seq->effectdata;
RNA_float_get_array(op->ptr, "color", colvars->col);
seq->blend_mode = SEQ_CROSS; /* so alpha adjustment fade to the strip below */
@@ -824,14 +811,7 @@ static int sequencer_add_effect_strip_invoke(bContext *C, wmOperator *op, wmEven
sequencer_generic_invoke_xy__internal(C, op, event, prop_flag);
- if (is_type_set && type == SEQ_PLUGIN) {
- /* only plugins need the file selector */
- WM_event_add_fileselect(C, op);
- return OPERATOR_RUNNING_MODAL;
- }
- else {
- return sequencer_add_effect_strip_exec(C, op);
- }
+ return sequencer_add_effect_strip_exec(C, op);
}
void SEQUENCER_OT_effect_strip_add(struct wmOperatorType *ot)
diff --git a/source/blender/editors/space_sequencer/sequencer_draw.c b/source/blender/editors/space_sequencer/sequencer_draw.c
index 392e7793a0f..236baea01be 100644
--- a/source/blender/editors/space_sequencer/sequencer_draw.c
+++ b/source/blender/editors/space_sequencer/sequencer_draw.c
@@ -153,10 +153,6 @@ static void get_seq_color3ubv(Scene *curscene, Sequence *seq, unsigned char col[
col[0] = col[1] = col[2] = 128;
}
break;
-
- case SEQ_PLUGIN:
- UI_GetThemeColor3ubv(TH_SEQ_PLUGIN, col);
- break;
case SEQ_SOUND:
UI_GetThemeColor3ubv(TH_SEQ_AUDIO, col);
@@ -563,22 +559,8 @@ static void draw_seq_text(View2D *v2d, Sequence *seq, float x1, float x2, float
seq->len, name, seq->strip->dir, seq->strip->stripdata->name);
}
else if (seq->type & SEQ_EFFECT) {
- int can_float = (seq->type != SEQ_PLUGIN) || (seq->plugin && seq->plugin->version >= 4);
-
- if (seq->seq3 != seq->seq2 && seq->seq1 != seq->seq3) {
- BLI_snprintf(str, sizeof(str), "%d | %s: %d>%d (use %d)%s",
- seq->len, name, seq->seq1->machine, seq->seq2->machine, seq->seq3->machine,
- can_float ? "" : " No float, upgrade plugin!");
- }
- else if (seq->seq1 && seq->seq2) {
- BLI_snprintf(str, sizeof(str), "%d | %s: %d>%d%s",
- seq->len, name, seq->seq1->machine, seq->seq2->machine,
- can_float ? "" : " No float, upgrade plugin!");
- }
- else {
- BLI_snprintf(str, sizeof(str), "%d | %s",
+ BLI_snprintf(str, sizeof(str), "%d | %s",
seq->len, name);
- }
}
else if (seq->type == SEQ_SOUND) {
if (seq->sound)
diff --git a/source/blender/editors/space_sequencer/sequencer_edit.c b/source/blender/editors/space_sequencer/sequencer_edit.c
index 778bddb545a..072cfa00622 100644
--- a/source/blender/editors/space_sequencer/sequencer_edit.c
+++ b/source/blender/editors/space_sequencer/sequencer_edit.c
@@ -231,27 +231,6 @@ void seq_rectf(Sequence *seq, rctf *rectf)
rectf->ymax = seq->machine + SEQ_STRIP_OFSTOP;
}
-static void UNUSED_FUNCTION(change_plugin_seq) (Scene * scene, char *str) /* called from fileselect */
-{
- Editing *ed = BKE_sequencer_editing_get(scene, FALSE);
- struct SeqEffectHandle sh;
- Sequence *last_seq = BKE_sequencer_active_get(scene);
-
- if (last_seq == NULL || last_seq->type != SEQ_PLUGIN) return;
-
- sh = get_sequence_effect(last_seq);
- sh.free(last_seq);
- sh.init_plugin(last_seq, str);
-
- last_seq->machine = MAX3(last_seq->seq1->machine,
- last_seq->seq2->machine,
- last_seq->seq3->machine);
-
- if (seq_test_overlap(ed->seqbasep, last_seq) ) shuffle_seq(ed->seqbasep, last_seq, scene);
-
-}
-
-
void boundbox_seq(Scene *scene, rctf *rect)
{
Sequence *seq;
diff --git a/source/blender/imbuf/IMB_imbuf_types.h b/source/blender/imbuf/IMB_imbuf_types.h
index 12d71be658e..2cb1dfe149a 100644
--- a/source/blender/imbuf/IMB_imbuf_types.h
+++ b/source/blender/imbuf/IMB_imbuf_types.h
@@ -55,13 +55,8 @@ struct ImMetaData;
* This is the abstraction of an image. ImBuf is the basic type used for all
* imbuf operations.
*
- * REMINDER: if any changes take place, they need to be carried over
- * to source/blender/blenpluginapi/iff.h too, OTHERWISE PLUGINS WON'T
- * WORK CORRECTLY!
- *
* Also; add new variables to the end to save pain!
*
- * Also, that iff.h needs to be in the final release "plugins/include" dir, too!
*/
typedef struct ImBuf {
struct ImBuf *next, *prev; /**< allow lists of ImBufs, for caches or flipbooks */
diff --git a/source/blender/makesdna/DNA_sequence_types.h b/source/blender/makesdna/DNA_sequence_types.h
index cd73b692011..2543ff18b2e 100644
--- a/source/blender/makesdna/DNA_sequence_types.h
+++ b/source/blender/makesdna/DNA_sequence_types.h
@@ -339,7 +339,7 @@ typedef struct SpeedControlVars {
#define SEQ_GAMCROSS 13
#define SEQ_MUL 14
#define SEQ_OVERDROP 15
-#define SEQ_PLUGIN 24
+// #define SEQ_PLUGIN 24 /* Deprecated */
#define SEQ_WIPE 25
#define SEQ_GLOW 26
#define SEQ_TRANSFORM 27
diff --git a/source/blender/makesdna/DNA_texture_types.h b/source/blender/makesdna/DNA_texture_types.h
index 7497f5e7449..05053131eb0 100644
--- a/source/blender/makesdna/DNA_texture_types.h
+++ b/source/blender/makesdna/DNA_texture_types.h
@@ -324,7 +324,7 @@ typedef struct ColorMapping {
#define TEX_STUCCI 6
#define TEX_NOISE 7
#define TEX_IMAGE 8
-#define TEX_PLUGIN 9
+//#define TEX_PLUGIN 9 /* Deprecated */
#define TEX_ENVMAP 10
#define TEX_MUSGRAVE 11
#define TEX_VORONOI 12
diff --git a/source/blender/makesrna/RNA_access.h b/source/blender/makesrna/RNA_access.h
index 5ecbc1fea7d..821fcfb90e6 100644
--- a/source/blender/makesrna/RNA_access.h
+++ b/source/blender/makesrna/RNA_access.h
@@ -390,8 +390,6 @@ extern StructRNA RNA_ParticleSystem;
extern StructRNA RNA_ParticleSystemModifier;
extern StructRNA RNA_ParticleTarget;
extern StructRNA RNA_PivotConstraint;
-extern StructRNA RNA_PluginSequence;
-extern StructRNA RNA_PluginTexture;
extern StructRNA RNA_PointCache;
extern StructRNA RNA_PointDensity;
extern StructRNA RNA_PointDensityTexture;
diff --git a/source/blender/makesrna/intern/rna_sequencer.c b/source/blender/makesrna/intern/rna_sequencer.c
index a3c309625f3..8632c663b01 100644
--- a/source/blender/makesrna/intern/rna_sequencer.c
+++ b/source/blender/makesrna/intern/rna_sequencer.c
@@ -998,7 +998,6 @@ static void rna_def_sequence(BlenderRNA *brna)
{SEQ_GAMCROSS, "GAMMA_CROSS", 0, "Gamma Cross", ""},
{SEQ_MUL, "MULTIPLY", 0, "Multiply", ""},
{SEQ_OVERDROP, "OVER_DROP", 0, "Over Drop", ""},
- {SEQ_PLUGIN, "PLUGIN", 0, "Plugin", ""},
{SEQ_WIPE, "WIPE", 0, "Wipe", ""},
{SEQ_GLOW, "GLOW", 0, "Glow", ""},
{SEQ_TRANSFORM, "TRANSFORM", 0, "Transform", ""},
diff --git a/source/blender/makesrna/intern/rna_sequencer_api.c b/source/blender/makesrna/intern/rna_sequencer_api.c
index 4d471ae4b41..bdbd153b1e2 100644
--- a/source/blender/makesrna/intern/rna_sequencer_api.c
+++ b/source/blender/makesrna/intern/rna_sequencer_api.c
@@ -413,7 +413,6 @@ void RNA_api_sequences(BlenderRNA *brna, PropertyRNA *cprop)
{SEQ_GAMCROSS, "GAMMA_CROSS", 0, "Gamma Cross", ""},
{SEQ_MUL, "MULTIPLY", 0, "Multiply", ""},
{SEQ_OVERDROP, "OVER_DROP", 0, "Over Drop", ""},
- // {SEQ_PLUGIN, "PLUGIN", 0, "Plugin", ""},
{SEQ_WIPE, "WIPE", 0, "Wipe", ""},
{SEQ_GLOW, "GLOW", 0, "Glow", ""},
{SEQ_TRANSFORM, "TRANSFORM", 0, "Transform", ""},
diff --git a/source/blender/makesrna/intern/rna_texture.c b/source/blender/makesrna/intern/rna_texture.c
index 646f9846e58..9b709e9ace1 100644
--- a/source/blender/makesrna/intern/rna_texture.c
+++ b/source/blender/makesrna/intern/rna_texture.c
@@ -68,7 +68,6 @@ EnumPropertyItem texture_type_items[] = {
{TEX_MUSGRAVE, "MUSGRAVE", ICON_TEXTURE, "Musgrave", "Procedural - highly flexible fractal noise texture"},
{TEX_NOISE, "NOISE", ICON_TEXTURE, "Noise",
"Procedural - random noise, gives a different result every time, for every frame, for every pixel"},
- /*{TEX_PLUGIN, "PLUGIN", ICON_PLUGIN, "Plugin", ""}, *//* Nothing yet */
{TEX_POINTDENSITY, "POINT_DENSITY", ICON_TEXTURE, "Point Density", ""},
{TEX_STUCCI, "STUCCI", ICON_TEXTURE, "Stucci", "Procedural - create a fractal noise texture"},
{TEX_VORONOI, "VORONOI", ICON_TEXTURE, "Voronoi", "Procedural - create cell-like patterns based on Worley noise"},
diff --git a/source/blender/nodes/shader/node_shader_util.c b/source/blender/nodes/shader/node_shader_util.c
index 5961c2b330b..9aa3c76e0a5 100644
--- a/source/blender/nodes/shader/node_shader_util.c
+++ b/source/blender/nodes/shader/node_shader_util.c
@@ -88,7 +88,7 @@ void ntreeShaderGetTexcoMode(bNodeTree *ntree, int r_mode, short *texco, int *mo
if (node->type==SH_NODE_TEXTURE) {
if ((r_mode & R_OSA) && node->id) {
Tex *tex= (Tex *)node->id;
- if (ELEM3(tex->type, TEX_IMAGE, TEX_PLUGIN, TEX_ENVMAP)) {
+ if (ELEM(tex->type, TEX_IMAGE, TEX_ENVMAP)) {
*texco |= TEXCO_OSA|NEED_UV;
}
}
diff --git a/source/blender/render/intern/source/render_texture.c b/source/blender/render/intern/source/render_texture.c
index 16b6eddaa29..5c45be3f03a 100644
--- a/source/blender/render/intern/source/render_texture.c
+++ b/source/blender/render/intern/source/render_texture.c
@@ -54,7 +54,6 @@
#include "BKE_colortools.h"
#include "BKE_image.h"
#include "BKE_node.h"
-#include "BKE_plugin_types.h"
#include "BKE_animsys.h"
#include "BKE_DerivedMesh.h"
@@ -103,13 +102,6 @@ static void init_render_texture(Render *re, Tex *tex)
BKE_image_user_frame_calc(&tex->iuser, cfra, re?re->flag & R_SEC_FIELD:0);
}
- if (tex->type==TEX_PLUGIN) {
- if (tex->plugin && tex->plugin->doit) {
- if (tex->plugin->cfra) {
- *(tex->plugin->cfra)= (float)cfra; //BKE_scene_frame_get(re->scene); // XXX old animsys - timing stuff to be fixed
- }
- }
- }
else if (tex->type==TEX_ENVMAP) {
/* just in case */
tex->imaflag |= TEX_INTERPOL | TEX_MIPMAP;
@@ -747,73 +739,6 @@ static int texnoise(Tex *tex, TexResult *texres)
/* ------------------------------------------------------------------------- */
-static int plugintex(Tex *tex, float *texvec, float *dxt, float *dyt, int osatex, TexResult *texres)
-{
- PluginTex *pit;
- int rgbnor=0;
- float result[8]= {0.0f};
-
- texres->tin= 0.0;
-
- pit= tex->plugin;
- if (pit && pit->doit) {
- if (texres->nor) {
- if (pit->version < 6) {
- copy_v3_v3(pit->result+5, texres->nor);
- }
- else {
- copy_v3_v3(result+5, texres->nor);
- }
- }
- if (pit->version < 6) {
- if (osatex) rgbnor= ((TexDoitold)pit->doit)(tex->stype,
- pit->data, texvec, dxt, dyt);
- else rgbnor= ((TexDoitold)pit->doit)(tex->stype,
- pit->data, texvec, NULL, NULL);
- }
- else {
- if (osatex) rgbnor= ((TexDoit)pit->doit)(tex->stype,
- pit->data, texvec, dxt, dyt, result);
- else rgbnor= ((TexDoit)pit->doit)(tex->stype,
- pit->data, texvec, NULL, NULL, result);
- }
-
- if (pit->version < 6) {
- texres->tin = pit->result[0];
- }
- else {
- texres->tin = result[0]; /* XXX, assigning garbage value, fixme! */
- }
-
- if (rgbnor & TEX_NOR) {
- if (texres->nor) {
- if (pit->version < 6) {
- copy_v3_v3(texres->nor, pit->result+5);
- }
- else {
- copy_v3_v3(texres->nor, result+5);
- }
- }
- }
-
- if (rgbnor & TEX_RGB) {
- if (pit->version < 6) {
- copy_v4_v4(&texres->tr, pit->result + 1);
- }
- else {
- copy_v4_v4(&texres->tr, result + 1);
- }
-
- BRICONTRGB;
- }
-
- BRICONT;
- }
-
- return rgbnor;
-}
-
-
static int cubemap_glob(const float n[3], float x, float y, float z, float *adr1, float *adr2)
{
float x1, y1, z1, nor[3];
@@ -1210,9 +1135,6 @@ static int multitex(Tex *tex, float *texvec, float *dxt, float *dyt, int osatex,
else retval= imagewrap(tex, tex->ima, NULL, texvec, texres);
BKE_image_tag_time(tex->ima); /* tag image as having being used */
break;
- case TEX_PLUGIN:
- retval= plugintex(tex, texvec, dxt, dyt, osatex, texres);
- break;
case TEX_ENVMAP:
retval= envmaptex(tex, texvec, dxt, dyt, osatex, texres);
break;