[Bf-blender-cvs] [f4759ed] multiview: Fix anaglyph not working in OSX
Dalai Felinto
noreply at git.blender.org
Wed Sep 17 14:12:28 CEST 2014
Commit: f4759ed978665444d35eb35a5bf683cb8d4526bf
Author: Dalai Felinto
Date: Mon Sep 15 05:19:35 2014 +0200
Branches: multiview
https://developer.blender.org/rBf4759ed978665444d35eb35a5bf683cb8d4526bf
Fix anaglyph not working in OSX
Aka initial values for stereo 3d format struct were not zero in OSX
===================================================================
M source/blender/blenkernel/intern/image.c
M source/blender/blenloader/intern/versioning_270.c
M source/blender/windowmanager/intern/wm_window.c
===================================================================
diff --git a/source/blender/blenkernel/intern/image.c b/source/blender/blenkernel/intern/image.c
index 2199b59..1f7c030 100644
--- a/source/blender/blenkernel/intern/image.c
+++ b/source/blender/blenkernel/intern/image.c
@@ -369,7 +369,7 @@ static Image *image_alloc(Main *bmain, const char *name, short source, short typ
ima->flag |= IMA_VIEW_AS_RENDER;
BKE_color_managed_colorspace_settings_init(&ima->colorspace_settings);
- ima->stereo3d_format = MEM_mallocN(sizeof(Stereo3dFormat), "Image Stereo Format");
+ ima->stereo3d_format = MEM_callocN(sizeof(Stereo3dFormat), "Image Stereo Format");
ima->anims.first = ima->anims.last = NULL;
ima->packedfiles.first = ima->packedfiles.last = NULL;
ima->views.first = ima->views.last = NULL;
diff --git a/source/blender/blenloader/intern/versioning_270.c b/source/blender/blenloader/intern/versioning_270.c
index 65b763b..75ad387 100644
--- a/source/blender/blenloader/intern/versioning_270.c
+++ b/source/blender/blenloader/intern/versioning_270.c
@@ -434,7 +434,7 @@ void blo_do_versions_270(FileData *fd, Library *UNUSED(lib), Main *main)
if (!DNA_struct_elem_find(fd->filesdna, "Image", "Stereo3dFormat", "*stereo3d_format")) {
Image *ima;
for (ima = main->image.first; ima; ima = ima->id.next) {
- ima->stereo3d_format = MEM_mallocN(sizeof(Stereo3dFormat), "Image Stereo 3d Format");
+ ima->stereo3d_format = MEM_callocN(sizeof(Stereo3dFormat), "Image Stereo 3d Format");
}
}
@@ -458,7 +458,7 @@ void blo_do_versions_270(FileData *fd, Library *UNUSED(lib), Main *main)
for (wm = main->wm.first; wm; wm = wm->id.next) {
for (win = wm->windows.first; win; win = win->next) {
- win->stereo3d_format = MEM_mallocN(sizeof(Stereo3dFormat), "Stereo Display 3d Format");
+ win->stereo3d_format = MEM_callocN(sizeof(Stereo3dFormat), "Stereo Display 3d Format");
}
}
}
diff --git a/source/blender/windowmanager/intern/wm_window.c b/source/blender/windowmanager/intern/wm_window.c
index 358526c..b03e983 100644
--- a/source/blender/windowmanager/intern/wm_window.c
+++ b/source/blender/windowmanager/intern/wm_window.c
@@ -236,7 +236,7 @@ wmWindow *wm_window_new(bContext *C)
BLI_addtail(&wm->windows, win);
win->winid = find_free_winid(wm);
- win->stereo3d_format = MEM_mallocN(sizeof(Stereo3dFormat), "Stereo 3D Format (window)");
+ win->stereo3d_format = MEM_callocN(sizeof(Stereo3dFormat), "Stereo 3D Format (window)");
return win;
}
More information about the Bf-blender-cvs
mailing list