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:
Diffstat (limited to 'source/blender/editors/space_clip')
-rw-r--r--source/blender/editors/space_clip/CMakeLists.txt3
-rw-r--r--source/blender/editors/space_clip/SConscript4
-rw-r--r--source/blender/editors/space_clip/clip_buttons.c2
-rw-r--r--source/blender/editors/space_clip/clip_draw.c19
-rw-r--r--source/blender/editors/space_clip/clip_ops.c6
-rw-r--r--source/blender/editors/space_clip/clip_toolbar.c4
-rw-r--r--source/blender/editors/space_clip/tracking_ops.c2
7 files changed, 22 insertions, 18 deletions
diff --git a/source/blender/editors/space_clip/CMakeLists.txt b/source/blender/editors/space_clip/CMakeLists.txt
index 4659e612b41..d17d1856502 100644
--- a/source/blender/editors/space_clip/CMakeLists.txt
+++ b/source/blender/editors/space_clip/CMakeLists.txt
@@ -23,9 +23,10 @@
set(INC
../include
- ../../blenkernel
../../blenfont
+ ../../blenkernel
../../blenlib
+ ../../blentranslation
../../imbuf
../../gpu
../../makesdna
diff --git a/source/blender/editors/space_clip/SConscript b/source/blender/editors/space_clip/SConscript
index 8fec4ebf0fa..37b83946e93 100644
--- a/source/blender/editors/space_clip/SConscript
+++ b/source/blender/editors/space_clip/SConscript
@@ -29,7 +29,8 @@ Import ('env')
sources = env.Glob('*.c')
-defs = env['BF_GL_DEFINITIONS']
+defs = []
+defs += env['BF_GL_DEFINITIONS']
incs = [
'#/intern/guardedalloc',
@@ -39,6 +40,7 @@ incs = [
'../../blenfont',
'../../blenkernel',
'../../blenlib',
+ '../../blentranslation',
'../../gpu',
'../../imbuf',
'../../makesdna',
diff --git a/source/blender/editors/space_clip/clip_buttons.c b/source/blender/editors/space_clip/clip_buttons.c
index c32d06cf9b1..0378c68d12c 100644
--- a/source/blender/editors/space_clip/clip_buttons.c
+++ b/source/blender/editors/space_clip/clip_buttons.c
@@ -44,7 +44,7 @@
#include "BLI_path_util.h"
#include "BLI_string.h"
-#include "BLF_translation.h"
+#include "BLT_translation.h"
#include "BKE_context.h"
#include "BKE_depsgraph.h"
diff --git a/source/blender/editors/space_clip/clip_draw.c b/source/blender/editors/space_clip/clip_draw.c
index 05e7354ac79..ba5bf7449d2 100644
--- a/source/blender/editors/space_clip/clip_draw.c
+++ b/source/blender/editors/space_clip/clip_draw.c
@@ -286,7 +286,6 @@ 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);
@@ -313,10 +312,12 @@ static void draw_movieclip_buffer(const bContext *C, SpaceClip *sc, ARegion *ar,
/* 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 (sc->flag & SC_SHOW_METADATA) {
+ rctf frame;
+ BLI_rctf_init(&frame, 0.0f, ibuf->x, 0.0f, ibuf->y);
+ ED_region_image_metadata_draw(x, y, ibuf, &frame, zoomx * width / ibuf->x, zoomy * height / ibuf->y);
+ }
if (ibuf->planes == 32)
glDisable(GL_BLEND);
@@ -520,7 +521,7 @@ static void draw_marker_outline(SpaceClip *sc, MovieTrackingTrack *track, MovieT
/* pattern and search outline */
glPushMatrix();
- glTranslatef(marker_pos[0], marker_pos[1], 0);
+ glTranslate2fv(marker_pos);
if (!tiny)
glLineWidth(3.0f);
@@ -652,7 +653,7 @@ static void draw_marker_areas(SpaceClip *sc, MovieTrackingTrack *track, MovieTra
/* pattern */
glPushMatrix();
- glTranslatef(marker_pos[0], marker_pos[1], 0);
+ glTranslate2fv(marker_pos);
if (tiny) {
glLineStipple(3, 0xaaaa);
@@ -805,7 +806,7 @@ static void draw_marker_slide_zones(SpaceClip *sc, MovieTrackingTrack *track, Mo
}
glPushMatrix();
- glTranslatef(marker_pos[0], marker_pos[1], 0);
+ glTranslate2fv(marker_pos);
dx = 6.0f / width / sc->zoom;
dy = 6.0f / height / sc->zoom;
@@ -1259,7 +1260,7 @@ static void draw_tracking_tracks(SpaceClip *sc, Scene *scene, ARegion *ar, Movie
/* ** find window pixel coordinates of origin ** */
/* UI_view2d_view_to_region_no_clip return integer values, this could
- * lead to 1px flickering when view is locked to selection during playbeck.
+ * lead to 1px flickering when view is locked to selection during playback.
* to avoid this flickering, calculate base point in the same way as it happens
* in UI_view2d_view_to_region_no_clip, but do it in floats here */
@@ -1786,7 +1787,7 @@ void clip_draw_grease_pencil(bContext *C, int onlyv2d)
int framenr = ED_space_clip_get_clip_frame_number(sc);
MovieTrackingMarker *marker = BKE_tracking_marker_get(track, framenr);
- glTranslatef(marker->pos[0], marker->pos[1], 0.0f);
+ glTranslate2fv(marker->pos);
}
}
diff --git a/source/blender/editors/space_clip/clip_ops.c b/source/blender/editors/space_clip/clip_ops.c
index 1d398177d9f..af3d460fe0f 100644
--- a/source/blender/editors/space_clip/clip_ops.c
+++ b/source/blender/editors/space_clip/clip_ops.c
@@ -52,7 +52,7 @@
#include "BLI_task.h"
#include "BLI_string.h"
-#include "BLF_translation.h"
+#include "BLT_translation.h"
#include "BKE_context.h"
#include "BKE_global.h"
@@ -213,7 +213,7 @@ static int open_exec(bContext *C, wmOperator *op)
errno = 0;
- clip = BKE_movieclip_file_add(bmain, str);
+ clip = BKE_movieclip_file_add_exists(bmain, str);
if (!clip) {
if (op->customdata)
@@ -300,7 +300,7 @@ void CLIP_OT_open(wmOperatorType *ot)
/* properties */
WM_operator_properties_filesel(ot, FILE_TYPE_FOLDER | FILE_TYPE_IMAGE | FILE_TYPE_MOVIE, FILE_SPECIAL, FILE_OPENFILE,
- WM_FILESEL_RELPATH | WM_FILESEL_FILES | WM_FILESEL_DIRECTORY, FILE_DEFAULTDISPLAY);
+ WM_FILESEL_RELPATH | WM_FILESEL_FILES | WM_FILESEL_DIRECTORY, FILE_DEFAULTDISPLAY, FILE_SORT_ALPHA);
}
/******************* reload clip operator *********************/
diff --git a/source/blender/editors/space_clip/clip_toolbar.c b/source/blender/editors/space_clip/clip_toolbar.c
index 608c1136070..d31d7f53b30 100644
--- a/source/blender/editors/space_clip/clip_toolbar.c
+++ b/source/blender/editors/space_clip/clip_toolbar.c
@@ -38,7 +38,7 @@
#include "BLI_blenlib.h"
#include "BLI_utildefines.h"
-#include "BLF_translation.h"
+#include "BLT_translation.h"
#include "BKE_context.h"
#include "BKE_screen.h"
@@ -258,7 +258,7 @@ void ED_clip_tool_props_register(ARegionType *art)
pt = MEM_callocN(sizeof(PanelType), "spacetype clip panel last operator");
strcpy(pt->idname, "CLIP_PT_last_operator");
strcpy(pt->label, N_("Operator"));
- strcpy(pt->translation_context, BLF_I18NCONTEXT_DEFAULT_BPYRNA);
+ strcpy(pt->translation_context, BLT_I18NCONTEXT_DEFAULT_BPYRNA);
pt->draw_header = clip_panel_operator_redo_header;
pt->draw = clip_panel_operator_redo;
BLI_addtail(&art->paneltypes, pt);
diff --git a/source/blender/editors/space_clip/tracking_ops.c b/source/blender/editors/space_clip/tracking_ops.c
index 91e11d30cc2..a19fa97965a 100644
--- a/source/blender/editors/space_clip/tracking_ops.c
+++ b/source/blender/editors/space_clip/tracking_ops.c
@@ -68,7 +68,7 @@
#include "RNA_access.h"
#include "RNA_define.h"
-#include "BLF_translation.h"
+#include "BLT_translation.h"
#include "PIL_time.h"