Commit: 04c20fd7b360df60800e7eed4bd3ca7386fb810f
Author: Dalai Felinto
Date:   Sat Sep 6 23:36:34 2014 +0200
Branches: multiview
https://developer.blender.org/rB04c20fd7b360df60800e7eed4bd3ca7386fb810f

StereoDisplay is now Stereo3dFormat and and removal of UserDef properties

* All the datablocks that uses stereo3d_format now store a pointer not the 
struct

===================================================================

M       release/scripts/startup/bl_ui/space_userpref.py
M       source/blender/blenkernel/intern/image.c
M       source/blender/blenkernel/intern/scene.c
M       source/blender/blenloader/intern/readfile.c
M       source/blender/blenloader/intern/versioning_270.c
M       source/blender/blenloader/intern/writefile.c
M       source/blender/compositor/nodes/COM_OutputFileNode.cpp
M       source/blender/editors/screen/screen_ops.c
M       source/blender/editors/space_image/image_buttons.c
M       source/blender/editors/space_image/image_ops.c
M       source/blender/imbuf/intern/stereoimbuf.c
M       source/blender/makesdna/DNA_image_types.h
M       source/blender/makesdna/DNA_scene_types.h
M       source/blender/makesdna/DNA_userdef_types.h
M       source/blender/makesdna/DNA_windowmanager_types.h
M       source/blender/makesrna/RNA_enum_types.h
M       source/blender/makesrna/intern/rna_image.c
M       source/blender/makesrna/intern/rna_scene.c
M       source/blender/makesrna/intern/rna_userdef.c
M       source/blender/makesrna/intern/rna_wm.c
M       source/blender/render/intern/source/pipeline.c
M       source/blender/render/intern/source/render_result.c
M       source/blender/windowmanager/intern/wm_files.c
M       source/blender/windowmanager/intern/wm_operators.c
M       source/blender/windowmanager/intern/wm_stereo.c
M       source/blender/windowmanager/intern/wm_window.c

===================================================================

diff --git a/release/scripts/startup/bl_ui/space_userpref.py 
b/release/scripts/startup/bl_ui/space_userpref.py
index e921ac2..999e41e 100644
--- a/release/scripts/startup/bl_ui/space_userpref.py
+++ b/release/scripts/startup/bl_ui/space_userpref.py
@@ -413,26 +413,6 @@ class USERPREF_PT_system(Panel):
             sub.active = system.compute_device_type != 'CPU'
             sub.prop(system, "compute_device", text="")
 
-        col.separator()
-        col.separator()
-
-        s3d = system.stereo_display
-        col.label(text="3D Stereo Display:")
-        col.prop(s3d, "display_mode", text="")
-
-        if s3d.display_mode == 'ANAGLYPH':
-            col.prop(s3d, "anaglyph_type", text="Type")
-
-        elif s3d.display_mode == 'EPILEPSY':
-            col.prop(s3d, "epilepsy_interval")
-
-        elif s3d.display_mode == 'INTERLACE':
-            col.prop(s3d, "interlace_type", text="Type")
-            col.prop(s3d, "use_interlace_swap")
-
-        elif s3d.display_mode == 'SIDEBYSIDE':
-            col.prop(s3d, "use_sidebyside_crosseyed")
-
         # 2. Column
         column = split.column()
         colsplit = column.split(percentage=0.85)
diff --git a/source/blender/blenkernel/intern/image.c 
b/source/blender/blenkernel/intern/image.c
index 3fdc281..3abdb6d 100644
--- a/source/blender/blenkernel/intern/image.c
+++ b/source/blender/blenkernel/intern/image.c
@@ -322,7 +322,7 @@ void BKE_image_free(Image *ima)
        }
 
        image_free_views(ima);
-       MEM_freeN(ima->stereo_format);
+       MEM_freeN(ima->stereo3d_format);
 }
 
 /* only image block itself */
@@ -346,7 +346,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->stereo_format = MEM_mallocN(sizeof(StereoDisplay), "Image 
Stereo Format");
+               ima->stereo3d_format = MEM_mallocN(sizeof(Stereo3dFormat), 
"Image Stereo Format");
        }
 
        return ima;
@@ -415,7 +415,7 @@ Image *BKE_image_copy(Main *bmain, Image *ima)
        if (ima->packedfile)
                nima->packedfile = dupPackedFile(ima->packedfile);
 
-       nima->stereo_format = MEM_dupallocN(ima->stereo_format);
+       nima->stereo3d_format = MEM_dupallocN(ima->stereo3d_format);
        copy_image_views(&nima->views, &ima->views);
 
        return nima;
