Cleanup: clang-format

This commit is contained in:
Brecht Van Lommel 2020-02-25 15:11:33 +01:00
parent fe3264fafd
commit 1bbc1eed62
3 changed files with 12 additions and 14 deletions

View File

@ -800,7 +800,8 @@ bool UI_context_copy_to_selected_list(bContext *C,
*r_lb = CTX_data_collection_get(C, "selected_editable_fcurves");
}
else if (RNA_struct_is_a(ptr->type, &RNA_Constraint) &&
(path_from_bone = RNA_path_resolve_from_type_to_property(ptr, prop, &RNA_PoseBone)) != NULL) {
(path_from_bone = RNA_path_resolve_from_type_to_property(ptr, prop, &RNA_PoseBone)) !=
NULL) {
*r_lb = CTX_data_collection_get(C, "selected_pose_bones");
*r_path = path_from_bone;
}

View File

@ -30,20 +30,21 @@ const vec2 offsets16[16] = vec2[16](vec2(-1.5, 1.5),
vec2(1.5, -1.5));
//#define GPU_NEAREST
#define sample_glyph_offset(texel, ofs) texture_1D_custom_bilinear_filter(texCoord_interp + ofs * texel)
#define sample_glyph_offset(texel, ofs) \
texture_1D_custom_bilinear_filter(texCoord_interp + ofs * texel)
float texel_fetch(int index)
{
int size_x = textureSize(glyph, 0).r;
if (index >= size_x) {
return texelFetch(glyph, ivec2(index % size_x, index / size_x), 0).r;
}
return texelFetch(glyph, ivec2(index, 0), 0).r;
int size_x = textureSize(glyph, 0).r;
if (index >= size_x) {
return texelFetch(glyph, ivec2(index % size_x, index / size_x), 0).r;
}
return texelFetch(glyph, ivec2(index, 0), 0).r;
}
bool is_inside_box(ivec2 v)
{
return all(greaterThanEqual(v, ivec2(0))) && all(lessThan(v, glyph_dim));
return all(greaterThanEqual(v, ivec2(0))) && all(lessThan(v, glyph_dim));
}
float texture_1D_custom_bilinear_filter(vec2 uv)
@ -60,7 +61,7 @@ float texture_1D_custom_bilinear_filter(vec2 uv)
#ifdef GPU_NEAREST
return tl;
#else //GPU_LINEAR
#else // GPU_LINEAR
int offset_x = 1;
int offset_y = glyph_dim.x;

View File

@ -131,11 +131,7 @@ const EnumPropertyItem rna_enum_vector_rotate_type_items[] = {
{NODE_VECTOR_ROTATE_TYPE_AXIS_X, "X_AXIS", 0, "X Axis", "Rotate a point using X axis"},
{NODE_VECTOR_ROTATE_TYPE_AXIS_Y, "Y_AXIS", 0, "Y Axis", "Rotate a point using Y axis"},
{NODE_VECTOR_ROTATE_TYPE_AXIS_Z, "Z_AXIS", 0, "Z Axis", "Rotate a point using Z axis"},
{NODE_VECTOR_ROTATE_TYPE_EULER_XYZ,
"EULER_XYZ",
0,
"Euler",
"Rotate a point using XYZ order"},
{NODE_VECTOR_ROTATE_TYPE_EULER_XYZ, "EULER_XYZ", 0, "Euler", "Rotate a point using XYZ order"},
{0, NULL, 0, NULL, NULL},
};