Cleanup: clang format

This commit is contained in:
Campbell Barton 2019-05-28 16:11:49 +10:00
parent 671eb29d43
commit 8d81a3da37
10 changed files with 34 additions and 35 deletions

@ -291,7 +291,7 @@ void ArmatureExporter::add_bone_transform(Object *ob_arm, Bone *bone, COLLADASW:
}
// OPEN_SIM_COMPATIBILITY
if (export_settings.get_open_sim()) {
// Remove rotations vs armature from transform
// parent_rest_rot * mat * irest_rot
@ -308,10 +308,8 @@ void ArmatureExporter::add_bone_transform(Object *ob_arm, Bone *bone, COLLADASW:
workmat[3][0] = workmat[3][1] = workmat[3][2] = 0.0f;
mul_m4_m4m4(mat, workmat, mat);
}
}
}
if (this->export_settings.get_limit_precision()) {

@ -157,7 +157,7 @@ void BCAnimationSampler::update_animation_curves(BCAnimation &animation,
BCSample &BCAnimationSampler::sample_object(Object *ob, int frame_index, bool for_opensim)
{
BCSample &ob_sample = sample_data.add(ob, frame_index);
//if (export_settings.get_apply_global_orientation()) {
// if (export_settings.get_apply_global_orientation()) {
// const BCMatrix &global_transform = export_settings.get_global_transform();
// ob_sample.get_matrix(global_transform);
//}

@ -66,7 +66,7 @@ BCMatrix::BCMatrix(BC_global_forward_axis global_forward_axis, BC_global_up_axis
mat3_from_axis_conversion(
BC_DEFAULT_FORWARD, BC_DEFAULT_UP, global_forward_axis, global_up_axis, mrot);
transpose_m3(mrot); // TODO: Verify that mat3_from_axis_conversion() returns a transposed matrix
transpose_m3(mrot); // TODO: Verify that mat3_from_axis_conversion() returns a transposed matrix
copy_m4_m3(mat, mrot);
set_transform(mat);
}
@ -98,7 +98,10 @@ void BCMatrix::add_transform(Matrix &to, const Matrix &transform, const Matrix &
}
}
void BCMatrix::apply_transform(Matrix &to, const Matrix &transform, const Matrix &from, bool inverse)
void BCMatrix::apply_transform(Matrix &to,
const Matrix &transform,
const Matrix &from,
bool inverse)
{
Matrix globinv;
invert_m4_m4(globinv, transform);

@ -107,9 +107,9 @@ class BCMatrix {
const Matrix &from,
const bool inverted = false);
void apply_transform(Matrix &to,
const Matrix &transform,
const Matrix &from,
const bool inverted = false);
const Matrix &transform,
const Matrix &from,
const bool inverted = false);
void add_inverted_transform(Matrix &to, const Matrix &transform, const Matrix &from);
void add_transform(const Matrix &matrix, const bool inverted = false);
void add_transform(const BCMatrix &matrix, const bool inverted = false);

@ -26,11 +26,10 @@
#include "TransformWriter.h"
void TransformWriter::add_joint_transform(COLLADASW::Node &node,
float mat[4][4],
float parent_mat[4][4],
BCExportSettings &export_settings,
bool has_restmat
)
float mat[4][4],
float parent_mat[4][4],
BCExportSettings &export_settings,
bool has_restmat)
{
float local[4][4];
@ -106,9 +105,8 @@ void TransformWriter::add_node_transform_ob(COLLADASW::Node &node,
}
}
void TransformWriter::add_node_transform_identity(
COLLADASW::Node &node,
BCExportSettings &export_settings)
void TransformWriter::add_node_transform_identity(COLLADASW::Node &node,
BCExportSettings &export_settings)
{
BC_export_transformation_type transformation_type =
export_settings.get_object_transformation_type();

@ -32,10 +32,10 @@
class TransformWriter {
protected:
void add_joint_transform(COLLADASW::Node &node,
float mat[4][4],
float parent_mat[4][4],
BCExportSettings &export_settings,
bool has_restmat);
float mat[4][4],
float parent_mat[4][4],
BCExportSettings &export_settings,
bool has_restmat);
void add_node_transform_ob(COLLADASW::Node &node, Object *ob, BCExportSettings &export_settings);

@ -251,10 +251,10 @@ extern void bc_apply_global_transform(Vector &to_vec,
const BCMatrix &global_transform,
const bool invert = false);
extern void bc_create_restpose_mat(BCExportSettings &export_settings,
Bone *bone,
float to_mat[4][4],
float from_mat[4][4],
bool use_local_space);
Bone *bone,
float to_mat[4][4],
float from_mat[4][4],
bool use_local_space);
class ColladaBaseNodes {
private:

@ -3307,7 +3307,8 @@ static int reveal_exec(bContext *C, wmOperator *op)
}
if (changed) {
DEG_id_tag_update(obedit->data, ID_RECALC_COPY_ON_WRITE | ID_RECALC_SELECT | ID_RECALC_GEOMETRY);
DEG_id_tag_update(obedit->data,
ID_RECALC_COPY_ON_WRITE | ID_RECALC_SELECT | ID_RECALC_GEOMETRY);
WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit->data);
changed_multi = true;
}

