diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-02-04 04:18:09 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-02-04 04:18:09 +0400 |
commit | 69993c5d4089bb58758f9a190237dc4651d72d44 (patch) | |
tree | 771f57dd80767c2a444ee03dfa98b3151626e47a /source/blender/collada | |
parent | 9d4be17de42deb3109febc8433bf2acea2196218 (diff) |
style cleanup: spaces -> tabs
Diffstat (limited to 'source/blender/collada')
-rw-r--r-- | source/blender/collada/AnimationExporter.cpp | 26 | ||||
-rw-r--r-- | source/blender/collada/ArmatureExporter.cpp | 2 | ||||
-rw-r--r-- | source/blender/collada/ArmatureImporter.cpp | 14 | ||||
-rw-r--r-- | source/blender/collada/ControllerExporter.cpp | 10 | ||||
-rw-r--r-- | source/blender/collada/DocumentImporter.cpp | 4 | ||||
-rw-r--r-- | source/blender/collada/GeometryExporter.cpp | 2 | ||||
-rw-r--r-- | source/blender/collada/SceneExporter.cpp | 2 | ||||
-rw-r--r-- | source/blender/collada/TransformWriter.cpp | 2 |
8 files changed, 30 insertions, 32 deletions
diff --git a/source/blender/collada/AnimationExporter.cpp b/source/blender/collada/AnimationExporter.cpp index e751f987524..4a0696dc857 100644 --- a/source/blender/collada/AnimationExporter.cpp +++ b/source/blender/collada/AnimationExporter.cpp @@ -84,9 +84,9 @@ void AnimationExporter::operator()(Object *ob) } } - - export_object_constraint_animation(ob); - + + export_object_constraint_animation(ob); + //This needs to be handled by extra profiles, so postponed for now //export_morph_animation(ob); @@ -149,11 +149,11 @@ void AnimationExporter::operator()(Object *ob) void AnimationExporter::export_object_constraint_animation(Object *ob) { std::vector<float> fra; - //Takes frames of target animations + //Takes frames of target animations make_anim_frames_from_targets(ob, fra); - + if (fra.size()) - dae_baked_object_animation(fra, ob); + dae_baked_object_animation(fra, ob); } void AnimationExporter::export_morph_animation(Object *ob) @@ -274,8 +274,8 @@ void AnimationExporter::dae_animation(Object *ob, FCurve *fcu, char *transformNa //axis names for colors else if (!strcmp(transformName, "color") || - !strcmp(transformName, "specular_color") || - !strcmp(transformName, "diffuse_color") || + !strcmp(transformName, "specular_color") || + !strcmp(transformName, "diffuse_color") || !strcmp(transformName, "alpha")) { const char *axis_names[] = {"R", "G", "B"}; @@ -285,9 +285,9 @@ void AnimationExporter::dae_animation(Object *ob, FCurve *fcu, char *transformNa //axis names for transforms else if (!strcmp(transformName, "location") || - !strcmp(transformName, "scale") || + !strcmp(transformName, "scale") || !strcmp(transformName, "rotation_euler") || - !strcmp(transformName, "rotation_quaternion")) + !strcmp(transformName, "rotation_quaternion")) { const char *axis_names[] = {"X", "Y", "Z"}; if (fcu->array_index < 3) @@ -526,7 +526,7 @@ void AnimationExporter::dae_baked_object_animation(std::vector<float> &fra, Obje return; BLI_snprintf(anim_id, sizeof(anim_id), "%s_%s", (char*)translate_id(ob_name).c_str(), - "object_matrix"); + "object_matrix"); openAnimation(anim_id, COLLADABU::Utils::EMPTY_STRING); @@ -897,7 +897,7 @@ std::string AnimationExporter::create_4x4_source(std::vector<float> &frames, Obj add_source_parameters(param, semantic, false, NULL, true); source.prepareToAppendValues(); - + bPoseChannel *parchan = NULL; bPoseChannel *pchan = NULL; @@ -916,7 +916,7 @@ std::string AnimationExporter::create_4x4_source(std::vector<float> &frames, Obj int j = 0; for (it = frames.begin(); it != frames.end(); it++) { float mat[4][4], ipar[4][4]; - + float ctime = BKE_scene_frame_get_from_ctime(scene, *it); CFRA = BKE_scene_frame_get_from_ctime(scene, *it); //BKE_scene_update_for_newframe(G.main,scene,scene->lay); diff --git a/source/blender/collada/ArmatureExporter.cpp b/source/blender/collada/ArmatureExporter.cpp index 9792da3a9d7..0929bfda6e7 100644 --- a/source/blender/collada/ArmatureExporter.cpp +++ b/source/blender/collada/ArmatureExporter.cpp @@ -104,7 +104,7 @@ bool ArmatureExporter::add_instance_controller(Object *ob) for (bone = (Bone *)arm->bonebase.first; bone; bone = bone->next) { write_bone_URLs(ins, ob_arm, bone); } - + InstanceWriter::add_material_bindings(ins.getBindMaterial(), ob, this->export_settings->active_uv_only); ins.add(); diff --git a/source/blender/collada/ArmatureImporter.cpp b/source/blender/collada/ArmatureImporter.cpp index 8328f4bc873..86d9de64085 100644 --- a/source/blender/collada/ArmatureImporter.cpp +++ b/source/blender/collada/ArmatureImporter.cpp @@ -319,7 +319,7 @@ void ArmatureImporter::create_armature_bones( ) if (!ob_arm) continue; - + ED_armature_to_edit(ob_arm); /* @@ -327,8 +327,8 @@ void ArmatureImporter::create_armature_bones( ) * check if bones have already been created for a given joint */ - create_bone(NULL, *ri , NULL, (*ri)->getChildNodes().getCount(), NULL, (bArmature *)ob_arm->data); - + create_bone(NULL, *ri , NULL, (*ri)->getChildNodes().getCount(), NULL, (bArmature *)ob_arm->data); + //leaf bone tails are derived from the matrix, so no need of this. fix_leaf_bones(); @@ -336,15 +336,13 @@ void ArmatureImporter::create_armature_bones( ) unskinned_armature_map[(*ri)->getUniqueId()] = ob_arm; ED_armature_from_edit(ob_arm); - + //This serves no purpose, as pose is automatically reset later, in BKE_where_is_bone() //set_pose(ob_arm, *ri, NULL, NULL); ED_armature_edit_free(ob_arm); DAG_id_tag_update(&ob_arm->id, OB_RECALC_OB | OB_RECALC_DATA); } - - } void ArmatureImporter::create_armature_bones(SkinInfo& skin) @@ -650,12 +648,12 @@ bool ArmatureImporter::write_controller(const COLLADAFW::Controller *controller) void ArmatureImporter::make_shape_keys(){ std::vector<COLLADAFW::MorphController *>::iterator mc; float weight; - + for (mc = morph_controllers.begin(); mc != morph_controllers.end(); mc++) { //Controller data COLLADAFW::UniqueIdArray& morphTargetIds = (*mc)->getMorphTargets(); COLLADAFW::FloatOrDoubleArray& morphWeights = (*mc)->getMorphWeights(); - + //Prereq: all the geometries must be imported and mesh objects must be made Object *source_ob = this->mesh_importer->get_object_by_geom_uid((*mc)->getSource()); diff --git a/source/blender/collada/ControllerExporter.cpp b/source/blender/collada/ControllerExporter.cpp index 396775e3c0e..c8307589af4 100644 --- a/source/blender/collada/ControllerExporter.cpp +++ b/source/blender/collada/ControllerExporter.cpp @@ -96,7 +96,7 @@ bool ControllerExporter::add_instance_controller(Object *ob) for (bone = (Bone *)arm->bonebase.first; bone; bone = bone->next) { write_bone_URLs(ins, ob_arm, bone); } - + InstanceWriter::add_material_bindings(ins.getBindMaterial(), ob, this->export_settings->active_uv_only); ins.add(); @@ -302,7 +302,7 @@ void ControllerExporter::export_morph_controller(Object *ob, Key *key) openMorph(controller_id, controller_name, COLLADABU::URI(COLLADABU::Utils::EMPTY_STRING, get_geometry_id(ob, use_instantiation))); - + std::string targets_id = add_morph_targets(key, ob); std::string morph_weights_id = add_morph_weights(key, ob); @@ -320,7 +320,7 @@ void ControllerExporter::export_morph_controller(Object *ob, Key *key) { BKE_libblock_free_us(&(G.main->mesh), me); } - + //support for animations //can also try the base element and param alternative add_weight_extras(key); @@ -337,7 +337,7 @@ std::string ControllerExporter::add_morph_targets(Key *key, Object *ob) source.setArrayId(source_id + ARRAY_ID_SUFFIX); source.setAccessorCount(key->totkey - 1); source.setAccessorStride(1); - + COLLADASW::SourceBase::ParameterNameList ¶m = source.getParameterNameList(); param.push_back("IDREF"); @@ -366,7 +366,7 @@ std::string ControllerExporter::add_morph_weights(Key *key, Object *ob) source.setArrayId(source_id + ARRAY_ID_SUFFIX); source.setAccessorCount(key->totkey - 1); source.setAccessorStride(1); - + COLLADASW::SourceBase::ParameterNameList ¶m = source.getParameterNameList(); param.push_back("MORPH_WEIGHT"); diff --git a/source/blender/collada/DocumentImporter.cpp b/source/blender/collada/DocumentImporter.cpp index b818008ac17..524645a4bb2 100644 --- a/source/blender/collada/DocumentImporter.cpp +++ b/source/blender/collada/DocumentImporter.cpp @@ -426,7 +426,7 @@ void DocumentImporter::write_node(COLLADAFW::Node *node, COLLADAFW::Node *parent bool read_transform = true; std::vector<Object *> *objects_done = new std::vector<Object *>(); - + if (is_joint) { armature_importer.add_joint(node, parent_node == NULL || parent_node->getType() != COLLADAFW::Node::JOINT, par, sce); } @@ -1203,7 +1203,7 @@ bool DocumentImporter::is_armature(COLLADAFW::Node *node){ if(child_nodes[i]->getType() == COLLADAFW::Node::JOINT) return true; else continue; } - + //no child is JOINT return false; diff --git a/source/blender/collada/GeometryExporter.cpp b/source/blender/collada/GeometryExporter.cpp index 6673e1de815..0720c1f9b81 100644 --- a/source/blender/collada/GeometryExporter.cpp +++ b/source/blender/collada/GeometryExporter.cpp @@ -157,7 +157,7 @@ void GeometryExporter::operator()(Object *ob) if (this->export_settings->apply_modifiers) { BKE_libblock_free_us(&(G.main->mesh), me); } - + if (this->export_settings->include_shapekeys) { Key * key = BKE_key_from_object(ob); if(key) { diff --git a/source/blender/collada/SceneExporter.cpp b/source/blender/collada/SceneExporter.cpp index e3b56208aeb..3a06ca3bc0e 100644 --- a/source/blender/collada/SceneExporter.cpp +++ b/source/blender/collada/SceneExporter.cpp @@ -216,7 +216,7 @@ void SceneExporter::writeNodes(Object *ob, Scene *sce) } } } - + con = con->next; } } diff --git a/source/blender/collada/TransformWriter.cpp b/source/blender/collada/TransformWriter.cpp index f06c8cb9e00..fb8ba567192 100644 --- a/source/blender/collada/TransformWriter.cpp +++ b/source/blender/collada/TransformWriter.cpp @@ -111,7 +111,7 @@ void TransformWriter::add_node_transform_ob(COLLADASW::Node& node, Object *ob) node.addMatrix("parentinverse", dmat); } } - + double d_obmat[4][4]; converter.mat4_to_dae_double(d_obmat, ob->obmat); node.addMatrix("transform",d_obmat); |