Merge branch 'master' into blender2.8
This commit is contained in:
@@ -430,7 +430,10 @@ public:
|
||||
<< string_human_readable_number(max_buffer_size) << " bytes. ("
|
||||
<< string_human_readable_size(max_buffer_size) << ").";
|
||||
|
||||
size_t num_elements = max_elements_for_max_buffer_size(kg, data, max_buffer_size / 2);
|
||||
/* Limit to 2gb, as we shouldn't need more than that and some devices may support much more. */
|
||||
max_buffer_size = min(max_buffer_size / 2, (cl_ulong)2l*1024*1024*1024);
|
||||
|
||||
size_t num_elements = max_elements_for_max_buffer_size(kg, data, max_buffer_size);
|
||||
int2 global_size = make_int2(max(round_down((int)sqrt(num_elements), 64), 64), (int)sqrt(num_elements));
|
||||
VLOG(1) << "Global size: " << global_size << ".";
|
||||
return global_size;
|
||||
|
||||
@@ -471,6 +471,7 @@ class CLIP_PT_tools_cleanup(CLIP_PT_tracking_panel, Panel):
|
||||
layout.prop(settings, "clean_frames", text="Frames")
|
||||
layout.prop(settings, "clean_error", text="Error")
|
||||
layout.prop(settings, "clean_action", text="")
|
||||
layout.separator()
|
||||
layout.operator("clip.filter_tracks")
|
||||
|
||||
|
||||
|
||||
@@ -155,7 +155,7 @@ enum {
|
||||
|
||||
/* but->flag - general state flags. */
|
||||
enum {
|
||||
/* warning, the first 6 flags are internal */
|
||||
/* warning, the first 5 flags are internal */
|
||||
UI_BUT_ICON_SUBMENU = (1 << 6),
|
||||
UI_BUT_ICON_PREVIEW = (1 << 7),
|
||||
|
||||
|
||||
@@ -119,8 +119,7 @@ enum {
|
||||
UI_SCROLLED = (1 << 1), /* temp hidden, scrolled away */
|
||||
UI_ACTIVE = (1 << 2),
|
||||
UI_HAS_ICON = (1 << 3),
|
||||
UI_TEXTINPUT = (1 << 4),
|
||||
UI_HIDDEN = (1 << 5),
|
||||
UI_HIDDEN = (1 << 4),
|
||||
/* warn: rest of uiBut->flag in UI_interface.h */
|
||||
};
|
||||
|
||||
|
||||
@@ -67,14 +67,16 @@
|
||||
#define ICON_SIZE_FROM_BUTRECT(rect) (0.8f * BLI_rcti_size_y(rect))
|
||||
|
||||
#define UI_BUT_FLAGS_PUBLIC \
|
||||
(UI_SELECT | UI_SCROLLED | UI_ACTIVE | UI_HAS_ICON | UI_TEXTINPUT | UI_HIDDEN)
|
||||
(UI_SELECT | UI_SCROLLED | UI_ACTIVE | UI_HAS_ICON | UI_HIDDEN)
|
||||
|
||||
/* Bits 0..5 are from UI_SELECT .. etc */
|
||||
/* Don't overlap w/ UI_BUT_FLAGS_PUBLIC buts. */
|
||||
enum {
|
||||
/* Show that holding the button opens a menu. */
|
||||
UI_STATE_HOLD_ACTION = (1 << 6),
|
||||
UI_STATE_TEXT_INPUT = (1 << 7),
|
||||
};
|
||||
|
||||
|
||||
/* ************** widget base functions ************** */
|
||||
/**
|
||||
* - in: roundbox codes for corner types and radius
|
||||
@@ -2037,7 +2039,7 @@ static void widget_state(uiWidgetType *wt, int state)
|
||||
{
|
||||
uiWidgetStateColors *wcol_state = wt->wcol_state;
|
||||
|
||||
if ((state & UI_BUT_LIST_ITEM) && !(state & UI_TEXTINPUT)) {
|
||||
if ((state & UI_BUT_LIST_ITEM) && !(state & UI_STATE_TEXT_INPUT)) {
|
||||
/* Override default widget's colors. */
|
||||
bTheme *btheme = UI_GetTheme();
|
||||
wt->wcol_theme = &btheme->tui.wcol_list_item;
|
||||
@@ -2772,14 +2774,14 @@ static void widget_numbut_draw(uiWidgetColors *wcol, rcti *rect, int state, int
|
||||
}
|
||||
|
||||
/* decoration */
|
||||
if (!(state & UI_TEXTINPUT)) {
|
||||
if (!(state & UI_STATE_TEXT_INPUT)) {
|
||||
shape_preset_init_number_arrows(&wtb.tria1, rect, 0.6f, 'l');
|
||||
shape_preset_init_number_arrows(&wtb.tria2, rect, 0.6f, 'r');
|
||||
}
|
||||
|
||||
widgetbase_draw(&wtb, wcol);
|
||||
|
||||
if (!(state & UI_TEXTINPUT)) {
|
||||
if (!(state & UI_STATE_TEXT_INPUT)) {
|
||||
/* text space */
|
||||
rect->xmin += textofs;
|
||||
rect->xmax -= textofs;
|
||||
@@ -3066,7 +3068,7 @@ static void widget_numslider(uiBut *but, uiWidgetColors *wcol, rcti *rect, int s
|
||||
widgetbase_draw(&wtb, wcol);
|
||||
|
||||
/* draw left/right parts only when not in text editing */
|
||||
if (!(state & UI_TEXTINPUT)) {
|
||||
if (!(state & UI_STATE_TEXT_INPUT)) {
|
||||
int roundboxalign_slider;
|
||||
|
||||
/* slider part */
|
||||
@@ -3117,7 +3119,7 @@ static void widget_numslider(uiBut *but, uiWidgetColors *wcol, rcti *rect, int s
|
||||
widgetbase_draw(&wtb, wcol);
|
||||
|
||||
/* add space at either side of the button so text aligns with numbuttons (which have arrow icons) */
|
||||
if (!(state & UI_TEXTINPUT)) {
|
||||
if (!(state & UI_STATE_TEXT_INPUT)) {
|
||||
rect->xmax -= toffs;
|
||||
rect->xmin += toffs;
|
||||
}
|
||||
@@ -4069,7 +4071,7 @@ void ui_draw_but(const bContext *C, ARegion *ar, uiStyle *style, uiBut *but, rct
|
||||
if ((but->editstr) ||
|
||||
(UNLIKELY(but->flag & UI_BUT_DRAG_MULTI) && ui_but_drag_multi_edit_get(but)))
|
||||
{
|
||||
state |= UI_TEXTINPUT;
|
||||
state |= UI_STATE_TEXT_INPUT;
|
||||
}
|
||||
|
||||
if (but->hold_func) {
|
||||
|
||||
Reference in New Issue
Block a user