@ -172,10 +172,10 @@ static int wm_collada_export_exec(bContext *C, wmOperator *op)
use_blender_profile = RNA_boolean_get(op->ptr, "use_blender_profile");
sort_by_name = RNA_boolean_get(op->ptr, "sort_by_name");
export_object_transformation_type = RNA_enum_get(
op->ptr, "export_object_transformation_type_selection");
export_object_transformation_type = RNA_enum_get(op->ptr,
"export_object_transformation_type_selection");
export_animation_transformation_type = RNA_enum_get(
op->ptr, "export_animation_transformation_type_selection");
op->ptr, "export_animation_transformation_type_selection");
open_sim = RNA_boolean_get(op->ptr, "open_sim");
limit_precision = RNA_boolean_get(op->ptr, "limit_precision");
@ -271,11 +271,11 @@ static void uiCollada_exportSettings(uiLayout *layout, PointerRNA *imfptr)
bool include_animations = RNA_boolean_get(imfptr, "include_animations");
int ui_section = RNA_enum_get(imfptr, "prop_bc_export_ui_section");
BC_export_animation_type animation_type = RNA_enum_get(
imfptr, "export_animation_type_selection");
BC_export_animation_type animation_type = RNA_enum_get(imfptr,
"export_animation_type_selection");
BC_export_transformation_type animation_transformation_type = RNA_enum_get(
imfptr, "export_animation_transformation_type_selection");
imfptr, "export_animation_transformation_type_selection");
bool sampling = animation_type == BC_ANIMATION_EXPORT_SAMPLES;
@ -727,7 +727,7 @@ void WM_OT_collada_export(wmOperatorType *ot)
INT_MAX,
"Transform",
"Transformation type for translation, scale and rotation\n"
"Note: The Animation transformation type in the Anim Tab\n"\
"Note: The Animation transformation type in the Anim Tab\n"
"is always equal to the Object transformation type in the Geom tab",
INT_MIN,
INT_MAX);

@ -1336,8 +1336,7 @@ static int object_origin_set_exec(bContext *C, wmOperator *op)
DEG_id_tag_update(&tob->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
}
/* special support for dupligroups */
else if (tob->instance_collection &&
tob->instance_collection->id.tag & LIB_TAG_DOIT) {
else if (tob->instance_collection && tob->instance_collection->id.tag & LIB_TAG_DOIT) {
DEG_id_tag_update(&tob->id, ID_RECALC_TRANSFORM);
DEG_id_tag_update(&tob->instance_collection->id, ID_RECALC_COPY_ON_WRITE);
}