diff options
-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) { |