diff options
author | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2012-09-23 22:50:56 +0400 |
---|---|---|
committer | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2012-09-23 22:50:56 +0400 |
commit | a42ba82f638e481d7fd3c3ed2ba05c331ef6717e (patch) | |
tree | 81a2b9221799707b49b74a5df8bb3ff964ba78bd /source/blender/windowmanager/intern/wm_playanim.c | |
parent | 7afbdff1b6c348227e652e1c3071ab7ba7c91c44 (diff) | |
parent | a73dd3476e7d180d3320afc04d218ce22f2f3bfc (diff) |
Merged changes in the trunk up to revision 50829.
Conflicts resolved:
source/blender/blenloader/intern/readfile.c
source/blender/render/intern/source/convertblender.c
source/blender/render/intern/source/pipeline.c
Also addressed code inconsistency due to changes in the trunk revision 50628 (color
management with OCIO) and 50806 (UV project material). OCIO-related changes are marked
OCIO_TODO as in some other files modified in revision 50628.
Diffstat (limited to 'source/blender/windowmanager/intern/wm_playanim.c')
-rw-r--r-- | source/blender/windowmanager/intern/wm_playanim.c | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/source/blender/windowmanager/intern/wm_playanim.c b/source/blender/windowmanager/intern/wm_playanim.c index e3867c0a32a..35cc1545c40 100644 --- a/source/blender/windowmanager/intern/wm_playanim.c +++ b/source/blender/windowmanager/intern/wm_playanim.c @@ -72,6 +72,8 @@ #include "wm_event_types.h" +#include "WM_api.h" /* only for WM_main_playanim */ + typedef struct PlayState { /* playback state */ @@ -142,7 +144,7 @@ static struct WindowStateGlobal { eWS_Qual qual; } g_WS = {NULL}; -void playanim_window_get_size(int *width_r, int *height_r) +static void playanim_window_get_size(int *width_r, int *height_r) { GHOST_RectangleHandle bounds = GHOST_GetClientBounds(g_WS.ghost_window); *width_r = GHOST_GetWidthRectangle(bounds); @@ -279,7 +281,8 @@ static void build_pict_list(char *first, int totframes, int fstep, int fontid) struct anim *anim; if (IMB_isanim(first)) { - anim = IMB_open_anim(first, IB_rect, 0); + /* OCIO_TODO: support different input color space */ + anim = IMB_open_anim(first, IB_rect, 0, NULL); if (anim) { int pic; ibuf = IMB_anim_absolute(anim, 0, IMB_TC_NONE, IMB_PROXY_NONE); @@ -378,12 +381,13 @@ static void build_pict_list(char *first, int totframes, int fstep, int fontid) pupdate_time(); if (ptottime > 1.0) { + /* OCIO_TODO: support different input color space */ if (picture->mem) { ibuf = IMB_ibImageFromMemory((unsigned char *)picture->mem, picture->size, - picture->IB_flags, picture->name); + picture->IB_flags, NULL, picture->name); } else { - ibuf = IMB_loadiffname(picture->name, picture->IB_flags); + ibuf = IMB_loadiffname(picture->name, picture->IB_flags, NULL); } if (ibuf) { playanim_toscreen(picture, ibuf, fontid); @@ -689,7 +693,7 @@ static int ghost_event_proc(GHOST_EventHandle evt, GHOST_TUserDataPtr ps_void) return 1; } -void playanim_window_open(const char *title, int posx, int posy, int sizex, int sizey, int start_maximized) +static void playanim_window_open(const char *title, int posx, int posy, int sizex, int sizey, int start_maximized) { GHOST_TWindowState inital_state; GHOST_TUns32 scr_w, scr_h; @@ -709,18 +713,10 @@ void playanim_window_open(const char *title, int posx, int posy, int sizex, int inital_state, GHOST_kDrawingContextTypeOpenGL, FALSE /* no stereo */, FALSE); - - //if (ghostwin) { - //if (win) { - // GHOST_SetWindowUserData(ghostwin, win); - //} else { - // GHOST_DisposeWindow(g_WS.ghost_system, ghostwin); - //} - //} } -void playanim(int argc, const char **argv) +void WM_main_playanim(int argc, const char **argv) { struct ImBuf *ibuf = NULL; char filepath[FILE_MAX]; @@ -824,7 +820,8 @@ void playanim(int argc, const char **argv) } if (IMB_isanim(filepath)) { - anim = IMB_open_anim(filepath, IB_rect, 0); + /* OCIO_TODO: support different input color spaces */ + anim = IMB_open_anim(filepath, IB_rect, 0, NULL); if (anim) { ibuf = IMB_anim_absolute(anim, 0, IMB_TC_NONE, IMB_PROXY_NONE); IMB_close_anim(anim); @@ -836,7 +833,8 @@ void playanim(int argc, const char **argv) } if (ibuf == NULL) { - ibuf = IMB_loadiffname(filepath, IB_rect); + /* OCIO_TODO: support different input color space */ + ibuf = IMB_loadiffname(filepath, IB_rect, NULL); } if (ibuf == NULL) { @@ -948,11 +946,13 @@ void playanim(int argc, const char **argv) ibuf = IMB_anim_absolute(ps.picture->anim, ps.picture->frame, IMB_TC_NONE, IMB_PROXY_NONE); } else if (ps.picture->mem) { + /* use correct colorspace here */ ibuf = IMB_ibImageFromMemory((unsigned char *) ps.picture->mem, ps.picture->size, - ps.picture->IB_flags, ps.picture->name); + ps.picture->IB_flags, NULL, ps.picture->name); } else { - ibuf = IMB_loadiffname(ps.picture->name, ps.picture->IB_flags); + /* use correct colorspace here */ + ibuf = IMB_loadiffname(ps.picture->name, ps.picture->IB_flags, NULL); } if (ibuf) { |