Cleanup: const args, naming, doxy groups, clang-format

This commit is contained in:
Campbell Barton
2019-08-23 09:03:57 +10:00
parent 1de7717ed7
commit adfb9ec87c
6 changed files with 16 additions and 11 deletions

View File

@@ -100,7 +100,7 @@ float distfactor_to_bone(
void BKE_armature_where_is(struct bArmature *arm);
void BKE_armature_where_is_bone(struct Bone *bone,
struct Bone *prevbone,
const struct Bone *bone_parent,
const bool use_recursion);
void BKE_pose_clear_pointers(struct bPose *pose);
void BKE_pose_remap_bone_pointers(struct bArmature *armature, struct bPose *pose);

View File

@@ -63,7 +63,7 @@ bool BKE_mball_minmax_ex(const struct MetaBall *mb,
bool BKE_mball_minmax(const struct MetaBall *mb, float min[3], float max[3]);
bool BKE_mball_center_median(const struct MetaBall *mb, float r_cent[3]);
bool BKE_mball_center_bounds(const struct MetaBall *mb, float r_cent[3]);
void BKE_mball_transform(struct MetaBall *mb, float mat[4][4], const bool do_props);
void BKE_mball_transform(struct MetaBall *mb, const float mat[4][4], const bool do_props);
void BKE_mball_translate(struct MetaBall *mb, const float offset[3]);
struct MetaElem *BKE_mball_element_add(struct MetaBall *mb, const int type);

View File

@@ -2285,7 +2285,7 @@ void vec_roll_to_mat3(const float vec[3], const float roll, float mat[3][3])
/* recursive part, calculates restposition of entire tree of children */
/* used by exiting editmode too */
void BKE_armature_where_is_bone(Bone *bone, Bone *prevbone, const bool use_recursion)
void BKE_armature_where_is_bone(Bone *bone, const Bone *bone_parent, const bool use_recursion)
{
float vec[3];
@@ -2301,13 +2301,13 @@ void BKE_armature_where_is_bone(Bone *bone, Bone *prevbone, const bool use_recur
bone->segments = 1;
}
if (prevbone) {
if (bone_parent) {
float offs_bone[4][4];
/* yoffs(b-1) + root(b) + bonemat(b) */
BKE_bone_offset_matrix_get(bone, offs_bone);
/* Compose the matrix for this bone */
mul_m4_m4m4(bone->arm_mat, prevbone->arm_mat, offs_bone);
mul_m4_m4m4(bone->arm_mat, bone_parent->arm_mat, offs_bone);
}
else {
copy_m4_m3(bone->arm_mat, bone->bone_mat);
@@ -2316,9 +2316,9 @@ void BKE_armature_where_is_bone(Bone *bone, Bone *prevbone, const bool use_recur
/* and the kiddies */
if (use_recursion) {
prevbone = bone;
bone_parent = bone;
for (bone = bone->childbase.first; bone; bone = bone->next) {
BKE_armature_where_is_bone(bone, prevbone, use_recursion);
BKE_armature_where_is_bone(bone, bone_parent, use_recursion);
}
}
}

View File

@@ -526,7 +526,7 @@ bool BKE_mball_center_bounds(const MetaBall *mb, float r_cent[3])
return false;
}
void BKE_mball_transform(MetaBall *mb, float mat[4][4], const bool do_props)
void BKE_mball_transform(MetaBall *mb, const float mat[4][4], const bool do_props)
{
float quat[4];
const float scale = mat4_to_scale(mat);

View File

@@ -1118,6 +1118,8 @@ static void SCREEN_OT_actionzone(wmOperatorType *ot)
RNA_def_int(ot->srna, "modifier", 0, 0, 2, "Modifier", "Modifier state", 0, 2);
}
/** \} */
/* -------------------------------------------------------------------- */
/** \name Area edge detection utility
* \{ */
@@ -1157,6 +1159,8 @@ static ScrEdge *screen_area_edge_from_cursor(const bContext *C,
return actedge;
}
/** \} */
/* -------------------------------------------------------------------- */
/** \name Swap Area Operator
* \{ */

View File

@@ -779,7 +779,7 @@ static void node_socket_draw(const bContext *C,
immAttr4fv(col_id, color);
immAttr1u(shape_id, flags);
immAttr1f(size_id, size);
immAttr1f(size_id, size);
immAttr4fv(outline_col_id, outline_color);
immVertex2f(pos_id, sock->locx, sock->locy);
}
@@ -944,7 +944,8 @@ void node_draw_sockets(View2D *v2d,
uint col_id = GPU_vertformat_attr_add(format, "color", GPU_COMP_F32, 4, GPU_FETCH_FLOAT);
uint shape_id = GPU_vertformat_attr_add(format, "flags", GPU_COMP_U32, 1, GPU_FETCH_INT);
uint size_id = GPU_vertformat_attr_add(format, "size", GPU_COMP_F32, 1, GPU_FETCH_FLOAT);
uint outline_col_id = GPU_vertformat_attr_add(format, "outlineColor", GPU_COMP_F32, 4, GPU_FETCH_FLOAT);
uint outline_col_id = GPU_vertformat_attr_add(
format, "outlineColor", GPU_COMP_F32, 4, GPU_FETCH_FLOAT);
GPU_blend(true);
GPU_program_point_size(true);
@@ -1018,7 +1019,7 @@ void node_draw_sockets(View2D *v2d,
/* go back and draw selected sockets */
if (selected_input_len + selected_output_len > 0) {
/* outline for selected sockets */
selected = true;
immBegin(GPU_PRIM_POINTS, selected_input_len + selected_output_len);