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/interface')
-rw-r--r--source/blender/editors/interface/interface_draw.c18
-rw-r--r--source/blender/editors/interface/interface_templates.c11
2 files changed, 20 insertions, 9 deletions
diff --git a/source/blender/editors/interface/interface_draw.c b/source/blender/editors/interface/interface_draw.c
index 7dd07db9b30..6ebb67af67a 100644
--- a/source/blender/editors/interface/interface_draw.c
+++ b/source/blender/editors/interface/interface_draw.c
@@ -1465,6 +1465,8 @@ static ImBuf *scale_trackpreview_ibuf(ImBuf *ibuf, float zoomx, float zoomy)
{
ImBuf *scaleibuf;
int x, y, w= ibuf->x*zoomx, h= ibuf->y*zoomy;
+ const float max_x= ibuf->x-1.0f;
+ const float max_y= ibuf->y-1.0f;
const float scalex= 1.0f/zoomx;
const float scaley= 1.0f/zoomy;
@@ -1472,15 +1474,13 @@ static ImBuf *scale_trackpreview_ibuf(ImBuf *ibuf, float zoomx, float zoomy)
for(y= 0; y<scaleibuf->y; y++) {
for (x= 0; x<scaleibuf->x; x++) {
- int pixel= scaleibuf->x*y + x;
- int orig_pixel= ibuf->x*(int)(scaley*(float)y) + (int)(scalex*(float)x);
- char *rrgb= (char*)scaleibuf->rect + pixel*4;
- char *orig_rrgb= (char*)ibuf->rect + orig_pixel*4;
-
- rrgb[0]= orig_rrgb[0];
- rrgb[1]= orig_rrgb[1];
- rrgb[2]= orig_rrgb[2];
- rrgb[3]= orig_rrgb[3];
+ float src_x= scalex*x;
+ float src_y= scaley*y;
+
+ CLAMP(src_x, 0, max_x);
+ CLAMP(src_y, 0, max_y);
+
+ bicubic_interpolation(ibuf, scaleibuf, src_x, src_y, x, y);
}
}
diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c
index 49e3ff10f06..9853c9c049b 100644
--- a/source/blender/editors/interface/interface_templates.c
+++ b/source/blender/editors/interface/interface_templates.c
@@ -2198,6 +2198,17 @@ static void list_item_row(bContext *C, uiLayout *layout, PointerRNA *ptr, Pointe
}
uiDefButR(block, OPTION, 0, "", 0, 0, UI_UNIT_X, UI_UNIT_Y, itemptr, "is_active", i, 0, 0, 0, 0, NULL);
}
+ else if(itemptr->type == &RNA_MovieTrackingObject) {
+ MovieTrackingObject *tracking_object= (MovieTrackingObject*)itemptr->data;
+
+ split= uiLayoutSplit(sub, 0.75f, 0);
+ if(tracking_object->flag&TRACKING_OBJECT_CAMERA) {
+ uiItemL(split, name, ICON_CAMERA_DATA);
+ }
+ else {
+ uiItemL(split, name, ICON_OBJECT_DATA);
+ }
+ }
/* There is a last chance to display custom controls (in addition to the name/label):
* If the given item property group features a string property named as prop_list,