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:
Diffstat (limited to 'source/blender/windowmanager/intern/wm_playanim.c')
-rw-r--r--source/blender/windowmanager/intern/wm_playanim.c36
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) {