diff options
author | Peter Schlaile <peter@schlaile.de> | 2007-01-05 17:26:04 +0300 |
---|---|---|
committer | Peter Schlaile <peter@schlaile.de> | 2007-01-05 17:26:04 +0300 |
commit | 00c82cd3b2a0ef1056f476b1b7d8034b5b5d4880 (patch) | |
tree | 4537beefafcfd6c8511025044cfb4307f36f440a | |
parent | 429ec5eea3b44f57bf9400237d2a772e4808c8cf (diff) |
== Sequencer ==
== Plugins ==
Made sequencer plugins work again by boosting the version number and
working around recent changes to the ImBuf-structure for older binary
plugins.
This commit also restores the original length of name in VarStruct.
-rw-r--r-- | source/blender/blenpluginapi/plugin.h | 2 | ||||
-rw-r--r-- | source/blender/src/seqeffects.c | 26 |
2 files changed, 22 insertions, 6 deletions
diff --git a/source/blender/blenpluginapi/plugin.h b/source/blender/blenpluginapi/plugin.h index b9048b92878..1f6140130eb 100644 --- a/source/blender/blenpluginapi/plugin.h +++ b/source/blender/blenpluginapi/plugin.h @@ -36,7 +36,7 @@ #include "util.h" #include "floatpatch.h" -#define B_PLUGIN_VERSION 3 +#define B_PLUGIN_VERSION 5 typedef int (*TexDoit)(int, void*, float*, float*, float*); typedef void (*SeqDoit)(void*, float, float, int, int, ImBuf*, ImBuf*, ImBuf*, ImBuf*); diff --git a/source/blender/src/seqeffects.c b/source/blender/src/seqeffects.c index bf528f86d13..02582c43d64 100644 --- a/source/blender/src/seqeffects.c +++ b/source/blender/src/seqeffects.c @@ -103,8 +103,7 @@ static void open_plugin_seq(PluginSeq *pis, const char *seqname) if (version != 0) { pis->version= version(); - if (pis->version==2 || pis->version==3 - || pis->version==4) { + if (pis->version >= 2 && pis->version <= 5) { int (*info_func)(PluginInfo *); PluginInfo *info= (PluginInfo*) MEM_mallocN(sizeof(PluginInfo), "plugin_info");; @@ -222,6 +221,14 @@ static void copy_plugin(Sequence * dst, Sequence * src) } } +static ImBuf * IMB_cast_away_list(ImBuf * i) +{ + if (!i) { + return 0; + } + return (ImBuf*) (((void**) i) + 2); +} + static void do_plugin_effect(Sequence * seq,int cfra, float facf0, float facf1, int x, int y, struct ImBuf *ibuf1, struct ImBuf *ibuf2, @@ -281,9 +288,18 @@ static void do_plugin_effect(Sequence * seq,int cfra, if(ibuf3) IMB_convert_rgba_to_abgr(ibuf3); } - ((SeqDoit)seq->plugin->doit)( - seq->plugin->data, facf0, facf1, x, y, - ibuf1, ibuf2, out, 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) { |