Cleanup: clang-format, remove tabs

This commit is contained in:
2019-06-04 10:51:48 +10:00
parent d62a749fcf
commit c13e10a740
11 changed files with 16 additions and 17 deletions

View File

@@ -1376,7 +1376,7 @@ void AnimationImporter::add_bone_animation_sampled(Object *ob,
for (int i = 0; i < totcu; i++) {
if (i < 4) {
add_bezt(newcu[i], fra, qref.quat()[i]);
}
}
else if (i < 7) {
add_bezt(newcu[i], fra, loc[i - 4]);
}
@@ -1842,7 +1842,7 @@ Object *AnimationImporter::translate_animation_OLD(
if (is_rotation || is_matrix) {
if (is_joint) {
bPoseChannel *chan = BKE_pose_channel_find_name(ob->pose, bone_name);
chan->rotmode = (is_matrix)? ROT_MODE_QUAT : ROT_MODE_EUL;
chan->rotmode = (is_matrix) ? ROT_MODE_QUAT : ROT_MODE_EUL;
}
else {
ob->rotmode = (is_matrix) ? ROT_MODE_QUAT : ROT_MODE_EUL;

View File

@@ -195,7 +195,10 @@ class AnimationImporter : private TransformReader, public AnimationImporterBase
int setAnimType(const COLLADAFW::Animatable *prop, int type, int addition);
void modify_fcurve(std::vector<FCurve *> *curves, const char *rna_path, int array_index, int scale=1);
void modify_fcurve(std::vector<FCurve *> *curves,
const char *rna_path,
int array_index,
int scale = 1);
void unused_fcurve(std::vector<FCurve *> *curves);
// prerequisites:
// animlist_map - map animlist id -> animlist

View File

@@ -523,7 +523,7 @@ void ArmatureImporter::create_armature_bones(Main *bmain, std::vector<Object *>
ED_armature_from_edit(bmain, armature);
ED_armature_edit_free(armature);
set_bone_transformation_type(node, ob_arm);
set_bone_transformation_type(node, ob_arm);
int index = std::find(ob_arms.begin(), ob_arms.end(), ob_arm) - ob_arms.begin();
if (index == 0) {

View File

@@ -174,7 +174,7 @@ const std::string BCAnimationCurve::get_animation_name(Object *ob) const
}
else {
const char *boneName = BLI_str_quoted_substrN(fcurve->rna_path, "pose.bones[");
name = (boneName) ? id_name(ob)+"_"+std::string(boneName) : "";
name = (boneName) ? id_name(ob) + "_" + std::string(boneName) : "";
}
} break;
@@ -338,10 +338,8 @@ const bool BCAnimationCurve::is_transform_curve() const
const bool BCAnimationCurve::is_rotation_curve() const
{
std::string channel_type = this->get_channel_type();
return (channel_type == "rotation"
|| channel_type == "rotation_euler"
|| channel_type == "rotation_quaternion"
);
return (channel_type == "rotation" || channel_type == "rotation_euler" ||
channel_type == "rotation_quaternion");
}
const float BCAnimationCurve::get_value(const float frame)

View File

@@ -120,7 +120,7 @@ class BCAnimationCurve {
const std::string get_animation_name(Object *ob) const; /* xxx: this is collada specific */
const std::string get_channel_target() const;
const std::string get_channel_type() const;
const std::string get_channel_posebone() const; // returns "" if channel is not a bone channel
const std::string get_channel_posebone() const; // returns "" if channel is not a bone channel
const int get_channel_index() const;
const int get_subindex() const;

View File

@@ -54,7 +54,6 @@ class BCQuat {
}
void rotate_to(Matrix &mat_to);
};
class BCMatrix {

View File

@@ -55,7 +55,7 @@ const bool BCSample::get_value(std::string channel_target, const int array_index
if (bname == bone->name) {
matrix = it->second;
break;
}
}
}
}
else {

View File

@@ -444,7 +444,7 @@ void ControllerExporter::add_bind_shape_mat(Object *ob)
// UnitConverter::mat4_to_dae_double(bind_mat, ob->obmat);
UnitConverter::mat4_to_dae_double(bind_mat, f_obmat);
if (this->export_settings.get_limit_precision()) {
BCMatrix::sanitize(bind_mat, LIMITTED_PRECISION);
BCMatrix::sanitize(bind_mat, LIMITTED_PRECISION);
}
addBindShapeTransform(bind_mat);

View File

@@ -1367,7 +1367,6 @@ COLLADASW::ColorOrTexture bc_get_emission(bNode *shader)
}
}
bool bc_get_reflectivity(bNode *shader, double &reflectivity)
{
bNodeSocket *socket = nodeFindSocket(shader, SOCK_IN, "Specular");

View File

@@ -101,8 +101,8 @@ static void applyarmature_set_edit_position(EditBone *curbone,
copy_v3_v3(curbone->tail, new_tail);
/* Fix roll:
* 1. find auto-calculated roll value for this bone now
* 2. remove this from the 'visual' y-rotation
* 1. find auto-calculated roll value for this bone now
* 2. remove this from the 'visual' y-rotation
*/
{
float premat[3][3], pmat[3][3];

View File

@@ -1637,7 +1637,7 @@ static short snapCurve(SnapData *snapdata,
float tobmat[4][4];
transpose_m4_m4(tobmat, obmat);
float (*clip_planes)[4] = snapdata->clip_plane;
float(*clip_planes)[4] = snapdata->clip_plane;
int clip_plane_len = snapdata->clip_plane_len;
if (use_obedit && snapdata->has_occlusion_plane) {