Support metadata display in clip editor
This commit is contained in:
parent
4fae3620d0
commit
7823ca06da
|
@ -1155,6 +1155,8 @@ class CLIP_MT_view(Menu):
|
|||
layout.operator("clip.view_zoom_in")
|
||||
layout.operator("clip.view_zoom_out")
|
||||
|
||||
layout.separator()
|
||||
layout.prop(sc, "show_metadata")
|
||||
layout.separator()
|
||||
|
||||
ratios = ((1, 8), (1, 4), (1, 2), (1, 1), (2, 1), (4, 1), (8, 1))
|
||||
|
|
|
@ -42,7 +42,7 @@ extern "C" {
|
|||
* and keep comment above the defines.
|
||||
* Use STRINGIFY() rather than defining with quotes */
|
||||
#define BLENDER_VERSION 275
|
||||
#define BLENDER_SUBVERSION 0
|
||||
#define BLENDER_SUBVERSION 1
|
||||
/* Several breakages with 270, e.g. constraint deg vs rad */
|
||||
#define BLENDER_MINVERSION 270
|
||||
#define BLENDER_MINSUBVERSION 5
|
||||
|
|
|
@ -222,7 +222,7 @@ static ImBuf *movieclip_load_sequence_file(MovieClip *clip, MovieClipUser *user,
|
|||
colorspace = clip->colorspace_settings.name;
|
||||
}
|
||||
|
||||
loadflag = IB_rect | IB_multilayer | IB_alphamode_detect;
|
||||
loadflag = IB_rect | IB_multilayer | IB_alphamode_detect | IB_metadata;
|
||||
|
||||
/* read ibuf */
|
||||
ibuf = IMB_loadiffname(name, loadflag, colorspace);
|
||||
|
|
|
@ -2620,7 +2620,13 @@ void init_userdef_do_versions(void)
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
if (U.versionfile < 275 || (U.versionfile == 275 && U.subversionfile < 1)) {
|
||||
bTheme *btheme;
|
||||
for (btheme = U.themes.first; btheme; btheme = btheme->next) {
|
||||
copy_v4_v4_char(btheme->tclip.metadatatext, btheme->tseq.text_hi);
|
||||
}
|
||||
}
|
||||
|
||||
if (U.pixelsize == 0.0f)
|
||||
U.pixelsize = 1.0f;
|
||||
|
||||
|
|
|
@ -43,6 +43,7 @@
|
|||
#include "BLI_math.h"
|
||||
#include "BLI_string.h"
|
||||
#include "BLI_math_base.h"
|
||||
#include "BLI_rect.h"
|
||||
|
||||
#include "BKE_context.h"
|
||||
#include "BKE_image.h"
|
||||
|
@ -285,6 +286,7 @@ static void draw_movieclip_buffer(const bContext *C, SpaceClip *sc, ARegion *ar,
|
|||
MovieClip *clip = ED_space_clip_get_clip(sc);
|
||||
int filter = GL_LINEAR;
|
||||
int x, y;
|
||||
rctf frame;
|
||||
|
||||
/* find window pixel coordinates of origin */
|
||||
UI_view2d_view_to_region(&ar->v2d, 0.0f, 0.0f, &x, &y);
|
||||
|
@ -308,10 +310,14 @@ static void draw_movieclip_buffer(const bContext *C, SpaceClip *sc, ARegion *ar,
|
|||
glPixelZoom(zoomx * width / ibuf->x, zoomy * height / ibuf->y);
|
||||
|
||||
glaDrawImBuf_glsl_ctx(C, ibuf, x, y, filter);
|
||||
|
||||
/* reset zoom */
|
||||
glPixelZoom(1.0f, 1.0f);
|
||||
|
||||
BLI_rctf_init(&frame, 0.0f, ibuf->x, 0.0f, ibuf->y);
|
||||
|
||||
if (sc->flag & SC_SHOW_METADATA)
|
||||
ED_region_image_metadata_draw(x, y, ibuf, frame, zoomx * width / ibuf->x, zoomy * height / ibuf->y);
|
||||
|
||||
if (ibuf->planes == 32)
|
||||
glDisable(GL_BLEND);
|
||||
}
|
||||
|
|
|
@ -1165,6 +1165,7 @@ typedef enum eSpaceClip_Flag {
|
|||
SC_SHOW_GRAPH_SEL_ONLY = (1 << 19),
|
||||
SC_SHOW_GRAPH_HIDDEN = (1 << 20),
|
||||
SC_SHOW_GRAPH_TRACKS_ERROR = (1 << 21),
|
||||
SC_SHOW_METADATA = (1 << 22),
|
||||
} eSpaceClip_Flag;
|
||||
|
||||
/* SpaceClip->mode */
|
||||
|
|
|
@ -4410,6 +4410,11 @@ static void rna_def_space_clip(BlenderRNA *brna)
|
|||
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", SC_HIDE_DISABLED);
|
||||
RNA_def_property_update(prop, NC_SPACE | ND_SPACE_CLIP, NULL);
|
||||
|
||||
prop = RNA_def_property(srna, "show_metadata", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, NULL, "flag", SC_SHOW_METADATA);
|
||||
RNA_def_property_ui_text(prop, "Show Metadata", "Show metadata of clip");
|
||||
RNA_def_property_update(prop, NC_SPACE | ND_SPACE_CLIP, NULL);
|
||||
|
||||
/* scopes */
|
||||
prop = RNA_def_property(srna, "scopes", PROP_POINTER, PROP_NONE);
|
||||
RNA_def_property_pointer_sdna(prop, NULL, "scopes");
|
||||
|
|
Loading…
Reference in New Issue