Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/space_sequencer/sequencer_buttons.c
| Show First 20 Lines • Show All 72 Lines • ▼ Show 20 Lines | static void metadata_panel_context_draw(const bContext *C, Panel *panel) | ||||
| /* 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); | struct Scene *scene = CTX_data_scene(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 && (scene->ed->over_flag & SEQ_EDIT_OVERLAY_SHOW) && | const bool show_split = (scene->ed && (scene->ed->over_flag & SEQ_EDIT_OVERLAY_SHOW) && | ||||
| (space_sequencer->mainb == SEQ_DRAW_IMG_IMBUF)); | (space_sequencer->mainb == SEQ_DRAW_IMG_IMBUF)); | ||||
| if (show_split && space_sequencer->overlay_type == SEQ_DRAW_OVERLAY_REFERENCE) { | if (show_split && space_sequencer->overlay_type == SEQ_DRAW_OVERLAY_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(bmain, depsgraph, scene, space_sequencer, scene->r.cfra, 0, ""); | ImBuf *ibuf = sequencer_ibuf_get( | ||||
| bmain, region, depsgraph, scene, space_sequencer, scene->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 | |||||