|
Blender
V2.59
|
Public Member Functions | |
| AnimationExporter (COLLADASW::StreamWriter *sw) | |
| void | exportAnimations (Scene *sce) |
| void | operator() (Object *ob) |
Protected Member Functions | |
| void | dae_animation (FCurve *fcu, std::string ob_name) |
| void | write_bone_animation (Object *ob_arm, Bone *bone) |
| void | sample_and_write_bone_animation (Object *ob_arm, Bone *bone, int transform_type) |
| void | sample_animation (float *v, std::vector< float > &frames, int type, Bone *bone, Object *ob_arm) |
| void | dae_bone_animation (std::vector< float > &fra, float *v, int tm_type, int axis, std::string ob_name, std::string bone_name) |
| float | convert_time (float frame) |
| float | convert_angle (float angle) |
| std::string | get_semantic_suffix (COLLADASW::InputSemantic::Semantics semantic) |
| void | add_source_parameters (COLLADASW::SourceBase::ParameterNameList ¶m, COLLADASW::InputSemantic::Semantics semantic, bool is_rot, const char *axis) |
| void | get_source_values (BezTriple *bezt, COLLADASW::InputSemantic::Semantics semantic, bool rotation, float *values, int *length) |
| std::string | create_source_from_fcurve (COLLADASW::InputSemantic::Semantics semantic, FCurve *fcu, const std::string &anim_id, const char *axis_name) |
| std::string | create_source_from_array (COLLADASW::InputSemantic::Semantics semantic, float *v, int tot, bool is_rot, const std::string &anim_id, const char *axis_name) |
| std::string | create_source_from_vector (COLLADASW::InputSemantic::Semantics semantic, std::vector< float > &fra, bool is_rot, const std::string &anim_id, const char *axis_name) |
| std::string | create_xyz_source (float *v, int tot, const std::string &anim_id) |
| std::string | create_interpolation_source (int tot, const std::string &anim_id, const char *axis_name) |
| std::string | get_transform_sid (char *rna_path, int tm_type, const char *axis_name, bool append_axis) |
| char * | extract_transform_name (char *rna_path) |
| void | find_frames (Object *ob, std::vector< float > &fra, const char *prefix, const char *tm_name) |
| void | find_rotation_frames (Object *ob, std::vector< float > &fra, const char *prefix, int rotmode) |
| void | enable_fcurves (bAction *act, char *bone_name) |
| bool | hasAnimations (Scene *sce) |
Definition at line 304 of file DocumentExporter.cpp.
| AnimationExporter::AnimationExporter | ( | COLLADASW::StreamWriter * | sw | ) | [inline] |
Definition at line 311 of file DocumentExporter.cpp.
| void AnimationExporter::add_source_parameters | ( | COLLADASW::SourceBase::ParameterNameList & | param, |
| COLLADASW::InputSemantic::Semantics | semantic, | ||
| bool | is_rot, | ||
| const char * | axis | ||
| ) | [inline, protected] |
Definition at line 609 of file DocumentExporter.cpp.
References OUTPUT.
Referenced by create_source_from_array(), create_source_from_fcurve(), create_source_from_vector(), and create_xyz_source().
| float AnimationExporter::convert_angle | ( | float | angle | ) | [inline, protected] |
Definition at line 585 of file DocumentExporter.cpp.
Referenced by create_source_from_array(), create_source_from_vector(), and get_source_values().
| float AnimationExporter::convert_time | ( | float | frame | ) | [inline, protected] |
Definition at line 580 of file DocumentExporter.cpp.
References FRA2TIME.
Referenced by create_source_from_array(), create_source_from_vector(), and get_source_values().
| std::string AnimationExporter::create_interpolation_source | ( | int | tot, |
| const std::string & | anim_id, | ||
| const char * | axis_name | ||
| ) | [inline, protected] |
Definition at line 788 of file DocumentExporter.cpp.
References get_semantic_suffix(), and i.
Referenced by dae_animation(), and dae_bone_animation().
| std::string AnimationExporter::create_source_from_array | ( | COLLADASW::InputSemantic::Semantics | semantic, |
| float * | v, | ||
| int | tot, | ||
| bool | is_rot, | ||
| const std::string & | anim_id, | ||
| const char * | axis_name | ||
| ) | [inline, protected] |
Definition at line 702 of file DocumentExporter.cpp.
References add_source_parameters(), convert_angle(), convert_time(), get_semantic_suffix(), i, and simple_enum_gen::val.
Referenced by dae_bone_animation().
| std::string AnimationExporter::create_source_from_fcurve | ( | COLLADASW::InputSemantic::Semantics | semantic, |
| FCurve * | fcu, | ||
| const std::string & | anim_id, | ||
| const char * | axis_name | ||
| ) | [inline, protected] |
Definition at line 668 of file DocumentExporter.cpp.
References add_source_parameters(), FCurve::bezt, get_semantic_suffix(), get_source_values(), i, length(), FCurve::rna_path, and FCurve::totvert.
Referenced by dae_animation().
| std::string AnimationExporter::create_source_from_vector | ( | COLLADASW::InputSemantic::Semantics | semantic, |
| std::vector< float > & | fra, | ||
| bool | is_rot, | ||
| const std::string & | anim_id, | ||
| const char * | axis_name | ||
| ) | [inline, protected] |
Definition at line 731 of file DocumentExporter.cpp.
References add_source_parameters(), convert_angle(), convert_time(), get_semantic_suffix(), and simple_enum_gen::val.
Referenced by dae_bone_animation().
| std::string AnimationExporter::create_xyz_source | ( | float * | v, |
| int | tot, | ||
| const std::string & | anim_id | ||
| ) | [inline, protected] |
Definition at line 762 of file DocumentExporter.cpp.
References add_source_parameters(), get_semantic_suffix(), i, NULL, and OUTPUT.
Referenced by dae_bone_animation().
| void AnimationExporter::dae_animation | ( | FCurve * | fcu, |
| std::string | ob_name | ||
| ) | [inline, protected] |
Definition at line 356 of file DocumentExporter.cpp.
References FCurve::array_index, BLI_snprintf(), create_interpolation_source(), create_source_from_fcurve(), get_transform_sid(), NULL, OUTPUT, FCurve::rna_path, FCurve::totvert, and translate_id().
Referenced by operator()().
| void AnimationExporter::dae_bone_animation | ( | std::vector< float > & | fra, |
| float * | v, | ||
| int | tm_type, | ||
| int | axis, | ||
| std::string | ob_name, | ||
| std::string | bone_name | ||
| ) | [inline, protected] |
Definition at line 524 of file DocumentExporter.cpp.
References BLI_snprintf(), create_interpolation_source(), create_source_from_array(), create_source_from_vector(), create_xyz_source(), get_transform_sid(), NULL, OUTPUT, and translate_id().
Referenced by sample_and_write_bone_animation().
| void AnimationExporter::enable_fcurves | ( | bAction * | act, |
| char * | bone_name | ||
| ) | [inline, protected] |
Definition at line 895 of file DocumentExporter.cpp.
References BLI_snprintf(), bAction::curves, FCURVE_DISABLED, ListBase::first, FCurve::flag, FCurve::next, and FCurve::rna_path.
Referenced by sample_animation().
| void AnimationExporter::exportAnimations | ( | Scene * | sce | ) | [inline] |
Definition at line 315 of file DocumentExporter.cpp.
References forEachObjectInScene(), and hasAnimations().
Referenced by DocumentExporter::exportCurrentScene().
| char* AnimationExporter::extract_transform_name | ( | char * | rna_path | ) | [inline, protected] |
Definition at line 855 of file DocumentExporter.cpp.
References dot().
Referenced by find_frames(), and get_transform_sid().
| void AnimationExporter::find_frames | ( | Object * | ob, |
| std::vector< float > & | fra, | ||
| const char * | prefix, | ||
| const char * | tm_name | ||
| ) | [inline, protected] |
Definition at line 861 of file DocumentExporter.cpp.
References AnimData::action, Object::adt, FCurve::bezt, bAction::curves, extract_transform_name(), find(), ListBase::first, i, FCurve::next, FCurve::rna_path, sort(), FCurve::totvert, and BezTriple::vec.
Referenced by find_rotation_frames(), and sample_and_write_bone_animation().
| void AnimationExporter::find_rotation_frames | ( | Object * | ob, |
| std::vector< float > & | fra, | ||
| const char * | prefix, | ||
| int | rotmode | ||
| ) | [inline, protected] |
Definition at line 883 of file DocumentExporter.cpp.
References find_frames(), and ROT_MODE_QUAT.
Referenced by sample_and_write_bone_animation().
| std::string AnimationExporter::get_semantic_suffix | ( | COLLADASW::InputSemantic::Semantics | semantic | ) | [inline, protected] |
Definition at line 590 of file DocumentExporter.cpp.
References OUTPUT.
Referenced by create_interpolation_source(), create_source_from_array(), create_source_from_fcurve(), create_source_from_vector(), and create_xyz_source().
| void AnimationExporter::get_source_values | ( | BezTriple * | bezt, |
| COLLADASW::InputSemantic::Semantics | semantic, | ||
| bool | rotation, | ||
| float * | values, | ||
| int * | length | ||
| ) | [inline, protected] |
Definition at line 641 of file DocumentExporter.cpp.
References convert_angle(), convert_time(), OUTPUT, and BezTriple::vec.
Referenced by create_source_from_fcurve().
| std::string AnimationExporter::get_transform_sid | ( | char * | rna_path, |
| int | tm_type, | ||
| const char * | axis_name, | ||
| bool | append_axis | ||
| ) | [inline, protected] |
Definition at line 813 of file DocumentExporter.cpp.
References extract_transform_name().
Referenced by dae_animation(), and dae_bone_animation().
| bool AnimationExporter::hasAnimations | ( | Scene * | sce | ) | [inline, protected] |
Definition at line 916 of file DocumentExporter.cpp.
References AnimData::action, Object::adt, Scene::base, bAction::curves, Object::data, ListBase::first, if(), Base::next, OB_ARMATURE, Base::object, and Object::type.
Referenced by exportAnimations().
| void AnimationExporter::operator() | ( | Object * | ob | ) | [inline] |
Definition at line 329 of file DocumentExporter.cpp.
References AnimData::action, Object::adt, bArmature::bonebase, bAction::curves, dae_animation(), Object::data, ListBase::first, id_name(), if(), FCurve::next, OB_ARMATURE, FCurve::rna_path, ROT_MODE_EUL, Object::rotmode, Object::type, and write_bone_animation().
| void AnimationExporter::sample_and_write_bone_animation | ( | Object * | ob_arm, |
| Bone * | bone, | ||
| int | transform_type | ||
| ) | [inline, protected] |
Definition at line 411 of file DocumentExporter.cpp.
References ARM_RESTPOS, BLI_snprintf(), dae_bone_animation(), Object::data, find_frames(), find_rotation_frames(), bArmature::flag, get_pose_channel(), i, id_name(), MEM_callocN(), MEM_freeN(), Bone::name, Object::pose, bPoseChannel::rotmode, sample_animation(), and where_is_pose().
Referenced by write_bone_animation().
| void AnimationExporter::sample_animation | ( | float * | v, |
| std::vector< float > & | frames, | ||
| int | type, | ||
| Bone * | bone, | ||
| Object * | ob_arm | ||
| ) | [inline, protected] |
Definition at line 473 of file DocumentExporter.cpp.
References AnimData::action, Object::adt, ADT_RECALC_ANIM, BKE_animsys_evaluate_animdata(), bsystem_time(), copy_m4_m4(), copy_v3_v3(), enable_fcurves(), get_pose_channel(), Object::id, invert_m4_m4(), mat4_to_eul(), mat4_to_size(), mul_m4_m4m4(), Bone::name, NULL, Bone::parent, bPoseChannel::parent, Object::pose, bPoseChannel::pose_mat, and where_is_pose_bone().
Referenced by sample_and_write_bone_animation().
Definition at line 399 of file DocumentExporter.cpp.
References Object::adt, Bone::childbase, ListBase::first, i, and sample_and_write_bone_animation().
Referenced by operator()().