iFix T52050: Empty VSE preview for scene strips with OpenGL preview + Rendered settings.
authorBastien Montagne <montagne29@wanadoo.fr>
Fri, 11 Aug 2017 16:02:54 +0000 (18:02 +0200)
committerBastien Montagne <montagne29@wanadoo.fr>
Fri, 11 Aug 2017 16:02:54 +0000 (18:02 +0200)
'OpenGL Preview' checkbox was redundant now, just use seq_prev_type
value only.

Might be OK for 2.79, but should be double-checked first...

release/scripts/startup/bl_ui/space_sequencer.py
source/blender/blenkernel/intern/scene.c
source/blender/blenkernel/intern/sequencer.c
source/blender/editors/space_sequencer/sequencer_draw.c
source/blender/makesdna/DNA_scene_types.h
source/blender/makesrna/intern/rna_scene.c

index 79bb10cefebe4a54d97b1796d1eaf047c4abc75b..d155f5868f42fda067a905f2c9f9b3f449be9b1e 100644 (file)
@@ -1101,9 +1101,6 @@ class SEQUENCER_PT_preview(SequencerButtonsPanel_Output, Panel):
         render = context.scene.render
 
         col = layout.column()
-        col.prop(render, "use_sequencer_gl_preview", text="OpenGL Preview")
-        col = layout.column()
-        #col.active = render.use_sequencer_gl_preview
         col.prop(render, "sequencer_gl_preview", text="")
 
         row = col.row()
index 9002003d380fbcedb60d0c411dd64d94e37b72ff..b7fc6e70e658debddda68e91d71ec875146a5e60 100644 (file)
@@ -676,7 +676,7 @@ void BKE_scene_init(Scene *sce)
 
        sce->r.seq_prev_type = OB_SOLID;
        sce->r.seq_rend_type = OB_SOLID;
-       sce->r.seq_flag = R_SEQ_GL_PREV;
+       sce->r.seq_flag = 0;
 
        sce->r.threads = 1;
 
index b09b3ecda072e86f3be08954a2d8ca3da9af4ee4..e733f9dbd863145477e71af45d43f5334eb48ffc 100644 (file)
@@ -3233,7 +3233,7 @@ static ImBuf *seq_render_scene_strip(const SeqRenderData *context, Sequence *seq
        const bool is_background = G.background;
        const bool do_seq_gl = is_rendering ?
                0 /* (context->scene->r.seq_flag & R_SEQ_GL_REND) */ :
-               (context->scene->r.seq_flag & R_SEQ_GL_PREV) != 0;
+               (context->scene->r.seq_prev_type) != OB_RENDER;
        // bool have_seq = false;  /* UNUSED */
        bool have_comp = false;
        bool use_gpencil = true;
index 70a6e6d83cb8f87f0b5c4701ba91afd0170dc957..97961501c6d03e346b58b0df5c131ec9ee651286 100644 (file)
@@ -40,6 +40,7 @@
 
 #include "DNA_scene_types.h"
 #include "DNA_mask_types.h"
+#include "DNA_object_types.h"
 #include "DNA_screen_types.h"
 #include "DNA_space_types.h"
 #include "DNA_userdef_types.h"
@@ -1116,18 +1117,16 @@ void draw_image_seq(const bContext *C, Scene *scene, ARegion *ar, SpaceSeq *sseq
        const char *names[2] = {STEREO_LEFT_NAME, STEREO_RIGHT_NAME};
        bool draw_metadata = false;
 
-       if (G.is_rendering == false && (scene->r.seq_flag & R_SEQ_GL_PREV) == 0) {
+       if (G.is_rendering == false && (scene->r.seq_prev_type) == OB_RENDER) {
                /* stop all running jobs, except screen one. currently previews frustrate Render
                 * needed to make so sequencer's rendering doesn't conflict with compositor
                 */
                WM_jobs_kill_type(CTX_wm_manager(C), NULL, WM_JOB_TYPE_COMPOSITE);
 
-               if ((scene->r.seq_flag & R_SEQ_GL_PREV) == 0) {
-                       /* in case of final rendering used for preview, kill all previews,
-                        * otherwise threading conflict will happen in rendering module
-                        */
-                       WM_jobs_kill_type(CTX_wm_manager(C), NULL, WM_JOB_TYPE_RENDER_PREVIEW);
-               }
+               /* in case of final rendering used for preview, kill all previews,
+                * otherwise threading conflict will happen in rendering module
+                */
+               WM_jobs_kill_type(CTX_wm_manager(C), NULL, WM_JOB_TYPE_RENDER_PREVIEW);
        }
 
        if ((!draw_overlay || sseq->overlay_type == SEQ_DRAW_OVERLAY_REFERENCE) && !draw_backdrop) {
index cc1991cb2db8913e5fec1d977e73045ec4613a19..2bca55655530f981e9a7f6f68922416afde1c2d0 100644 (file)
@@ -751,7 +751,7 @@ typedef struct RenderData {
 
        /* sequencer options */
        char seq_prev_type;
-       char seq_rend_type;
+       char seq_rend_type;  /* UNUSED! */
        char seq_flag; /* flag use for sequence render/draw */
        char pad5[5];
 
@@ -1790,7 +1790,7 @@ typedef struct Scene {
 #define R_USE_WS_SHADING       0x8000000 /* use world space interpretation of lighting data */
 
 /* seq_flag */
-#define R_SEQ_GL_PREV 1
+// #define R_SEQ_GL_PREV 1  // UNUSED, we just use setting from seq_prev_type now.
 // #define R_SEQ_GL_REND 2  // UNUSED, opengl render has its own operator now.
 #define R_SEQ_SOLID_TEX 4
 
index 24ecf2e64ca360b228b39e39caa6894f69745360..2b468aa6910cf70d5d085604265a66e4d25b7715 100644 (file)
@@ -6613,11 +6613,6 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
 
        /* sequencer draw options */
 
-       prop = RNA_def_property(srna, "use_sequencer_gl_preview", PROP_BOOLEAN, PROP_NONE);
-       RNA_def_property_boolean_sdna(prop, NULL, "seq_flag", R_SEQ_GL_PREV);
-       RNA_def_property_ui_text(prop, "Sequencer OpenGL", "");
-       RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_SceneSequencer_update");
-
 #if 0  /* see R_SEQ_GL_REND comment */
        prop = RNA_def_property(srna, "use_sequencer_gl_render", PROP_BOOLEAN, PROP_NONE);
        RNA_def_property_boolean_sdna(prop, NULL, "seq_flag", R_SEQ_GL_REND);
@@ -6630,10 +6625,13 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
        RNA_def_property_ui_text(prop, "Sequencer Preview Shading", "Method to draw in the sequencer view");
        RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_SceneSequencer_update");
 
+#if 0  /* UNUSED, see R_SEQ_GL_REND comment */
        prop = RNA_def_property(srna, "sequencer_gl_render", PROP_ENUM, PROP_NONE);
        RNA_def_property_enum_sdna(prop, NULL, "seq_rend_type");
        RNA_def_property_enum_items(prop, rna_enum_viewport_shade_items);
+       /* XXX Label and tooltips are obviously wrong! */
        RNA_def_property_ui_text(prop, "Sequencer Preview Shading", "Method to draw in the sequencer view");
+#endif
 
        prop = RNA_def_property(srna, "use_sequencer_gl_textured_solid", PROP_BOOLEAN, PROP_NONE);
        RNA_def_property_boolean_sdna(prop, NULL, "seq_flag", R_SEQ_SOLID_TEX);