Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2012-02-27 14:35:39 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-02-27 14:35:39 +0400
commit47c373c7a970fa4bd26453a6e35a4b066f2b77e4 (patch)
tree43d916fb86bcf797afa834649706669694225fe8 /source/blender/collada
parent120297734b4a01d93e5223e02f255b5aef01e281 (diff)
style cleanup (mostly whitespace)
Diffstat (limited to 'source/blender/collada')
-rw-r--r--source/blender/collada/AnimationExporter.cpp6
-rw-r--r--source/blender/collada/AnimationImporter.cpp27
-rw-r--r--source/blender/collada/AnimationImporter.h2
-rw-r--r--source/blender/collada/TransformWriter.cpp4
4 files changed, 21 insertions, 18 deletions
diff --git a/source/blender/collada/AnimationExporter.cpp b/source/blender/collada/AnimationExporter.cpp
index c2d8c356aae..b8bd3ab9fd6 100644
--- a/source/blender/collada/AnimationExporter.cpp
+++ b/source/blender/collada/AnimationExporter.cpp
@@ -55,7 +55,7 @@ void AnimationExporter::exportAnimations(Scene *sce)
void AnimationExporter::operator() (Object *ob)
{
FCurve *fcu;
- char * transformName ;
+ char *transformName;
/* bool isMatAnim = false; */ /* UNUSED */
//Export transform animations
@@ -254,7 +254,7 @@ void AnimationExporter::dae_animation(Object* ob, FCurve *fcu, char* transformNa
std::string input_id = create_source_from_fcurve(COLLADASW::InputSemantic::INPUT, fcu, anim_id, axis_name);
// create output source
- std::string output_id ;
+ std::string output_id;
//quat rotations are skipped for now, because of complications with determining axis.
if(quatRotation)
@@ -302,7 +302,7 @@ void AnimationExporter::dae_animation(Object* ob, FCurve *fcu, char* transformNa
addSampler(sampler);
- std::string target ;
+ std::string target;
if ( !is_param )
target = translate_id(ob_name)
diff --git a/source/blender/collada/AnimationImporter.cpp b/source/blender/collada/AnimationImporter.cpp
index b889dd21177..097e9902de5 100644
--- a/source/blender/collada/AnimationImporter.cpp
+++ b/source/blender/collada/AnimationImporter.cpp
@@ -610,9 +610,10 @@ void AnimationImporter:: Assign_color_animations(const COLLADAFW::UniqueId& list
void AnimationImporter:: Assign_float_animations(const COLLADAFW::UniqueId& listid, ListBase *AnimCurves, const char * anim_type)
{
char rna_path[100];
- if (animlist_map.find(listid) == animlist_map.end()) return ;
- else
- {
+ if (animlist_map.find(listid) == animlist_map.end()) {
+ return;
+ }
+ else {
//anim_type has animations
const COLLADAFW::AnimationList *animlist = animlist_map[listid];
const COLLADAFW::AnimationList::AnimationBindings& bindings = animlist->getAnimationBindings();
@@ -665,7 +666,7 @@ void AnimationImporter::apply_matrix_curves( Object * ob, std::vector<FCurve*>&
}
// new curves to assign matrix transform animation
FCurve *newcu[10]; // if tm_type is matrix, then create 10 curves: 4 rot, 3 loc, 3 scale
- unsigned int totcu = 10 ;
+ unsigned int totcu = 10;
const char *tm_str = NULL;
char rna_path[200];
for (int i = 0; i < totcu; i++) {
@@ -824,9 +825,10 @@ void AnimationImporter::translate_Animations ( COLLADAFW::Node * node ,
const COLLADAFW::UniqueId& listid = transform->getAnimationList();
//check if transformation has animations
- if (animlist_map.find(listid) == animlist_map.end()) continue ;
- else
- {
+ if (animlist_map.find(listid) == animlist_map.end()) {
+ continue;
+ }
+ else {
//transformation has animations
const COLLADAFW::AnimationList *animlist = animlist_map[listid];
const COLLADAFW::AnimationList::AnimationBindings& bindings = animlist->getAnimationBindings();
@@ -1030,7 +1032,7 @@ void AnimationImporter::add_bone_animation_sampled(Object * ob, std::vector<FCur
// new curves to assign matrix transform animation
FCurve *newcu[10]; // if tm_type is matrix, then create 10 curves: 4 rot, 3 loc, 3 scale
- unsigned int totcu = 10 ;
+ unsigned int totcu = 10;
const char *tm_str = NULL;
char rna_path[200];
for (int i = 0; i < totcu; i++) {
@@ -1136,9 +1138,10 @@ AnimationImporter::AnimMix* AnimationImporter::get_animation_type ( const COLLAD
const COLLADAFW::UniqueId& listid = transform->getAnimationList();
//check if transformation has animations
- if (animlist_map.find(listid) == animlist_map.end()) continue ;
- else
- {
+ if (animlist_map.find(listid) == animlist_map.end()) {
+ continue;
+ }
+ else {
types->transform = types->transform|NODE_TRANSFORM;
break;
}
@@ -1868,7 +1871,7 @@ void AnimationImporter::add_bezt(FCurve *fcu, float fra, float value)
//float fps = (float)FPS;
BezTriple bez;
memset(&bez, 0, sizeof(BezTriple));
- bez.vec[1][0] = fra ;
+ bez.vec[1][0] = fra;
bez.vec[1][1] = value;
bez.ipo = BEZT_IPO_LIN ;/* use default interpolation mode here... */
bez.f1 = bez.f2 = bez.f3 = SELECT;
diff --git a/source/blender/collada/AnimationImporter.h b/source/blender/collada/AnimationImporter.h
index 5fb96017dee..e42a1cc7a55 100644
--- a/source/blender/collada/AnimationImporter.h
+++ b/source/blender/collada/AnimationImporter.h
@@ -148,7 +148,7 @@ public:
std::map<COLLADAFW::UniqueId, Object*>& object_map ,
std::map<COLLADAFW::UniqueId, const COLLADAFW::Object*> FW_object_map);
- AnimMix* get_animation_type( const COLLADAFW::Node * node , std::map<COLLADAFW::UniqueId,const COLLADAFW::Object*> FW_object_map ) ;
+ AnimMix* get_animation_type( const COLLADAFW::Node * node , std::map<COLLADAFW::UniqueId,const COLLADAFW::Object*> FW_object_map );
void apply_matrix_curves( Object * ob, std::vector<FCurve*>& animcurves, COLLADAFW::Node* root ,COLLADAFW::Node* node,
COLLADAFW::Transformation * tm );
diff --git a/source/blender/collada/TransformWriter.cpp b/source/blender/collada/TransformWriter.cpp
index 0cf26a03107..10a965308b1 100644
--- a/source/blender/collada/TransformWriter.cpp
+++ b/source/blender/collada/TransformWriter.cpp
@@ -102,8 +102,8 @@ void TransformWriter::add_node_transform_ob(COLLADASW::Node& node, Object *ob)
for(int i = 0; i < 16; ++i)
{
- float f = (i%4 == i/4) ? 1.0f : 0.0f ;
- add_parinv |= (ob->parentinv[i%4][i/4] != f);
+ float f = (i % 4 == i / 4) ? 1.0f : 0.0f;
+ add_parinv |= (ob->parentinv[i % 4][i / 4] != f);
}
if(add_parinv)