diff --git a/source/blender/blenkernel/intern/scene.c 
b/source/blender/blenkernel/intern/scene.c
index 753e0b2..23b4c1a 100644
--- a/source/blender/blenkernel/intern/scene.c
+++ b/source/blender/blenkernel/intern/scene.c
@@ -2205,9 +2205,9 @@ size_t BKE_scene_view_get_id(const RenderData *rd, const 
char *viewname)
 void BKE_scene_videos_dimensions(const RenderData *rd, const size_t width, 
const size_t height, size_t *r_width, size_t *r_height)
 {
        if ((rd->scemode & R_MULTIVIEW) &&
-           rd->im_format.views_output == R_IMF_VIEWS_STEREO_3D)
+           rd->im_format.views_format == R_IMF_VIEWS_STEREO_3D)
        {
-               IMB_stereo_dimensions(rd->im_format.stereo_output.display_mode, 
((rd->im_format.stereo_output.flag & S3D_UNSQUEEZED_FRAME) == 0), width, 
height, r_width, r_height);
+               
IMB_stereo_dimensions(rd->im_format.stereo3d_format.display_mode, 
((rd->im_format.stereo3d_format.flag & S3D_UNSQUEEZED_FRAME) == 0), width, 
height, r_width, r_height);
        }
        else {
                *r_width = width;
@@ -2223,7 +2223,7 @@ size_t BKE_scene_num_videos(const RenderData *rd)
        if ((rd->scemode & R_MULTIVIEW) == 0)
                return 1;
 
-       if (rd->im_format.views_output == R_IMF_VIEWS_STEREO_3D)
+       if (rd->im_format.views_format == R_IMF_VIEWS_STEREO_3D)
                return 1;
 
        /* R_IMF_VIEWS_INDIVIDUAL */
diff --git a/source/blender/blenloader/intern/readfile.c 
b/source/blender/blenloader/intern/readfile.c
index 5957002..89b2f93 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -3335,7 +3335,7 @@ static void direct_link_image(FileData *fd, Image *ima)
 
        ima->packedfile = direct_link_packedfile(fd, ima->packedfile);
        ima->preview = direct_link_preview_image(fd, ima->preview);
-       ima->stereo_format = newdataadr(fd, ima->stereo_format);
+       ima->stereo3d_format = newdataadr(fd, ima->stereo3d_format);
        ima->ok = 1;
 }
 
@@ -5579,6 +5579,7 @@ static void direct_link_windowmanager(FileData *fd, 
wmWindowManager *wm)
                win->cursor      = 0;
                win->lastcursor  = 0;
                win->modalcursor = 0;
+               win->stereo3d_format = newdataadr(fd, win->stereo3d_format);
        }
        
        BLI_listbase_clear(&wm->timers);
@@ -7509,7 +7510,6 @@ static void do_versions_userdef(FileData *fd, 
BlendFileData *bfd)
                user->walk_navigation.jump_height = 0.4f;      /* m */
                user->walk_navigation.teleport_time = 0.2f; /* s */
        }
-
 }
 
 static void do_versions(FileData *fd, Library *lib, Main *main)
@@ -7631,7 +7631,7 @@ static BHead *read_userdef(BlendFileData *bfd, FileData 
*fd, BHead *bhead)
        link_list(fd, &user->user_keymaps);
        link_list(fd, &user->addons);
        link_list(fd, &user->autoexec_paths);
-       
+
        for (keymap=user->user_keymaps.first; keymap; keymap=keymap->next) {
                keymap->modal_items= NULL;
                keymap->poll = NULL;
diff --git a/source/blender/blenloader/intern/versioning_270.c 
b/source/blender/blenloader/intern/versioning_270.c
index 8f1c520..7087a6a 100644
--- a/source/blender/blenloader/intern/versioning_270.c
+++ b/source/blender/blenloader/intern/versioning_270.c
@@ -431,10 +431,21 @@ void blo_do_versions_270(FileData *fd, Library 
*UNUSED(lib), Main *main)
                        }
                }
 
-               if (!DNA_struct_elem_find(fd->filesdna, "Image", 
"StereoDisplay", "*stereo_format")) {
+               if (!DNA_struct_elem_find(fd->filesdna, "Image", 
"Stereo3dFormat", "*stereo3d_format")) {
                        Image *ima;
                        for (ima = main->image.first; ima; ima = ima->id.next) {
-                               ima->stereo_format = 
MEM_mallocN(sizeof(StereoDisplay), "Image Stereo Format");
+                               ima->stereo3d_format = 
MEM_mallocN(sizeof(Stereo3dFormat), "Image Stereo 3d Format");
+                       }
+               }
+
+               if (!DNA_struct_elem_find(fd->filesdna, "wmWindow", 
"Stereo3dFormat", "*stereo3d_format")) {
+                       wmWindowManager *wm;
+                       wmWindow *win;
+
+                       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");
+                               }
                        }
                }
        }
diff --git a/source/blender/blenloader/intern/writefile.c 
b/source/blender/blenloader/intern/writefile.c
index 3c0ccbd..4211484 100644
--- a/source/blender/blenloader/intern/writefile.c
+++ b/source/blender/blenloader/intern/writefile.c
@@ -2106,8 +2106,7 @@ static void write_images(WriteData *wd, ListBase *idbase)
 
                        for (iv = ima->views.first; iv; iv = iv->next)
                                writestruct(wd, DATA, "ImageView", 1, iv);
