Cleanup: indentation
This commit is contained in:
parent
6f45dea6ee
commit
e428ea3e00
@ -512,7 +512,7 @@ int BKE_node_clipboard_get_type(void);
|
|||||||
|
|
||||||
/* Node Instance Hash */
|
/* Node Instance Hash */
|
||||||
typedef struct bNodeInstanceHash {
|
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;
|
} bNodeInstanceHash;
|
||||||
|
|
||||||
typedef void (*bNodeInstanceValueFP)(void *value);
|
typedef void (*bNodeInstanceValueFP)(void *value);
|
||||||
|
@ -263,8 +263,8 @@ void BKE_blender_userdef_app_template_data_swap(UserDef *userdef_a, UserDef *use
|
|||||||
const ty f = flags; \
|
const ty f = flags; \
|
||||||
const ty a = userdef_a->id; \
|
const ty a = userdef_a->id; \
|
||||||
const ty b = userdef_b->id; \
|
const ty b = userdef_b->id; \
|
||||||
userdef_a->id = (userdef_a->id & ~f) | (b & f); \
|
userdef_a->id = (userdef_a->id & ~f) | (b & f); \
|
||||||
userdef_b->id = (userdef_b->id & ~f) | (a & f); \
|
userdef_b->id = (userdef_b->id & ~f) | (a & f); \
|
||||||
} ((void)0)
|
} ((void)0)
|
||||||
|
|
||||||
|
|
||||||
|
@ -3054,7 +3054,7 @@ int dynamicPaint_createUVSurface(Scene *scene, DynamicPaintSurface *surface, flo
|
|||||||
if (tempPoints[index].tri_index != -1) {
|
if (tempPoints[index].tri_index != -1) {
|
||||||
memcpy(&f_data->uv_p[cursor], &tempPoints[index], sizeof(PaintUVPoint));
|
memcpy(&f_data->uv_p[cursor], &tempPoints[index], sizeof(PaintUVPoint));
|
||||||
memcpy(&f_data->barycentricWeights[cursor * aa_samples], &tempWeights[index * aa_samples],
|
memcpy(&f_data->barycentricWeights[cursor * aa_samples], &tempWeights[index * aa_samples],
|
||||||
sizeof(*tempWeights) * aa_samples);
|
sizeof(*tempWeights) * aa_samples);
|
||||||
cursor++;
|
cursor++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2146,8 +2146,8 @@ void BKE_library_make_local(
|
|||||||
* was not used locally would be a nasty bug! */
|
* was not used locally would be a nasty bug! */
|
||||||
if (is_local || is_lib) {
|
if (is_local || is_lib) {
|
||||||
printf("Warning, made-local proxy object %s will loose its link to %s, "
|
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",
|
"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);
|
id->newid->name, ob->proxy->id.name, is_local, is_lib);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
/* we can switch the proxy'ing from the linked-in to the made-local proxy.
|
/* we can switch the proxy'ing from the linked-in to the made-local proxy.
|
||||||
@ -2203,8 +2203,8 @@ void BKE_library_make_local(
|
|||||||
* was not used locally would be a nasty bug! */
|
* was not used locally would be a nasty bug! */
|
||||||
else if (is_local || is_lib) {
|
else if (is_local || is_lib) {
|
||||||
printf("Warning, made-local proxy object %s will loose its link to %s, "
|
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",
|
"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);
|
id->newid->name, ob->proxy->id.name, is_local, is_lib);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
/* we can switch the proxy'ing from the linked-in to the made-local proxy.
|
/* we can switch the proxy'ing from the linked-in to the made-local proxy.
|
||||||
|
@ -158,7 +158,7 @@ static int write_audio_frame(FFMpegContext *context)
|
|||||||
for (channel = 0; channel < c->channels; channel++) {
|
for (channel = 0; channel < c->channels; channel++) {
|
||||||
for (i = 0; i < frame->nb_samples; i++) {
|
for (i = 0; i < frame->nb_samples; i++) {
|
||||||
memcpy(context->audio_deinterleave_buffer + (i + channel * frame->nb_samples) * context->audio_sample_size,
|
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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -72,14 +72,15 @@
|
|||||||
BMO_vert_flag_test(pc->bm_bmoflag, v, VERT_EXCLUDE) == 0)
|
BMO_vert_flag_test(pc->bm_bmoflag, v, VERT_EXCLUDE) == 0)
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
#define ELE_TOUCH_TEST(e) \
|
#define ELE_TOUCH_TEST(e) ( \
|
||||||
(CHECK_TYPE_ANY(e, BMVert *, BMEdge *, BMElem *, BMElemF *), \
|
CHECK_TYPE_ANY(e, BMVert *, BMEdge *, BMElem *, BMElemF *), \
|
||||||
BMO_elem_flag_test(pc->bm_bmoflag, (BMElemF *)e, ELE_TOUCHED))
|
BMO_elem_flag_test(pc->bm_bmoflag, (BMElemF *)e, ELE_TOUCHED) \
|
||||||
|
)
|
||||||
#endif
|
#endif
|
||||||
#define ELE_TOUCH_MARK(e) \
|
#define ELE_TOUCH_MARK(e) { \
|
||||||
{ CHECK_TYPE_ANY(e, BMVert *, BMEdge *, BMElem *, BMElemF *); \
|
CHECK_TYPE_ANY(e, BMVert *, BMEdge *, BMElem *, BMElemF *); \
|
||||||
BMO_elem_flag_enable(pc->bm_bmoflag, (BMElemF *)e, ELE_TOUCHED); } ((void)0)
|
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_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)
|
// #define ELE_TOUCH_MARK_VERT(v) BMO_vert_flag_enable(pc->bm_bmoflag, (BMElemF *)v, ELE_TOUCHED)
|
||||||
|
@ -816,10 +816,11 @@ void AnimationImporter::apply_matrix_curves(Object *ob, std::vector<FCurve *>& a
|
|||||||
float rot[4], loc[3], scale[3];
|
float rot[4], loc[3], scale[3];
|
||||||
|
|
||||||
mat4_to_quat(rot, mat);
|
mat4_to_quat(rot, mat);
|
||||||
/*for ( int i = 0 ; i < 4 ; i ++ )
|
#if 0
|
||||||
{
|
for (int i = 0 ; i < 4; i++) {
|
||||||
rot[i] = RAD2DEGF(rot[i]);
|
rot[i] = RAD2DEGF(rot[i]);
|
||||||
}*/
|
}
|
||||||
|
#endif
|
||||||
copy_v3_v3(loc, mat[3]);
|
copy_v3_v3(loc, mat[3]);
|
||||||
mat4_to_size(scale, mat);
|
mat4_to_size(scale, mat);
|
||||||
|
|
||||||
|
@ -64,7 +64,7 @@ typedef enum ChunkExecutionState {
|
|||||||
*/
|
*/
|
||||||
class ExecutionGroup {
|
class ExecutionGroup {
|
||||||
public:
|
public:
|
||||||
typedef std::vector<NodeOperation*> Operations;
|
typedef std::vector<NodeOperation*> Operations;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// fields
|
// fields
|
||||||
|
@ -2284,7 +2284,7 @@ static void ui_but_copy_paste(bContext *C, uiBut *but, uiHandleButtonData *data,
|
|||||||
char buf_copy[UI_MAX_DRAW_STR];
|
char buf_copy[UI_MAX_DRAW_STR];
|
||||||
|
|
||||||
if (array_length == 4) {
|
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 {
|
else {
|
||||||
values[3] = 0.0f;
|
values[3] = 0.0f;
|
||||||
@ -6017,8 +6017,8 @@ static int ui_do_but_COLORBAND(
|
|||||||
|
|
||||||
static bool ui_numedit_but_CURVE(
|
static bool ui_numedit_but_CURVE(
|
||||||
uiBlock *block, uiBut *but, uiHandleButtonData *data,
|
uiBlock *block, uiBut *but, uiHandleButtonData *data,
|
||||||
int evtx, int evty,
|
int evtx, int evty,
|
||||||
bool snap, const bool shift)
|
bool snap, const bool shift)
|
||||||
{
|
{
|
||||||
CurveMapping *cumap = (CurveMapping *)but->poin;
|
CurveMapping *cumap = (CurveMapping *)but->poin;
|
||||||
CurveMap *cuma = cumap->cm + cumap->cur;
|
CurveMap *cuma = cumap->cm + cumap->cur;
|
||||||
|
@ -926,14 +926,12 @@ void view3d_cached_text_draw_end(View3D *v3d, ARegion *ar, bool depth_write)
|
|||||||
col_pack_prev = vos->col.pack;
|
col_pack_prev = vos->col.pack;
|
||||||
}
|
}
|
||||||
|
|
||||||
((vos->flag & V3D_CACHE_TEXT_ASCII) ?
|
((vos->flag & V3D_CACHE_TEXT_ASCII) ? BLF_draw_default_ascii : BLF_draw_default)(
|
||||||
BLF_draw_default_ascii :
|
(float)(vos->sco[0] + vos->xoffs),
|
||||||
BLF_draw_default
|
(float)(vos->sco[1]),
|
||||||
)((float)(vos->sco[0] + vos->xoffs),
|
(depth_write) ? 0.0f : 2.0f,
|
||||||
(float)(vos->sco[1]),
|
vos->str,
|
||||||
(depth_write) ? 0.0f : 2.0f,
|
vos->str_len);
|
||||||
vos->str,
|
|
||||||
vos->str_len);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5626,12 +5626,12 @@ static void slide_origdata_interp_data_vert(
|
|||||||
if (sod->layer_math_map_num) {
|
if (sod->layer_math_map_num) {
|
||||||
if (do_loop_weight) {
|
if (do_loop_weight) {
|
||||||
for (j = 0; j < sod->layer_math_map_num; j++) {
|
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 {
|
else {
|
||||||
for (j = 0; j < sod->layer_math_map_num; j++) {
|
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]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -954,8 +954,8 @@ void texco_orco(vec3 attorco, out vec3 orco)
|
|||||||
|
|
||||||
void texco_uv(vec2 attuv, out vec3 uv)
|
void texco_uv(vec2 attuv, out vec3 uv)
|
||||||
{
|
{
|
||||||
/* disabled for now, works together with leaving out mtex_2d_mapping
|
/* 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*2.0 - vec2(1.0, 1.0), 0.0); */
|
||||||
uv = vec3(attuv, 0.0);
|
uv = vec3(attuv, 0.0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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 */
|
/* prefer not fail silently in case of api errors, maybe disable it later */
|
||||||
printf("RNA Warning: Current value \"%d\" "
|
printf("RNA Warning: Current value \"%d\" "
|
||||||
"matches no enum in '%s', '%s', '%s'\n",
|
"matches no enum in '%s', '%s', '%s'\n",
|
||||||
val, RNA_struct_identifier(ptr->type),
|
val, RNA_struct_identifier(ptr->type),
|
||||||
ptr_name, RNA_property_identifier(prop));
|
ptr_name, RNA_property_identifier(prop));
|
||||||
|
|
||||||
#if 0 /* gives python decoding errors while generating docs :( */
|
#if 0 /* gives python decoding errors while generating docs :( */
|
||||||
char error_str[256];
|
char error_str[256];
|
||||||
|
@ -3794,12 +3794,13 @@ static GroupObject *add_render_lamp(Render *re, Object *ob)
|
|||||||
copy_v3_v3(vec, ob->obmat[2]);
|
copy_v3_v3(vec, ob->obmat[2]);
|
||||||
normalize_v3(vec);
|
normalize_v3(vec);
|
||||||
|
|
||||||
InitSunSky(lar->sunsky, la->atm_turbidity, vec, la->horizon_brightness,
|
InitSunSky(
|
||||||
la->spread, la->sun_brightness, la->sun_size, la->backscattered_light,
|
lar->sunsky, la->atm_turbidity, vec, la->horizon_brightness,
|
||||||
la->skyblendfac, la->skyblendtype, la->sky_exposure, la->sky_colorspace);
|
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,
|
InitAtmosphere(
|
||||||
la->atm_distance_factor);
|
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;
|
else lar->ray_totsamp= 0;
|
||||||
|
@ -576,7 +576,7 @@ void shadeSunView(float col_r[3], const float view[3])
|
|||||||
|
|
||||||
GetSkyXYZRadiancef(lar->sunsky, sview, colorxyz);
|
GetSkyXYZRadiancef(lar->sunsky, sview, colorxyz);
|
||||||
xyz_to_rgb(colorxyz[0], colorxyz[1], colorxyz[2], &sun_collector[0], &sun_collector[1], &sun_collector[2],
|
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);
|
ramp_blend(lar->sunsky->skyblendtype, col_r, lar->sunsky->skyblendfac, sun_collector);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user