26 #include "COLLADAFWAnimation.h"
27 #include "COLLADAFWAnimationCurve.h"
28 #include "COLLADAFWAnimationList.h"
29 #include "COLLADAFWCamera.h"
30 #include "COLLADAFWEffect.h"
31 #include "COLLADAFWInstanceGeometry.h"
32 #include "COLLADAFWLight.h"
33 #include "COLLADAFWMaterial.h"
34 #include "COLLADAFWNode.h"
35 #include "COLLADAFWUniqueId.h"
64 std::map<COLLADAFW::UniqueId, std::vector<FCurve *>> curve_map;
65 std::map<COLLADAFW::UniqueId, TransformReader::Animation> uid_animated_map;
67 std::map<COLLADAFW::UniqueId, const COLLADAFW::AnimationList *> animlist_map;
68 std::vector<FCurve *> unused_curves;
69 std::map<COLLADAFW::UniqueId, Object *> joint_objects;
71 FCurve *create_fcurve(
int array_index,
const char *rna_path);
79 void animation_to_fcurves(COLLADAFW::AnimationCurve *
curve);
81 void fcurve_deg_to_rad(
FCurve *cu);
82 void fcurve_scale(
FCurve *cu,
int scale);
84 void fcurve_is_used(
FCurve *fcu);
86 void add_fcurves_to_object(
Main *bmain,
88 std::vector<FCurve *> &curves,
95 std::string import_from_version;
115 MATERIAL_SHININESS = 2,
116 MATERIAL_SPEC_COLOR = 4,
117 MATERIAL_DIFF_COLOR = 1 << 3,
118 MATERIAL_TRANSPARENCY = 1 << 4,
119 MATERIAL_IOR = 1 << 5,
124 BC_NODE_TRANSFORM = 1,
155 std::map<COLLADAFW::UniqueId, COLLADAFW::Node *> &root_map,
156 std::multimap<COLLADAFW::UniqueId, Object *> &object_map,
157 std::map<COLLADAFW::UniqueId, const COLLADAFW::Object *> FW_object_map,
158 std::map<COLLADAFW::UniqueId, Material *> uid_material_map);
161 const COLLADAFW::Node *
node,
162 std::map<COLLADAFW::UniqueId, const COLLADAFW::Object *> FW_object_map);
165 std::vector<FCurve *> &animcurves,
166 COLLADAFW::Node *root,
167 COLLADAFW::Node *
node,
168 COLLADAFW::Transformation *tm);
171 std::vector<FCurve *> &animcurves,
172 COLLADAFW::Node *root,
173 COLLADAFW::Node *
node,
174 COLLADAFW::Transformation *tm);
177 const COLLADAFW::AnimationList::AnimationBinding *binding,
178 std::vector<FCurve *> *curves,
184 const char *anim_type);
187 const char *anim_type);
192 const char *anim_type,
195 int setAnimType(
const COLLADAFW::Animatable *prop,
int type,
int addition);
198 const char *rna_path,
206 std::map<COLLADAFW::UniqueId, Object *> &object_map,
207 std::map<COLLADAFW::UniqueId, COLLADAFW::Node *> &root_map,
208 COLLADAFW::Transformation::TransformationType tm_type,
211 void find_frames(std::vector<float> *frames, std::vector<FCurve *> *curves);
213 COLLADAFW::Node *
node,
214 COLLADAFW::Transformation::TransformationType tm_type);
224 const char *node_id);
232 COLLADAFW::Node *
node,
233 COLLADAFW::Node *end);
238 Object *get_joint_object(COLLADAFW::Node *root, COLLADAFW::Node *
node,
Object *par_job);
244 bool evaluate_joint_world_transform_at_frame(
245 float mat[4][4],
float par[4][4], COLLADAFW::Node *
node, COLLADAFW::Node *end,
float fra);
Object is a sort of wrapper for general info.
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum type
SIMD_FORCE_INLINE btVector3 transform(const btVector3 &point) const
void get_joint_rest_mat(float mat[4][4], COLLADAFW::Node *root, COLLADAFW::Node *node)
float convert_to_focal_length(float in_xfov, int fov_type, float aspect, float sensorx)
void find_frames(std::vector< float > *frames, std::vector< FCurve * > *curves)
void Assign_float_animations(const COLLADAFW::UniqueId &listid, ListBase *AnimCurves, const char *anim_type)
void extra_data_importer(std::string elementName)
bool evaluate_animation(COLLADAFW::Transformation *tm, float mat[4][4], float fra, const char *node_id)
void read_node_transform(COLLADAFW::Node *node, Object *ob)
void Assign_transform_animations(COLLADAFW::Transformation *transform, const COLLADAFW::AnimationList::AnimationBinding *binding, std::vector< FCurve * > *curves, bool is_joint, char *joint_path)
void Assign_lens_animations(const COLLADAFW::UniqueId &listid, ListBase *AnimCurves, const double aspect, Camera *cam, const char *anim_type, int fov_type)
int setAnimType(const COLLADAFW::Animatable *prop, int type, int addition)
void Assign_color_animations(const COLLADAFW::UniqueId &listid, ListBase *AnimCurves, const char *anim_type)
bool write_animation_list(const COLLADAFW::AnimationList *animlist)
AnimMix * get_animation_type(const COLLADAFW::Node *node, std::map< COLLADAFW::UniqueId, const COLLADAFW::Object * > FW_object_map)
Object * translate_animation_OLD(COLLADAFW::Node *node, std::map< COLLADAFW::UniqueId, Object * > &object_map, std::map< COLLADAFW::UniqueId, COLLADAFW::Node * > &root_map, COLLADAFW::Transformation::TransformationType tm_type, Object *par_job=NULL)
void unused_fcurve(std::vector< FCurve * > *curves)
void add_bone_animation_sampled(Object *ob, std::vector< FCurve * > &animcurves, COLLADAFW::Node *root, COLLADAFW::Node *node, COLLADAFW::Transformation *tm)
void add_bone_fcurve(Object *ob, COLLADAFW::Node *node, FCurve *fcu)
void modify_fcurve(std::vector< FCurve * > *curves, const char *rna_path, int array_index, int scale=1)
bool calc_joint_parent_mat_rest(float mat[4][4], float par[4][4], COLLADAFW::Node *node, COLLADAFW::Node *end)
void find_frames_old(std::vector< float > *frames, COLLADAFW::Node *node, COLLADAFW::Transformation::TransformationType tm_type)
void evaluate_transform_at_frame(float mat[4][4], COLLADAFW::Node *node, float fra)
void apply_matrix_curves(Object *ob, std::vector< FCurve * > &animcurves, COLLADAFW::Node *root, COLLADAFW::Node *node, COLLADAFW::Transformation *tm)
void translate_Animations(COLLADAFW::Node *Node, std::map< COLLADAFW::UniqueId, COLLADAFW::Node * > &root_map, std::multimap< COLLADAFW::UniqueId, Object * > &object_map, std::map< COLLADAFW::UniqueId, const COLLADAFW::Object * > FW_object_map, std::map< COLLADAFW::UniqueId, Material * > uid_material_map)
bool write_animation(const COLLADAFW::Animation *anim)
AnimationImporter(bContext *C, UnitConverter *conv, ArmatureImporter *arm, Scene *scene)
void set_import_from_version(std::string import_from_version)