Merge branch 'blender2.7'
This commit is contained in:
@@ -192,13 +192,13 @@ class CyclesRenderSettings(bpy.types.PropertyGroup):
|
||||
samples: IntProperty(
|
||||
name="Samples",
|
||||
description="Number of samples to render for each pixel",
|
||||
min=1, max=2147483647,
|
||||
min=1, max=(1 << 24),
|
||||
default=128,
|
||||
)
|
||||
preview_samples: IntProperty(
|
||||
name="Preview Samples",
|
||||
description="Number of samples to render in the viewport, unlimited if 0",
|
||||
min=0, max=2147483647,
|
||||
min=0, max=(1 << 24),
|
||||
default=32,
|
||||
)
|
||||
preview_pause: BoolProperty(
|
||||
|
||||
@@ -769,6 +769,9 @@ SessionParams BlenderSync::get_session_params(BL::RenderEngine& b_engine,
|
||||
}
|
||||
}
|
||||
|
||||
/* Clamp samples. */
|
||||
params.samples = min(params.samples, Integrator::MAX_SAMPLES);
|
||||
|
||||
/* tiles */
|
||||
const bool is_cpu = (params.device.type == DEVICE_CPU);
|
||||
if(!is_cpu && !background) {
|
||||
|
||||
@@ -55,6 +55,10 @@ public:
|
||||
float sample_clamp_indirect;
|
||||
bool motion_blur;
|
||||
|
||||
/* Maximum number of samples, beyond which we are likely to run into
|
||||
* precision issues for sampling patterns. */
|
||||
static const int MAX_SAMPLES = (1 << 24);
|
||||
|
||||
int aa_samples;
|
||||
int diffuse_samples;
|
||||
int glossy_samples;
|
||||
|
||||
@@ -84,7 +84,7 @@ public:
|
||||
|
||||
progressive = false;
|
||||
experimental = false;
|
||||
samples = INT_MAX;
|
||||
samples = 1024;
|
||||
tile_size = make_int2(64, 64);
|
||||
start_resolution = INT_MAX;
|
||||
pixel_size = 1;
|
||||
|
||||
@@ -3191,7 +3191,7 @@ static void ui_but_build_drawstr_int(uiBut *but, int value)
|
||||
* \param validate: When set, this function may change the button value.
|
||||
* Otherwise treat the button value as read-only.
|
||||
*/
|
||||
void ui_but_update_ex(uiBut *but, const bool validate)
|
||||
static void ui_but_update_ex(uiBut *but, const bool validate)
|
||||
{
|
||||
/* if something changed in the button */
|
||||
double value = UI_BUT_VALUE_UNSET;
|
||||
@@ -3199,7 +3199,7 @@ void ui_but_update_ex(uiBut *but, const bool validate)
|
||||
ui_but_update_select_flag(but, &value);
|
||||
|
||||
/* only update soft range while not editing */
|
||||
if (!(but->editval || but->editstr || but->editvec)) {
|
||||
if (!ui_but_is_editing(but)) {
|
||||
if ((but->rnaprop != NULL) ||
|
||||
(but->poin && (but->pointype & UI_BUT_POIN_TYPES)))
|
||||
{
|
||||
|
||||
@@ -6979,6 +6979,12 @@ bool ui_but_is_active(ARegion *ar)
|
||||
return (ui_but_find_active_in_region(ar) != NULL);
|
||||
}
|
||||
|
||||
bool ui_but_is_editing(uiBut *but)
|
||||
{
|
||||
uiHandleButtonData *data = but->active;
|
||||
return (data && ELEM(data->state, BUTTON_STATE_TEXT_EDITING, BUTTON_STATE_NUM_EDITING));
|
||||
}
|
||||
|
||||
/* is called by notifier */
|
||||
void UI_screen_free_active_but(const bContext *C, bScreen *screen)
|
||||
{
|
||||
|
||||
@@ -523,7 +523,6 @@ extern uiButExtraIconType ui_but_icon_extra_get(uiBut *but);
|
||||
|
||||
extern void ui_but_default_set(struct bContext *C, const bool all, const bool use_afterfunc);
|
||||
|
||||
extern void ui_but_update_ex(uiBut *but, const bool validate);
|
||||
extern void ui_but_update(uiBut *but);
|
||||
extern void ui_but_update_edited(uiBut *but);
|
||||
extern bool ui_but_is_float(const uiBut *but) ATTR_WARN_UNUSED_RESULT;
|
||||
@@ -728,6 +727,7 @@ extern void ui_but_execute_begin(struct bContext *C, struct ARegion *ar, uiBut *
|
||||
extern void ui_but_execute_end(struct bContext *C, struct ARegion *ar, uiBut *but, void *active_back);
|
||||
extern void ui_but_active_free(const struct bContext *C, uiBut *but);
|
||||
extern bool ui_but_is_active(struct ARegion *ar) ATTR_WARN_UNUSED_RESULT;
|
||||
extern bool ui_but_is_editing(uiBut *but);
|
||||
extern int ui_but_menu_direction(uiBut *but);
|
||||
extern void ui_but_text_password_hide(char password_str[UI_MAX_DRAW_STR], uiBut *but, const bool restore);
|
||||
extern uiBut *ui_but_find_select_in_enum(uiBut *but, int direction);
|
||||
|
||||
Reference in New Issue
Block a user