Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/space_sequencer/sequencer_buttons.c
| /* SPDX-License-Identifier: GPL-2.0-or-later | /* SPDX-License-Identifier: GPL-2.0-or-later | ||||
| * Copyright 2009 Blender Foundation. All rights reserved. */ | * Copyright 2009 Blender Foundation. All rights reserved. */ | ||||
| /** \file | /** \file | ||||
| * \ingroup spseq | * \ingroup spseq | ||||
| */ | */ | ||||
| #include <stdio.h> | #include <stdio.h> | ||||
| #include <string.h> | #include <string.h> | ||||
| #include "DNA_video_edit_types.h" | |||||
| #include "MEM_guardedalloc.h" | #include "MEM_guardedalloc.h" | ||||
| #include "BLI_listbase.h" | #include "BLI_listbase.h" | ||||
| #include "BLI_utildefines.h" | #include "BLI_utildefines.h" | ||||
| #include "BLT_translation.h" | #include "BLT_translation.h" | ||||
| #include "BKE_context.h" | #include "BKE_context.h" | ||||
| Show All 33 Lines | |||||
| { | { | ||||
| /* Image buffer can not be acquired during render, similar to | /* Image buffer can not be acquired during render, similar to | ||||
| * draw_image_seq(). */ | * draw_image_seq(). */ | ||||
| if (G.is_rendering) { | if (G.is_rendering) { | ||||
| return; | return; | ||||
| } | } | ||||
| struct Main *bmain = CTX_data_main(C); | struct Main *bmain = CTX_data_main(C); | ||||
| struct Depsgraph *depsgraph = CTX_data_expect_evaluated_depsgraph(C); | struct Depsgraph *depsgraph = CTX_data_expect_evaluated_depsgraph(C); | ||||
| struct Scene *scene = CTX_data_scene(C); | VideoEdit *video_edit = CTX_data_video_edit(C); | ||||
| ARegion *region = CTX_wm_region(C); | ARegion *region = CTX_wm_region(C); | ||||
| SpaceSeq *space_sequencer = CTX_wm_space_seq(C); | SpaceSeq *space_sequencer = CTX_wm_space_seq(C); | ||||
| /* NOTE: We can only reliably show metadata for the original (current) | /* NOTE: We can only reliably show metadata for the original (current) | ||||
| * frame when split view is used. */ | * frame when split view is used. */ | ||||
| const bool show_split = (scene->ed && | const bool show_split = ((video_edit->overlay_frame_flag & SEQ_EDIT_OVERLAY_FRAME_SHOW) && | ||||
| (scene->ed->overlay_frame_flag & SEQ_EDIT_OVERLAY_FRAME_SHOW) && | |||||
| (space_sequencer->mainb == SEQ_DRAW_IMG_IMBUF)); | (space_sequencer->mainb == SEQ_DRAW_IMG_IMBUF)); | ||||
| if (show_split && (space_sequencer->overlay_frame_type == SEQ_OVERLAY_FRAME_TYPE_REFERENCE)) { | if (show_split && (space_sequencer->overlay_frame_type == SEQ_OVERLAY_FRAME_TYPE_REFERENCE)) { | ||||
| return; | return; | ||||
| } | } | ||||
| /* NOTE: We disable multiview for drawing, since we don't know what is the | /* NOTE: We disable multiview for drawing, since we don't know what is the | ||||
| * from the panel (is kind of all the views?). */ | * from the panel (is kind of all the views?). */ | ||||
| ImBuf *ibuf = sequencer_ibuf_get( | ImBuf *ibuf = sequencer_ibuf_get( | ||||
| bmain, region, depsgraph, scene, space_sequencer, scene->r.cfra, 0, ""); | bmain, region, depsgraph, video_edit, space_sequencer, video_edit->r.cfra, 0, ""); | ||||
| if (ibuf != NULL) { | if (ibuf != NULL) { | ||||
| ED_region_image_metadata_panel_draw(ibuf, panel->layout); | ED_region_image_metadata_panel_draw(ibuf, panel->layout); | ||||
| IMB_freeImBuf(ibuf); | IMB_freeImBuf(ibuf); | ||||
| } | } | ||||
| } | } | ||||
| void sequencer_buttons_register(ARegionType *art) | void sequencer_buttons_register(ARegionType *art) | ||||
| { | { | ||||
| Show All 23 Lines | |||||