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:
authorAntonio Vazquez <blendergit@gmail.com>2021-05-20 20:36:53 +0300
committerAntonio Vazquez <blendergit@gmail.com>2021-05-20 21:16:59 +0300
commitef04fd95717d972f294c5ff69a418a7af4504d35 (patch)
tree4710bcde943d00733b9b22132b3ed8a4d7e11e6a
parent677909cdc3c2380819a987a80c623a45dde5c40c (diff)
GPencil: Fix missing annotations in VSE strip
Since version 2.80, the annotations of the Scene strip were not displayed in VSE. Also, the UI panel was`Grease Pencil` and must be `Annotation` The problem was the offscreen render hasn't evil_CTX and the section of the annotation was never called. Differential Revision: https://developer.blender.org/D11329
-rw-r--r--release/scripts/startup/bl_ui/space_sequencer.py2
-rw-r--r--source/blender/draw/intern/draw_manager.c8
-rw-r--r--source/blender/makesdna/DNA_sequence_types.h4
-rw-r--r--source/blender/makesrna/intern/rna_sequencer.c9
-rw-r--r--source/blender/sequencer/intern/render.c2
5 files changed, 16 insertions, 9 deletions
diff --git a/release/scripts/startup/bl_ui/space_sequencer.py b/release/scripts/startup/bl_ui/space_sequencer.py
index f6a03b4769c..b24b6e84939 100644
--- a/release/scripts/startup/bl_ui/space_sequencer.py
+++ b/release/scripts/startup/bl_ui/space_sequencer.py
@@ -1453,7 +1453,7 @@ class SEQUENCER_PT_scene(SequencerButtonsPanel, Panel):
if strip.scene_input == 'CAMERA':
layout = layout.column(heading="Show")
- layout.prop(strip, "use_grease_pencil", text="Grease Pencil")
+ layout.prop(strip, "use_annotations", text="Annotations")
if scene:
# Warning, this is not a good convention to follow.
# Expose here because setting the alpha from the 'Render' menu is very inconvenient.
diff --git a/source/blender/draw/intern/draw_manager.c b/source/blender/draw/intern/draw_manager.c
index c09b4719f3a..37f6bbf52b5 100644
--- a/source/blender/draw/intern/draw_manager.c
+++ b/source/blender/draw/intern/draw_manager.c
@@ -1473,6 +1473,14 @@ void DRW_draw_callbacks_post_scene(void)
GPU_depth_test(GPU_DEPTH_LESS_EQUAL);
}
+ else {
+ if (v3d && ((v3d->flag2 & V3D_SHOW_ANNOTATION) != 0)) {
+ GPU_depth_test(GPU_DEPTH_NONE);
+ /* XXX: as scene->gpd is not copied for COW yet */
+ ED_annotation_draw_view3d(DEG_get_input_scene(depsgraph), depsgraph, v3d, region, true);
+ GPU_depth_test(GPU_DEPTH_LESS_EQUAL);
+ }
+ }
}
struct DRWTextStore *DRW_text_cache_ensure(void)
diff --git a/source/blender/makesdna/DNA_sequence_types.h b/source/blender/makesdna/DNA_sequence_types.h
index 46ac4435e95..4b95dd41b30 100644
--- a/source/blender/makesdna/DNA_sequence_types.h
+++ b/source/blender/makesdna/DNA_sequence_types.h
@@ -517,8 +517,8 @@ enum {
SEQ_AUDIO_PAN_ANIMATED = (1 << 26),
SEQ_AUDIO_DRAW_WAVEFORM = (1 << 27),
- /* don't include Grease Pencil in OpenGL previews of Scene strips */
- SEQ_SCENE_NO_GPENCIL = (1 << 28),
+ /* don't include Annotations in OpenGL previews of Scene strips */
+ SEQ_SCENE_NO_ANNOTATION = (1 << 28),
SEQ_USE_VIEWS = (1 << 29),
/* Access scene strips directly (like a meta-strip). */
diff --git a/source/blender/makesrna/intern/rna_sequencer.c b/source/blender/makesrna/intern/rna_sequencer.c
index d6b2e61eb6d..9ba92431723 100644
--- a/source/blender/makesrna/intern/rna_sequencer.c
+++ b/source/blender/makesrna/intern/rna_sequencer.c
@@ -2390,11 +2390,10 @@ static void rna_def_scene(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Input", "Input type to use for the Scene strip");
RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_use_sequence");
- prop = RNA_def_property(srna, "use_grease_pencil", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", SEQ_SCENE_NO_GPENCIL);
- RNA_def_property_ui_text(
- prop, "Use Grease Pencil", "Show Grease Pencil strokes in OpenGL previews");
- RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, NULL);
+ prop = RNA_def_property(srna, "use_annotations", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", SEQ_SCENE_NO_ANNOTATION);
+ RNA_def_property_ui_text(prop, "Use Annotations", "Show Annotations in OpenGL previews");
+ RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_invalidate_raw_update");
rna_def_filter_video(srna);
rna_def_proxy(srna);
diff --git a/source/blender/sequencer/intern/render.c b/source/blender/sequencer/intern/render.c
index e8e600f910c..9aad76f4c65 100644
--- a/source/blender/sequencer/intern/render.c
+++ b/source/blender/sequencer/intern/render.c
@@ -1508,7 +1508,7 @@ static ImBuf *seq_render_scene_strip(const SeqRenderData *context,
goto finally;
}
- if (seq->flag & SEQ_SCENE_NO_GPENCIL) {
+ if (seq->flag & SEQ_SCENE_NO_ANNOTATION) {
use_gpencil = false;
}