Merge branch 'master' into blender2.8

This commit is contained in:
Campbell Barton 2018-01-16 14:56:03 +11:00
commit 873a87c7e8
15 changed files with 57 additions and 47 deletions

View File

@ -514,7 +514,7 @@ int BKE_node_clipboard_get_type(void);
/* Node Instance Hash */
typedef struct bNodeInstanceHash {
GHash *ghash; /* XXX should be made a direct member, GHash allocation needs to support it */
GHash *ghash; /* XXX should be made a direct member, GHash allocation needs to support it */
} bNodeInstanceHash;
typedef void (*bNodeInstanceValueFP)(void *value);

View File

@ -267,8 +267,8 @@ void BKE_blender_userdef_app_template_data_swap(UserDef *userdef_a, UserDef *use
const ty f = flags; \
const ty a = userdef_a->id; \
const ty b = userdef_b->id; \
userdef_a->id = (userdef_a->id & ~f) | (b & f); \
userdef_b->id = (userdef_b->id & ~f) | (a & f); \
userdef_a->id = (userdef_a->id & ~f) | (b & f); \
userdef_b->id = (userdef_b->id & ~f) | (a & f); \
} ((void)0)

View File

@ -3051,7 +3051,7 @@ int dynamicPaint_createUVSurface(Scene *scene, DynamicPaintSurface *surface, flo
if (tempPoints[index].tri_index != -1) {
memcpy(&f_data->uv_p[cursor], &tempPoints[index], sizeof(PaintUVPoint));
memcpy(&f_data->barycentricWeights[cursor * aa_samples], &tempWeights[index * aa_samples],
sizeof(*tempWeights) * aa_samples);
sizeof(*tempWeights) * aa_samples);
cursor++;
}
}

View File