-                       writestruct(wd, DATA, "StereoDisplay", 1, 
ima->stereo_format);
-
+                       writestruct(wd, DATA, "Stereo3dFormat", 1, 
ima->stereo3d_format);
                }
                ima= ima->id.next;
        }
@@ -2505,8 +2504,10 @@ static void write_windowmanagers(WriteData *wd, ListBase 
*lb)
        for (wm= lb->first; wm; wm= wm->id.next) {
                writestruct(wd, ID_WM, "wmWindowManager", 1, wm);
                
-               for (win= wm->windows.first; win; win= win->next)
+               for (win= wm->windows.first; win; win= win->next) {
                        writestruct(wd, DATA, "wmWindow", 1, win);
+                       writestruct(wd, DATA, "Stereo3dFormat", 1, 
win->stereo3d_format);
+               }
        }
 }
 
diff --git a/source/blender/compositor/nodes/COM_OutputFileNode.cpp 
b/source/blender/compositor/nodes/COM_OutputFileNode.cpp
index 7c7d65a..967c373 100644
--- a/source/blender/compositor/nodes/COM_OutputFileNode.cpp
+++ b/source/blender/compositor/nodes/COM_OutputFileNode.cpp
@@ -100,7 +100,7 @@ void OutputFileNode::convertToOperations(NodeConverter 
&converter, const Composi
                                        ((OutputOpenExrMultiViewOperation 
*)outputOperation)->add_layer(sockdata->layer, input->getDataType(), true);
                                        converter.mapInputSocket(input, 
outputOperation->getInputSocket(0));
                                }
-                               else if (is_mono || (format->views_output == 
R_IMF_VIEWS_INDIVIDUAL)) {
+                               else if (is_mono || (format->views_format == 
R_IMF_VIEWS_INDIVIDUAL)) {
                                        outputOperation = new 
OutputSingleLayerOperation(
                                                context.getRenderData(), 
context.getbNodeTree(), input->getDataType(), format, path,
                                                context.getViewSettings(), 
context.getDisplaySettings(), context.getViewName());
diff --git a/source/blender/editors/screen/screen_ops.c 
b/source/blender/editors/screen/screen_ops.c
index 7f4525b..1ccb17b 100644
--- a/source/blender/editors/screen/screen_ops.c
+++ b/source/blender/editors/screen/screen_ops.c
@@ -929,7 +929,7 @@ static int area_dupli_invoke(bContext *C, wmOperator *op, 
const wmEvent *event)
        rect.ymax = rect.ymin + BLI_rcti_size_y(&rect) / U.pixelsize;
 
        newwin = WM_window_open(C, &rect);
-       newwin->stereo_display = win->stereo_display;
+       newwin->stereo3d_format = MEM_dupallocN(win->stereo3d_format);
        
        /* allocs new screen and adds to newly created window, using window 
size */
        newsc = ED_screen_add(newwin, CTX_data_scene(C), sc->id.name + 2);
diff --git a/source/blender/editors/space_image/image_buttons.c 
b/source/blender/editors/space_image/image_buttons.c
index aaf0851..89b6aaa 100644
--- a/source/blender/editors/space_image/image_buttons.c
+++ b/source/blender/editors/space_image/image_buttons.c
@@ -1031,8 +1031,8 @@ void uiTemplateImageViews(uiLayout *layout, PointerRNA 
*imfptr)
 {
        ImageFormatData *imf = imfptr->data;
        PropertyRNA *prop;
-       PointerRNA stereo_output_ptr;
-       StereoDisplay *stereo_output = &imf->stereo_output;
+       PointerRNA stereo3d_format_ptr;
+       Stereo3dFormat *stereo3d_format = &imf->stereo3d_format;
 
        uiLayout *col, *box;
 
@@ -1042,38 +1042,38 @@ void uiTemplateImageViews(uiLayout *layout, PointerRNA 
*imfptr)
 
        col = uiLayoutColumn(layout, false);
 
-       uiItemL(col, IFACE_("Views Output:"), ICON_NONE);
-       uiItemR(uiLayoutRow(col, false), imfptr, "views_output", 
UI_ITEM_R_EXPAND, NULL, ICON_NONE);
+       uiItemL(col, IFACE_("Views Format:"), ICON_NONE);
+       uiItemR(uiLayoutRow(col, false), imfptr, "views_format", 
UI_ITEM_R_EXPAND, NULL, ICON_NONE);
 
-       prop = RNA_struct_find_property(imfptr, "stereo_output");
-       stereo_output_ptr = RNA_property_pointer_get(imfptr, prop);
+       prop = RNA_struct_find_property(imfptr, "stereo_3d_format");
+       stereo3d_format_ptr = RNA_property_pointer_get(imfptr, prop);
 
        box = u

@@ Diff output truncated at 10240 characters. @@

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to