diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-10-21 09:46:41 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-10-21 09:46:41 +0400 |
commit | f3ece5a108db0bdbefb4663ef4ebd9a7e039e263 (patch) | |
tree | cb6329453be169ef1ec49ef8b8d50a6b14364880 /source/blender/collada | |
parent | a1a0c8da13a7b91b0264c7535752864379f3d852 (diff) |
style cleanup: trailing tabs & expand some non prefix tabs into spaces.
Diffstat (limited to 'source/blender/collada')
-rw-r--r-- | source/blender/collada/AnimationExporter.cpp | 20 | ||||
-rw-r--r-- | source/blender/collada/AnimationExporter.h | 2 | ||||
-rw-r--r-- | source/blender/collada/AnimationImporter.cpp | 12 | ||||
-rw-r--r-- | source/blender/collada/ArmatureExporter.cpp | 2 | ||||
-rw-r--r-- | source/blender/collada/CMakeLists.txt | 2 | ||||
-rw-r--r-- | source/blender/collada/DocumentImporter.cpp | 6 | ||||
-rw-r--r-- | source/blender/collada/EffectExporter.cpp | 4 | ||||
-rw-r--r-- | source/blender/collada/GeometryExporter.cpp | 4 | ||||
-rw-r--r-- | source/blender/collada/MeshImporter.cpp | 4 |
9 files changed, 28 insertions, 28 deletions
diff --git a/source/blender/collada/AnimationExporter.cpp b/source/blender/collada/AnimationExporter.cpp index 0e8ead61437..9d2d86fd3cf 100644 --- a/source/blender/collada/AnimationExporter.cpp +++ b/source/blender/collada/AnimationExporter.cpp @@ -184,7 +184,7 @@ std::string AnimationExporter::getObjectBoneName(Object *ob, const FCurve *fcu) if (boneName != NULL) return /*id_name(ob) + "_" +*/ std::string(boneName); - else + else return id_name(ob); } @@ -584,8 +584,8 @@ void AnimationExporter::get_source_values(BezTriple *bezt, COLLADASW::InputSeman values[0] = convert_time(bezt->vec[0][0]); if (bezt->ipo != BEZT_IPO_BEZ) { // We're in a mixed interpolation scenario, set zero as it's irrelevant but value might contain unused data - values[0] = 0; - values[1] = 0; + values[0] = 0; + values[1] = 0; } else if (is_rotation) { values[1] = RAD2DEGF(bezt->vec[0][1]); @@ -600,8 +600,8 @@ void AnimationExporter::get_source_values(BezTriple *bezt, COLLADASW::InputSeman values[0] = convert_time(bezt->vec[2][0]); if (bezt->ipo != BEZT_IPO_BEZ) { // We're in a mixed interpolation scenario, set zero as it's irrelevant but value might contain unused data - values[0] = 0; - values[1] = 0; + values[0] = 0; + values[1] = 0; } else if (is_rotation) { values[1] = RAD2DEGF(bezt->vec[2][1]); @@ -634,11 +634,11 @@ std::string AnimationExporter::create_source_from_fcurve(COLLADASW::InputSemanti switch (semantic) { case COLLADASW::InputSemantic::INPUT: case COLLADASW::InputSemantic::OUTPUT: - source.setAccessorStride(1); + source.setAccessorStride(1); break; case COLLADASW::InputSemantic::IN_TANGENT: case COLLADASW::InputSemantic::OUT_TANGENT: - source.setAccessorStride(2); + source.setAccessorStride(2); break; default: break; @@ -1082,13 +1082,13 @@ std::string AnimationExporter::get_transform_sid(char *rna_path, int tm_type, co break; case 6: tm_name = "diffuse"; - break; + break; case 7: tm_name = "transparency"; - break; + break; case 8: tm_name = "index_of_refraction"; - break; + break; default: tm_name = ""; diff --git a/source/blender/collada/AnimationExporter.h b/source/blender/collada/AnimationExporter.h index 7fd39765cc9..665c6999093 100644 --- a/source/blender/collada/AnimationExporter.h +++ b/source/blender/collada/AnimationExporter.h @@ -122,7 +122,7 @@ protected: float convert_angle(float angle); - std::string get_semantic_suffix(COLLADASW::InputSemantic::Semantics semantic); + std::string get_semantic_suffix(COLLADASW::InputSemantic::Semantics semantic); void add_source_parameters(COLLADASW::SourceBase::ParameterNameList& param, COLLADASW::InputSemantic::Semantics semantic, bool is_rot, const char *axis, bool transform); diff --git a/source/blender/collada/AnimationImporter.cpp b/source/blender/collada/AnimationImporter.cpp index b2748a55b6a..02d1e1166c9 100644 --- a/source/blender/collada/AnimationImporter.cpp +++ b/source/blender/collada/AnimationImporter.cpp @@ -136,7 +136,7 @@ void AnimationImporter::animation_to_fcurves(COLLADAFW::AnimationCurve *curve) bez.ipo = BEZT_IPO_BEZ; else bez.ipo = BEZT_IPO_CONST; - //bez.h1 = bez.h2 = HD_AUTO; + //bez.h1 = bez.h2 = HD_AUTO; } else { bez.h1 = bez.h2 = HD_AUTO; @@ -617,7 +617,7 @@ void AnimationImporter:: Assign_color_animations(const COLLADAFW::UniqueId& list //Add the curves of the current animation to the object for (iter = animcurves.begin(); iter != animcurves.end(); iter++) { FCurve *fcu = *iter; - BLI_addtail(AnimCurves, fcu); + BLI_addtail(AnimCurves, fcu); } } @@ -938,7 +938,7 @@ void AnimationImporter::translate_Animations(COLLADAFW::Node *node, if (is_matrix) { apply_matrix_curves(ob, animcurves, root, node, transform); } - else { + else { if (is_joint) { @@ -1094,7 +1094,7 @@ void AnimationImporter::translate_Animations(COLLADAFW::Node *node, } } } - } + } } } @@ -1114,8 +1114,8 @@ void AnimationImporter::add_bone_animation_sampled(Object *ob, std::vector<FCurv for (iter = animcurves.begin(); iter != animcurves.end(); iter++) { FCurve *fcu = *iter; - fcurve_deg_to_rad(fcu); - } + fcurve_deg_to_rad(fcu); + } } diff --git a/source/blender/collada/ArmatureExporter.cpp b/source/blender/collada/ArmatureExporter.cpp index 30e9baccbf1..134fd639a73 100644 --- a/source/blender/collada/ArmatureExporter.cpp +++ b/source/blender/collada/ArmatureExporter.cpp @@ -346,7 +346,7 @@ void ArmatureExporter::export_controller(Object *ob, Object *ob_arm) if (this->export_settings->apply_modifiers) { me = bc_to_mesh_apply_modifiers(scene, ob, this->export_settings->export_mesh_type); - } + } else { me = (Mesh *)ob->data; } diff --git a/source/blender/collada/CMakeLists.txt b/source/blender/collada/CMakeLists.txt index 3b7a38eb950..0091df3c502 100644 --- a/source/blender/collada/CMakeLists.txt +++ b/source/blender/collada/CMakeLists.txt @@ -70,7 +70,7 @@ set(SRC collada_utils.cpp AnimationImporter.h - AnimationExporter.h + AnimationExporter.h ArmatureExporter.h ArmatureImporter.h CameraExporter.h diff --git a/source/blender/collada/DocumentImporter.cpp b/source/blender/collada/DocumentImporter.cpp index f37f065b03b..1c4f0974c6d 100644 --- a/source/blender/collada/DocumentImporter.cpp +++ b/source/blender/collada/DocumentImporter.cpp @@ -311,7 +311,7 @@ bool DocumentImporter::writeScene(const COLLADAFW::Scene *scene) Object *DocumentImporter::create_camera_object(COLLADAFW::InstanceCamera *camera, Scene *sce) { const COLLADAFW::UniqueId& cam_uid = camera->getInstanciatedObjectId(); - if (uid_camera_map.find(cam_uid) == uid_camera_map.end()) { + if (uid_camera_map.find(cam_uid) == uid_camera_map.end()) { // fprintf(stderr, "Couldn't find camera by UID.\n"); return NULL; } @@ -329,7 +329,7 @@ Object *DocumentImporter::create_camera_object(COLLADAFW::InstanceCamera *camera Object *DocumentImporter::create_lamp_object(COLLADAFW::InstanceLight *lamp, Scene *sce) { const COLLADAFW::UniqueId& lamp_uid = lamp->getInstanciatedObjectId(); - if (uid_lamp_map.find(lamp_uid) == uid_lamp_map.end()) { + if (uid_lamp_map.find(lamp_uid) == uid_lamp_map.end()) { fprintf(stderr, "Couldn't find lamp by UID.\n"); return NULL; } @@ -524,7 +524,7 @@ void DocumentImporter::write_node(COLLADAFW::Node *node, COLLADAFW::Node *parent } // if node has child nodes write them COLLADAFW::NodePointerArray &child_nodes = node->getChildNodes(); - for (unsigned int i = 0; i < child_nodes.getCount(); i++) { + for (unsigned int i = 0; i < child_nodes.getCount(); i++) { write_node(child_nodes[i], node, sce, ob, is_library_node); } } diff --git a/source/blender/collada/EffectExporter.cpp b/source/blender/collada/EffectExporter.cpp index dd59fb9fb91..03e96bebb61 100644 --- a/source/blender/collada/EffectExporter.cpp +++ b/source/blender/collada/EffectExporter.cpp @@ -255,7 +255,7 @@ void EffectsExporter::operator()(Material *ma, Object *ob) if (ep.getShaderType() != COLLADASW::EffectProfile::LAMBERT) { cot = getcol(ma->specr * ma->spec, ma->specg * ma->spec, ma->specb * ma->spec, 1.0f); ep.setSpecular(cot, false, "specular"); - } + } // XXX make this more readable if possible @@ -405,7 +405,7 @@ void EffectsExporter::operator()(Material *ma, Object *ob) ep.closeProfile(); if (twoSided) mSW->appendTextBlock("<extra><technique profile=\"MAX3D\"><double_sided>1</double_sided></technique></extra>"); - closeEffect(); + closeEffect(); } COLLADASW::ColorOrTexture EffectsExporter::createTexture(Image *ima, diff --git a/source/blender/collada/GeometryExporter.cpp b/source/blender/collada/GeometryExporter.cpp index e2332b7cd55..24ce1ee117d 100644 --- a/source/blender/collada/GeometryExporter.cpp +++ b/source/blender/collada/GeometryExporter.cpp @@ -78,7 +78,7 @@ void GeometryExporter::operator()(Object *ob) Mesh *me; if (this->export_settings->apply_modifiers) { me = bc_to_mesh_apply_modifiers(mScene, ob, this->export_settings->export_mesh_type); - } + } else { me = (Mesh *)ob->data; } @@ -364,7 +364,7 @@ void GeometryExporter::createVertsSource(std::string geom_id, Mesh *me) //appends data to <float_array> int i = 0; for (i = 0; i < totverts; i++) { - source.appendValues(verts[i].co[0], verts[i].co[1], verts[i].co[2]); + source.appendValues(verts[i].co[0], verts[i].co[1], verts[i].co[2]); } source.finish(); diff --git a/source/blender/collada/MeshImporter.cpp b/source/blender/collada/MeshImporter.cpp index 47ee35f0268..e5493bc237d 100644 --- a/source/blender/collada/MeshImporter.cpp +++ b/source/blender/collada/MeshImporter.cpp @@ -478,7 +478,7 @@ void MeshImporter::allocate_face_data(COLLADAFW::Mesh *mesh, Mesh *me, int new_t int total_facecount = 0; // collect edge_count and face_count from all parts - for (int i = 0; i < prim_arr.getCount(); i++) { + for (int i = 0; i < prim_arr.getCount(); i++) { COLLADAFW::MeshPrimitive *mp = prim_arr[i]; int type = mp->getPrimitiveType(); switch (type) { @@ -506,7 +506,7 @@ unsigned int MeshImporter::get_loose_edge_count(COLLADAFW::Mesh *mesh) { int loose_edge_count = 0; // collect edge_count and face_count from all parts - for (int i = 0; i < prim_arr.getCount(); i++) { + for (int i = 0; i < prim_arr.getCount(); i++) { COLLADAFW::MeshPrimitive *mp = prim_arr[i]; int type = mp->getPrimitiveType(); switch (type) { |