[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [38062] branches/soc-2011-pepper/source/ blender/collada: AnimationType flag.
Sukhitha Jayathilake
pr.jayathilake at gmail.com
Sun Jul 3 15:01:52 CEST 2011
Revision: 38062
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=38062
Author: phabtar
Date: 2011-07-03 13:01:52 +0000 (Sun, 03 Jul 2011)
Log Message:
-----------
AnimationType flag. AnimationType Enum update.
Modified Paths:
--------------
branches/soc-2011-pepper/source/blender/collada/AnimationImporter.cpp
branches/soc-2011-pepper/source/blender/collada/AnimationImporter.h
Modified: branches/soc-2011-pepper/source/blender/collada/AnimationImporter.cpp
===================================================================
--- branches/soc-2011-pepper/source/blender/collada/AnimationImporter.cpp 2011-07-03 12:33:52 UTC (rev 38061)
+++ branches/soc-2011-pepper/source/blender/collada/AnimationImporter.cpp 2011-07-03 13:01:52 UTC (rev 38062)
@@ -681,7 +681,7 @@
const char *bone_name = is_joint ? bc_get_joint_name(node) : NULL;
- AnimationType type = get_animation_type(node, FW_object_map );
+ int animType = get_animation_type(node, FW_object_map );
char joint_path[200];
@@ -754,10 +754,10 @@
}
//Check if object is animated by checking if animlist_map holds the animlist_id of node transforms
-AnimationImporter::AnimationType AnimationImporter::get_animation_type ( const COLLADAFW::Node * node ,
+int AnimationImporter::get_animation_type ( const COLLADAFW::Node * node ,
std::map<COLLADAFW::UniqueId, const COLLADAFW::Object*> FW_object_map)
{
- AnimationImporter::AnimationType type = AnimationImporter::INANIMATE ;
+ int type = INANIMATE ;
//bool exists = false;
const COLLADAFW::TransformationPointerArray& nodeTransforms = node->getTransformations();
@@ -770,7 +770,7 @@
if (animlist_map.find(listid) == animlist_map.end()) continue ;
else
{
- type = AnimationImporter::NODE_TRANSFORM;
+ type = type|NODE_TRANSFORM;
break;
}
}
@@ -785,7 +785,7 @@
if (animlist_map.find(listid) == animlist_map.end()) continue ;
else
{
- type = AnimationImporter::LIGHT_COLOR;
+ type = type|LIGHT_COLOR;
break;
}
}
Modified: branches/soc-2011-pepper/source/blender/collada/AnimationImporter.h
===================================================================
--- branches/soc-2011-pepper/source/blender/collada/AnimationImporter.h 2011-07-03 12:33:52 UTC (rev 38061)
+++ branches/soc-2011-pepper/source/blender/collada/AnimationImporter.h 2011-07-03 13:01:52 UTC (rev 38062)
@@ -80,12 +80,14 @@
void fcurve_deg_to_rad(FCurve *cu);
void add_fcurves_to_object(Object *ob, std::vector<FCurve*>& curves, char *rna_path, int array_index, Animation *animated);
+
+ int typeFlag;
enum AnimationType
{
- NODE_TRANSFORM,
- LIGHT_COLOR,
- INANIMATE
+ INANIMATE = 0,
+ NODE_TRANSFORM = 1,
+ LIGHT_COLOR = 2,
};
public:
@@ -108,7 +110,7 @@
std::map<COLLADAFW::UniqueId, Object*>& object_map ,
std::map<COLLADAFW::UniqueId, const COLLADAFW::Object*> FW_object_map);
- AnimationType get_animation_type( const COLLADAFW::Node * node , std::map<COLLADAFW::UniqueId,const COLLADAFW::Object*> FW_object_map ) ;
+ int get_animation_type( const COLLADAFW::Node * node , std::map<COLLADAFW::UniqueId,const COLLADAFW::Object*> FW_object_map ) ;
void Assign_transform_animations(COLLADAFW::Transformation* transform ,
More information about the Bf-blender-cvs
mailing list