svn merge ^/trunk/blender -r46300:46330
[blender.git] / source / blender / collada / AnimationImporter.cpp
index 195057817dddb729d90a5637bfd493d32ee9b39f..3180245eac1bc4497fb911320d9df22cabdae6bf 100644 (file)
@@ -438,16 +438,6 @@ void AnimationImporter::modify_fcurve(std::vector<FCurve*>* curves, const char*
        }
 }
 
-void AnimationImporter::unused_fcurve(std::vector<FCurve*>* curves)
-{
-       // when an error happens and we can't actually use curve remove it from unused_curves
-       std::vector<FCurve*>::iterator it;
-       for (it = curves->begin(); it != curves->end(); it++) {
-               FCurve *fcu = *it;
-               unused_curves.erase(std::remove(unused_curves.begin(), unused_curves.end(), fcu), unused_curves.end());
-       }
-}
-
 void AnimationImporter::find_frames( std::vector<float>* frames, std::vector<FCurve*>* curves)
 {
        std::vector<FCurve*>::iterator iter;
@@ -509,7 +499,6 @@ void AnimationImporter:: Assign_transform_animations(COLLADAFW::Transformation *
                        modify_fcurve(curves, rna_path, -1 );
                        break;
                default:
-                       unused_fcurve(curves);
                        fprintf(stderr, "AnimationClass %d is not supported for %s.\n",
                                binding->animationClass, loc ? "TRANSLATE" : "SCALE");
                                }
@@ -545,13 +534,10 @@ void AnimationImporter:: Assign_transform_animations(COLLADAFW::Transformation *
                        else if (COLLADABU::Math::Vector3::UNIT_Z == axis) {
                                modify_fcurve(curves, rna_path, 2 );
                        }
-                       else
-                               unused_fcurve(curves);
                        break;
                case COLLADAFW::AnimationList::AXISANGLE:
                        // TODO convert axis-angle to quat? or XYZ?
                default:
-                       unused_fcurve(curves);
                        fprintf(stderr, "AnimationClass %d is not supported for ROTATE transformation.\n",
                                binding->animationClass);
                                }
@@ -567,11 +553,9 @@ void AnimationImporter:: Assign_transform_animations(COLLADAFW::Transformation *
 
                        }
                        }*/
-                       unused_fcurve(curves);
                        break;
                case COLLADAFW::Transformation::SKEW:
                case COLLADAFW::Transformation::LOOKAT:
-                       unused_fcurve(curves);
                        fprintf(stderr, "Animation of SKEW and LOOKAT transformations is not supported yet.\n");
                        break;
        }
@@ -607,7 +591,6 @@ void AnimationImporter:: Assign_color_animations(const COLLADAFW::UniqueId& list
                        break;
 
                default:
-                       unused_fcurve(&animcurves);
                        fprintf(stderr, "AnimationClass %d is not supported for %s.\n",
                                bindings[j].animationClass, "COLOR" );
                }
@@ -1770,7 +1753,7 @@ bool AnimationImporter::calc_joint_parent_mat_rest(float mat[4][4], float par[4]
 Object *AnimationImporter::get_joint_object(COLLADAFW::Node *root, COLLADAFW::Node *node, Object *par_job)
 {
        if (joint_objects.find(node->getUniqueId()) == joint_objects.end()) {
-               Object *job = bc_add_object(scene, OB_EMPTY, (char*)get_joint_name(node));
+               Object *job = add_object(scene, OB_EMPTY);
 
                job->lay = BKE_scene_base_find(scene, job)->lay = 2;