@ -2249,8 +2249,8 @@ void BKE_library_make_local(
* was not used locally would be a nasty bug! */
if (is_local || is_lib) {
printf("Warning, made-local proxy object %s will loose its link to %s, "
"because the linked-in proxy is referenced (is_local=%i, is_lib=%i).\n",
id->newid->name, ob->proxy->id.name, is_local, is_lib);
"because the linked-in proxy is referenced (is_local=%i, is_lib=%i).\n",
id->newid->name, ob->proxy->id.name, is_local, is_lib);
}
else {
/* we can switch the proxy'ing from the linked-in to the made-local proxy.
@ -2306,8 +2306,8 @@ void BKE_library_make_local(
* was not used locally would be a nasty bug! */
else if (is_local || is_lib) {
printf("Warning, made-local proxy object %s will loose its link to %s, "
"because the linked-in proxy is referenced (is_local=%i, is_lib=%i).\n",
id->newid->name, ob->proxy->id.name, is_local, is_lib);
"because the linked-in proxy is referenced (is_local=%i, is_lib=%i).\n",
id->newid->name, ob->proxy->id.name, is_local, is_lib);
}
else {
/* we can switch the proxy'ing from the linked-in to the made-local proxy.

View File

@ -158,7 +158,7 @@ static int write_audio_frame(FFMpegContext *context)
for (channel = 0; channel < c->channels; channel++) {
for (i = 0; i < frame->nb_samples; i++) {
memcpy(context->audio_deinterleave_buffer + (i + channel * frame->nb_samples) * context->audio_sample_size,
context->audio_input_buffer + (c->channels * i + channel) * context->audio_sample_size, context->audio_sample_size);
context->audio_input_buffer + (c->channels * i + channel) * context->audio_sample_size, context->audio_sample_size);
}
}

View File

@ -72,14 +72,15 @@
BMO_vert_flag_test(pc->bm_bmoflag, v, VERT_EXCLUDE) == 0)
#if 0
#define ELE_TOUCH_TEST(e) \
(CHECK_TYPE_ANY(e, BMVert *, BMEdge *, BMElem *, BMElemF *), \
BMO_elem_flag_test(pc->bm_bmoflag, (BMElemF *)e, ELE_TOUCHED))
#define ELE_TOUCH_TEST(e) ( \
CHECK_TYPE_ANY(e, BMVert *, BMEdge *, BMElem *, BMElemF *), \
BMO_elem_flag_test(pc->bm_bmoflag, (BMElemF *)e, ELE_TOUCHED) \
)
#endif
#define ELE_TOUCH_MARK(e) \
{ CHECK_TYPE_ANY(e, BMVert *, BMEdge *, BMElem *, BMElemF *); \
BMO_elem_flag_enable(pc->bm_bmoflag, (BMElemF *)e, ELE_TOUCHED); } ((void)0)
#define ELE_TOUCH_MARK(e) { \
CHECK_TYPE_ANY(e, BMVert *, BMEdge *, BMElem *, BMElemF *); \
BMO_elem_flag_enable(pc->bm_bmoflag, (BMElemF *)e, ELE_TOUCHED); \
} ((void)0)
#define ELE_TOUCH_TEST_VERT(v) BMO_vert_flag_test(pc->bm_bmoflag, v, ELE_TOUCHED)
// #define ELE_TOUCH_MARK_VERT(v) BMO_vert_flag_enable(pc->bm_bmoflag, (BMElemF *)v, ELE_TOUCHED)

View File

@ -816,10 +816,11 @@ void AnimationImporter::apply_matrix_curves(Object *ob, std::vector<FCurve *>& a
float rot[4], loc[3], scale[3];
mat4_to_quat(rot, mat);
/*for ( int i = 0 ; i < 4 ; i ++ )
{
rot[i] = RAD2DEGF(rot[i]);
}*/
#if 0
for (int i = 0 ; i < 4; i++) {
rot[i] = RAD2DEGF(rot[i]);
}
#endif
copy_v3_v3(loc, mat[3]);
mat4_to_size(scale, mat);

View File

@ -64,7 +64,7 @@ typedef enum ChunkExecutionState {
*/
class ExecutionGroup {
public:
typedef std::vector<NodeOperation*> Operations;
typedef std::vector<NodeOperation*> Operations;
private:
// fields

View File

@ -2278,7 +2278,7 @@ static void ui_but_copy_paste(bContext *C, uiBut *but, uiHandleButtonData *data,
char buf_copy[UI_MAX_DRAW_STR];
if (array_length == 4) {
values[3] = RNA_property_float_get_index(&but->rnapoin, but->rnaprop, 3);
values[3] = RNA_property_float_get_index(&but->rnapoin, but->rnaprop, 3);
}
else {
values[3] = 0.0f;
@ -5980,6 +5980,7 @@ static int ui_do_but_COLORBAND(
}
data->dragcbd = coba->data + coba->cur;
data->dragfstart = data->dragcbd->pos;
button_activate_state(C, but, BUTTON_STATE_NUM_EDITING);
}
@ -5996,7 +5997,15 @@ static int ui_do_but_COLORBAND(
else if (event->type == LEFTMOUSE && event->val != KM_PRESS) {
button_activate_state(C, but, BUTTON_STATE_EXIT);
}
else if (ELEM(event->type, ESCKEY, RIGHTMOUSE)) {
if (event->val == KM_PRESS) {
data->dragcbd->pos = data->dragfstart;
BKE_colorband_update_sort(data->coba);
data->cancel = true;
data->escapecancel = true;
button_activate_state(C, but, BUTTON_STATE_EXIT);
}
}
return WM_UI_HANDLER_BREAK;
}
@ -6005,8 +6014,8 @@ static int ui_do_but_COLORBAND(
static bool ui_numedit_but_CURVE(
uiBlock *block, uiBut *but, uiHandleButtonData *data,
int evtx, int evty,
bool snap, const bool shift)
int evtx, int evty,
bool snap, const bool shift)
{
CurveMapping *cumap = (CurveMapping *)but->poin;
CurveMap *cuma = cumap->cm + cumap->cur;

View File

@ -980,14 +980,12 @@ void view3d_cached_text_draw_end(View3D *v3d, ARegion *ar, bool depth_write)
col_pack_prev = vos->col.pack;
}
((vos->flag & V3D_CACHE_TEXT_ASCII) ?
BLF_draw_default_ascii :
BLF_draw_default
)((float)(vos->sco[0] + vos->xoffs),
(float)(vos->sco[1]),
(depth_write) ? 0.0f : 2.0f,
vos->str,
vos->str_len);
((vos->flag & V3D_CACHE_TEXT_ASCII) ? BLF_draw_default_ascii : BLF_draw_default)(
(float)(vos->sco[0] + vos->xoffs),
(float)(vos->sco[1]),
(depth_write) ? 0.0f : 2.0f,
vos->str,
vos->str_len);
}
}

View File

@ -5654,12 +5654,12 @@ static void slide_origdata_interp_data_vert(
if (sod->layer_math_map_num) {
if (do_loop_weight) {
for (j = 0; j < sod->layer_math_map_num; j++) {
BM_vert_loop_groups_data_layer_merge_weights(bm, sv->cd_loop_groups[j], sod->layer_math_map[j], loop_weights);
BM_vert_loop_groups_data_layer_merge_weights(bm, sv->cd_loop_groups[j], sod->layer_math_map[j], loop_weights);
}
}
else {
for (j = 0; j < sod->layer_math_map_num; j++) {
BM_vert_loop_groups_data_layer_merge(bm, sv->cd_loop_groups[j], sod->layer_math_map[j]);
BM_vert_loop_groups_data_layer_merge(bm, sv->cd_loop_groups[j], sod->layer_math_map[j]);
}
}
}

View File

@ -1004,8 +1004,8 @@ void texco_orco(vec3 attorco, out vec3 orco)
void texco_uv(vec2 attuv, out vec3 uv)
{
/* disabled for now, works together with leaving out mtex_2d_mapping
uv = vec3(attuv * 2.0 - vec2(1.0), 0.0); */
/* disabled for now, works together with leaving out mtex_2d_mapping */
// uv = vec3(attuv*2.0 - vec2(1.0, 1.0), 0.0); */
uv = vec3(attuv, 0.0);
}

View File

@ -1419,9 +1419,9 @@ static PyObject *pyrna_enum_to_py(PointerRNA *ptr, PropertyRNA *prop, int val)
/* prefer not fail silently in case of api errors, maybe disable it later */
printf("RNA Warning: Current value \"%d\" "
"matches no enum in '%s', '%s', '%s'\n",
val, RNA_struct_identifier(ptr->type),
ptr_name, RNA_property_identifier(prop));
"matches no enum in '%s', '%s', '%s'\n",
val, RNA_struct_identifier(ptr->type),
ptr_name, RNA_property_identifier(prop));
#if 0 /* gives python decoding errors while generating docs :( */
char error_str[256];

View File

@ -3798,12 +3798,13 @@ static GroupObject *add_render_lamp(Render *re, Object *ob)
copy_v3_v3(vec, ob->obmat[2]);
normalize_v3(vec);
InitSunSky(lar->sunsky, la->atm_turbidity, vec, la->horizon_brightness,
la->spread, la->sun_brightness, la->sun_size, la->backscattered_light,
la->skyblendfac, la->skyblendtype, la->sky_exposure, la->sky_colorspace);
InitAtmosphere(lar->sunsky, la->sun_intensity, 1.0, 1.0, la->atm_inscattering_factor, la->atm_extinction_factor,
la->atm_distance_factor);
InitSunSky(
lar->sunsky, la->atm_turbidity, vec, la->horizon_brightness,
la->spread, la->sun_brightness, la->sun_size, la->backscattered_light,
la->skyblendfac, la->skyblendtype, la->sky_exposure, la->sky_colorspace);
InitAtmosphere(
lar->sunsky, la->sun_intensity, 1.0, 1.0, la->atm_inscattering_factor, la->atm_extinction_factor,
la->atm_distance_factor);
}
}
else lar->ray_totsamp= 0;

View File

@ -576,7 +576,7 @@ void shadeSunView(float col_r[3], const float view[3])
GetSkyXYZRadiancef(lar->sunsky, sview, colorxyz);
xyz_to_rgb(colorxyz[0], colorxyz[1], colorxyz[2], &sun_collector[0], &sun_collector[1], &sun_collector[2],
lar->sunsky->sky_colorspace);
lar->sunsky->sky_colorspace);
ramp_blend(lar->sunsky->skyblendtype, col_r, lar->sunsky->skyblendfac, sun_collector);
}