diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2013-02-01 19:17:51 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2013-02-01 19:17:51 +0400 |
commit | 6baf63c83b2f138ba3d52d4123a6ee8cb9078cb5 (patch) | |
tree | 2fc6c508e78148858f76a9e8f314c573acbbbc25 /source/blender | |
parent | 496c3e4f8fc8c1e9319477f3f2f75f6474bb4b5f (diff) |
Fix some warnings in the collade code, but did not fix two because they seem
to indicate bugs, left a comment about those.
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/collada/AnimationExporter.cpp | 9 | ||||
-rw-r--r-- | source/blender/collada/ArmatureExporter.cpp | 4 | ||||
-rw-r--r-- | source/blender/collada/ArmatureExporter.h | 2 | ||||
-rw-r--r-- | source/blender/collada/ArmatureImporter.cpp | 6 | ||||
-rw-r--r-- | source/blender/collada/ControllerExporter.cpp | 1 | ||||
-rw-r--r-- | source/blender/collada/DocumentImporter.cpp | 4 | ||||
-rw-r--r-- | source/blender/collada/SceneExporter.cpp | 1 | ||||
-rw-r--r-- | source/blender/collada/TransformReader.cpp | 1 |
8 files changed, 12 insertions, 16 deletions
diff --git a/source/blender/collada/AnimationExporter.cpp b/source/blender/collada/AnimationExporter.cpp index 493d15135a7..e29435005bd 100644 --- a/source/blender/collada/AnimationExporter.cpp +++ b/source/blender/collada/AnimationExporter.cpp @@ -439,11 +439,11 @@ void AnimationExporter::sample_and_write_bone_animation_matrix(Object *ob_arm, B std::vector<float> fra; //char prefix[256]; - FCurve *fcu = (FCurve *)ob_arm->adt->action->curves.first; - //Check if there is a fcurve in the armature for the bone in param //when baking this check is not needed, solve every bone for every frame. - /*while (fcu) { + /*FCurve *fcu = (FCurve *)ob_arm->adt->action->curves.first; + + while (fcu) { std::string bone_name = getObjectBoneName(ob_arm, fcu); int val = BLI_strcasecmp((char *)bone_name.c_str(), bone->name); if (val == 0) break; @@ -901,8 +901,7 @@ std::string AnimationExporter::create_4x4_source(std::vector<float> &frames, Obj bPoseChannel *parchan = NULL; bPoseChannel *pchan = NULL; - bPoseChannel *rootchan = NULL; - + if (ob->type == OB_ARMATURE ){ bPose *pose = ob->pose; pchan = BKE_pose_channel_find_name(pose, bone->name); diff --git a/source/blender/collada/ArmatureExporter.cpp b/source/blender/collada/ArmatureExporter.cpp index 36993eae7b6..9792da3a9d7 100644 --- a/source/blender/collada/ArmatureExporter.cpp +++ b/source/blender/collada/ArmatureExporter.cpp @@ -111,12 +111,12 @@ bool ArmatureExporter::add_instance_controller(Object *ob) return true; } +#if 0 void ArmatureExporter::operator()(Object *ob) { Object *ob_arm = bc_get_assigned_armature(ob); } -#if 0 bool ArmatureExporter::already_written(Object *ob_arm) { @@ -248,7 +248,7 @@ void ArmatureExporter::add_blender_leaf_bone(Bone *bone, Object *ob_arm, COLLADA void ArmatureExporter::add_bone_transform(Object *ob_arm, Bone *bone, COLLADASW::Node& node) { - bPoseChannel *pchan = BKE_pose_channel_find_name(ob_arm->pose, bone->name); + //bPoseChannel *pchan = BKE_pose_channel_find_name(ob_arm->pose, bone->name); float mat[4][4]; diff --git a/source/blender/collada/ArmatureExporter.h b/source/blender/collada/ArmatureExporter.h index e2496a4e578..6222496a9f7 100644 --- a/source/blender/collada/ArmatureExporter.h +++ b/source/blender/collada/ArmatureExporter.h @@ -67,7 +67,7 @@ public: //void export_controllers(Scene *sce);*/ - void operator()(Object *ob); + //void operator()(Object *ob); private: Scene *scene; diff --git a/source/blender/collada/ArmatureImporter.cpp b/source/blender/collada/ArmatureImporter.cpp index 58c3f34e093..8328f4bc873 100644 --- a/source/blender/collada/ArmatureImporter.cpp +++ b/source/blender/collada/ArmatureImporter.cpp @@ -200,7 +200,6 @@ void ArmatureImporter::add_leaf_bone(float mat[4][4], EditBone *bone, COLLADAFW void ArmatureImporter::fix_leaf_bones( ) { // just setting tail for leaf bones here - float correctionMin = 1.0f; std::vector<LeafBone>::iterator it; for (it = leaf_bones.begin(); it != leaf_bones.end(); it++) { LeafBone& leaf = *it; @@ -212,7 +211,7 @@ void ArmatureImporter::fix_leaf_bones( ) mul_v3_fl(vec, leaf_bone_length); add_v3_v3v3(leaf.bone->tail, leaf.bone->head , vec); - } + } } #if 0 @@ -466,8 +465,6 @@ void ArmatureImporter::set_pose(Object *ob_arm, COLLADAFW::Node *root_node, con float mat[4][4]; float obmat[4][4]; - float angle = 0.0f; - // object-space get_node_mat(obmat, root_node, NULL, NULL); @@ -492,6 +489,7 @@ void ArmatureImporter::set_pose(Object *ob_arm, COLLADAFW::Node *root_node, con } + //float angle = 0.0f; ///*mat4_to_axis_angle(ax, &angle, mat); //pchan->bone->roll = angle;*/ diff --git a/source/blender/collada/ControllerExporter.cpp b/source/blender/collada/ControllerExporter.cpp index d41c907ee98..396775e3c0e 100644 --- a/source/blender/collada/ControllerExporter.cpp +++ b/source/blender/collada/ControllerExporter.cpp @@ -393,6 +393,7 @@ void ControllerExporter::add_weight_extras(Key *key){ //skip the basis kb = kb->next; for (; kb; kb = kb->next) { + // XXX why is the weight not used here and set to 0.0? float weight = kb->curval; extra.addExtraTechniqueParameter ("KHR", "morph_weights" , 0.000, "MORPH_WEIGHT_TO_TARGET"); } diff --git a/source/blender/collada/DocumentImporter.cpp b/source/blender/collada/DocumentImporter.cpp index 1d8be5910c6..b818008ac17 100644 --- a/source/blender/collada/DocumentImporter.cpp +++ b/source/blender/collada/DocumentImporter.cpp @@ -414,7 +414,7 @@ void DocumentImporter::create_constraints(ExtraTags *et, Object *ob){ std::string name; short* type = 0; et->setData("type", type); - bConstraint * con = BKE_add_ob_constraint(ob, "Test_con", *type); + BKE_add_ob_constraint(ob, "Test_con", *type); } } @@ -425,8 +425,6 @@ void DocumentImporter::write_node(COLLADAFW::Node *node, COLLADAFW::Node *parent bool is_joint = node->getType() == COLLADAFW::Node::JOINT; bool read_transform = true; - ExtraTags *et = getExtraTags(node->getUniqueId()); - std::vector<Object *> *objects_done = new std::vector<Object *>(); if (is_joint) { diff --git a/source/blender/collada/SceneExporter.cpp b/source/blender/collada/SceneExporter.cpp index bb33e4084e0..6f620ff7947 100644 --- a/source/blender/collada/SceneExporter.cpp +++ b/source/blender/collada/SceneExporter.cpp @@ -209,7 +209,6 @@ void SceneExporter::writeNodes(Object *ob, Scene *sce) cti->get_constraint_targets(con, &targets); if(cti){ - int i = 1; for (ct = (bConstraintTarget*)targets.first; ct; ct = ct->next){ obtar = ct->tar; std::string tar_id(id_name(obtar)); diff --git a/source/blender/collada/TransformReader.cpp b/source/blender/collada/TransformReader.cpp index 24124c7b58d..8165417f21d 100644 --- a/source/blender/collada/TransformReader.cpp +++ b/source/blender/collada/TransformReader.cpp @@ -47,6 +47,7 @@ void TransformReader::get_node_mat(float mat[4][4], COLLADAFW::Node *node, std:: COLLADAFW::Transformation::TransformationType type = tm->getTransformationType(); if(type == COLLADAFW::Transformation::MATRIX){ + // XXX why does this return and discard all following transformations? dae_matrix_to_mat4(tm, mat); return; } |