|
Blender V4.5
|
#include <AnimationExporter.h>
Inherits COLLADASW::LibraryAnimations.
Public Member Functions | |
| AnimationExporter (COLLADASW::StreamWriter *sw, BCExportSettings &export_settings) | |
| bool | exportAnimations () |
| void | operator() (Object *ob) |
Protected Member Functions | |
| void | export_object_constraint_animation (Object *ob) |
| void | export_morph_animation (Object *ob) |
| void | write_bone_animation_matrix (Object *ob_arm, Bone *bone) |
| 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_and_write_bone_animation_matrix (Object *ob_arm, Bone *bone) |
| void | sample_animation (float *v, std::vector< float > &frames, int type, Bone *bone, Object *ob_arm, bPoseChannel *pChan) |
| void | sample_animation (std::vector< float[4][4]> &mats, std::vector< float > &frames, Bone *bone, Object *ob_arm, bPoseChannel *pChan) |
| void | dae_bone_animation (std::vector< float > &fra, float *v, int tm_type, int axis, std::string ob_name, std::string bone_name) |
| void | dae_baked_animation (std::vector< float > &fra, Object *ob_arm, Bone *bone) |
| void | dae_baked_object_animation (std::vector< float > &fra, Object *ob) |
| float | convert_time (float frame) |
| float | convert_angle (float angle) |
| void | exportAnimation (Object *ob, BCAnimationSampler &sampler) |
| void | export_curve_animation_set (Object *ob, BCAnimationSampler &sampler, bool export_as_matrix) |
| void | export_curve_animation (Object *ob, BCAnimationCurve &curve) |
| void | export_matrix_animation (Object *ob, BCAnimationSampler &sampler) |
| void | export_bone_animations_recursive (Object *ob_arm, Bone *bone, BCAnimationSampler &sampler) |
| void | export_bone_animation (Object *ob, Bone *bone, BCFrames &frames, BCMatrixSampleMap &samples) |
| void | export_collada_curve_animation (std::string id, std::string name, std::string target, std::string axis, BCAnimationCurve &curve, BC_global_rotation_type global_rotation_type) |
| void | export_collada_matrix_animation (std::string id, std::string name, std::string target, BCFrames &frames, BCMatrixSampleMap &samples, BC_global_rotation_type global_rotation_type, Matrix &parentinv) |
| BCAnimationCurve * | get_modified_export_curve (Object *ob, BCAnimationCurve &curve, BCAnimationCurveMap &curves) |
| void | openAnimationWithClip (std::string id, std::string name) |
| bool | open_animation_container (bool has_container, Object *ob) |
| void | close_animation_container (bool has_container) |
| std::string | collada_source_from_values (BC_animation_source_type source_type, COLLADASW::InputSemantic::Semantics semantic, std::vector< float > &values, const std::string &anim_id, const std::string axis_name) |
| std::string | collada_source_from_values (BCMatrixSampleMap &samples, const std::string &anim_id, BC_global_rotation_type global_rotation_type, Matrix &parentinv) |
| std::string | collada_linear_interpolation_source (int tot, const std::string &anim_id) |
| 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 std::string axis, bool transform) |
| int | get_point_in_curve (BCBezTriple &bezt, COLLADASW::InputSemantic::Semantics semantic, bool is_angle, float *values) |
| int | get_point_in_curve (const BCAnimationCurve &curve, float sample_frame, COLLADASW::InputSemantic::Semantics semantic, bool is_angle, float *values) |
| std::string | collada_tangent_from_curve (COLLADASW::InputSemantic::Semantics semantic, BCAnimationCurve &curve, const std::string &anim_id, const std::string axis_name) |
| std::string | collada_interpolation_source (const BCAnimationCurve &curve, const std::string &anim_id, std::string axis_name, bool *has_tangents) |
| std::string | get_axis_name (std::string channel, int id) |
| std::string | get_collada_name (std::string channel_type) const |
| std::string | get_collada_sid (const BCAnimationCurve &curve, const std::string axis_name) |
| bool | is_bone_deform_group (Bone *bone) |
Protected Attributes | |
| std::vector< std::vector< std::string > > | anim_meta |
Definition at line 31 of file AnimationExporter.h.
|
inline |
Definition at line 39 of file AnimationExporter.h.
|
protected |
Definition at line 499 of file AnimationExporter.cpp.
References transform().
Referenced by collada_source_from_values(), collada_source_from_values(), and collada_tangent_from_curve().
|
protected |
Definition at line 66 of file AnimationExporter.cpp.
Referenced by exportAnimation().
|
protected |
Definition at line 670 of file AnimationExporter.cpp.
References BEZT_IPO_BEZ, BEZT_IPO_CONST, BCAnimationCurve::get_frames(), BCAnimationCurve::get_interpolation_type(), get_semantic_suffix(), i, and BCAnimationCurve::sample_count().
Referenced by export_collada_curve_animation().
|
protected |
Interpolation sources.
Definition at line 715 of file AnimationExporter.cpp.
References get_semantic_suffix(), and i.
Referenced by export_collada_curve_animation(), and export_collada_matrix_animation().
|
protected |
Input and Output sources (single valued).
Definition at line 583 of file AnimationExporter.cpp.
References add_source_parameters(), BC_SOURCE_TYPE_ANGLE, BC_SOURCE_TYPE_TIMEFRAME, FRA2TIME, BlenderContext::get_scene(), get_semantic_suffix(), i, and RAD2DEGF.
Referenced by export_collada_curve_animation(), and export_collada_matrix_animation().
|
protected |
Output sources (matrix data). * Create a collada matrix source for a set of samples.
Definition at line 629 of file AnimationExporter.cpp.
References add_source_parameters(), get_semantic_suffix(), and sample.
|
protected |
Definition at line 538 of file AnimationExporter.cpp.
References add_source_parameters(), bc_startswith(), FCurve::bezt, FRA2TIME, BCAnimationCurve::get_channel_target(), BCAnimationCurve::get_fcurve(), get_semantic_suffix(), i, RAD2DEGF, BCAnimationCurve::sample_count(), FCurve::totvert, and BezTriple::vec.
Referenced by export_collada_curve_animation().
|
protected |
References angle().
|
protected |
|
protected |
|
protected |
|
protected |
References v.
|
protected |
Export for one bone.
Definition at line 344 of file AnimationExporter.cpp.
References bc_get_action_id(), bc_getSceneObjectAction(), encode_xml(), export_collada_matrix_animation(), id_name(), Bone::name, Object::parentinv, and translate_id().
Referenced by export_bone_animations_recursive().
|
protected |
Write bone animations in transform matrix sources (step through the bone hierarchy).
Definition at line 236 of file AnimationExporter.cpp.
References Bone::childbase, export_bone_animation(), export_bone_animations_recursive(), BCAnimationSampler::get_bone_frames(), BCAnimationSampler::get_bone_samples(), and LISTBASE_FOREACH.
Referenced by export_bone_animations_recursive(), and exportAnimation().
|
protected |
Call to the low level collada exporter.
Definition at line 381 of file AnimationExporter.cpp.
References BC_SOURCE_TYPE_ANGLE, BC_SOURCE_TYPE_TIMEFRAME, BC_SOURCE_TYPE_VALUE, collada_interpolation_source(), collada_linear_interpolation_source(), collada_source_from_values(), collada_tangent_from_curve(), EMPTY_STRING, BCAnimationCurve::get_frames(), BCAnimationCurve::get_values(), and BCAnimationCurve::is_rotation_curve().
Referenced by export_curve_animation().
|
protected |
Call to the low level collada exporter.
Definition at line 445 of file AnimationExporter.cpp.
References BC_SOURCE_TYPE_TIMEFRAME, collada_linear_interpolation_source(), collada_source_from_values(), EMPTY_STRING, and openAnimationWithClip().
Referenced by export_bone_animation(), and export_matrix_animation().
|
protected |
Export one single curve.
Definition at line 303 of file AnimationExporter.cpp.
References BC_ANIMATION_TYPE_MATERIAL, bc_get_action_id(), bc_getSceneObjectAction(), BKE_object_material_get(), encode_xml(), export_collada_curve_animation(), BCAnimationCurve::get_animation_name(), get_axis_name(), BCAnimationCurve::get_channel_index(), BCAnimationCurve::get_channel_target(), BCAnimationCurve::get_channel_type(), get_collada_sid(), BCAnimationCurve::get_subindex(), id_name(), BCAnimationCurve::is_of_animation_type(), and translate_id().
Referenced by export_curve_animation_set().
|
protected |
Export all animation FCurves of an Object.
Definition at line 157 of file AnimationExporter.cpp.
References export_curve_animation(), BCAnimationCurve::get_channel_type(), BCAnimationSampler::get_curves(), get_modified_export_curve(), BCAnimationCurve::is_animated(), and BCAnimationCurve::is_transform_curve().
Referenced by exportAnimation().
|
protected |
Export animation as matrix data.
Definition at line 198 of file AnimationExporter.cpp.
References bc_get_action_id(), bc_getSceneObjectAction(), encode_xml(), export_collada_matrix_animation(), BCAnimationSampler::get_object_frames(), BCAnimationSampler::get_object_samples(), id_name(), Object::parentinv, and translate_id().
Referenced by exportAnimation().
|
protected |
Referenced by exportAnimation().
|
protected |
|
protected |
Main entry point into Animation export (called for each exported object).
Definition at line 119 of file AnimationExporter.cpp.
References BC_TRANSFORMATION_TYPE_MATRIX, bArmature::bonebase, close_animation_container(), Object::data, export_bone_animations_recursive(), export_curve_animation_set(), export_matrix_animation(), export_morph_animation(), LISTBASE_FOREACH, OB_ARMATURE, open_animation_container(), and Object::type.
Referenced by exportAnimations().
| bool AnimationExporter::exportAnimations | ( | ) |
Definition at line 73 of file AnimationExporter.cpp.
References anim_meta, bc_has_animations(), exportAnimation(), AnimationClipExporter::exportAnimationClips(), BCAnimationSampler::get_animated_from_export_set(), and BCAnimationSampler::sample_scene().
Referenced by DocumentExporter::exportCurrentScene().
|
protected |
Definition at line 20 of file AnimationExporter.cpp.
Referenced by export_curve_animation().
|
protected |
Definition at line 740 of file AnimationExporter.cpp.
Referenced by get_collada_sid().
|
protected |
Assign sid of the animated parameter or transform for rotation, axis name is always appended and the value of append_axis is ignored.
Definition at line 792 of file AnimationExporter.cpp.
References BCAnimationCurve::get_channel_type(), get_collada_name(), and BCAnimationCurve::is_rotation_curve().
Referenced by export_curve_animation().
|
protected |
In some special cases the exported Curve needs to be replaced by a modified curve (for collada purposes) This method checks if a conversion is necessary and if applicable returns a pointer to the modified BCAnimationCurve. IMPORTANT: the modified curve must be deleted by the caller when no longer needed if no conversion is needed this method returns a NULL;
Definition at line 258 of file AnimationExporter.cpp.
References BCAnimationCurve::add_value(), BC_ANIMATION_TYPE_CAMERA, BCAnimationCurve::clean_handles(), Object::data, focallength_to_fov(), BCAnimationCurve::get_channel_type(), BCAnimationCurve::get_value(), BCAnimationCurve::get_value_map(), and RAD2DEGF.
Referenced by export_curve_animation_set().
|
protected |
|
protected |
|
protected |
Definition at line 480 of file AnimationExporter.cpp.
Referenced by collada_interpolation_source(), collada_linear_interpolation_source(), collada_source_from_values(), collada_source_from_values(), and collada_tangent_from_curve().
|
protected |
Definition at line 360 of file AnimationExporter.cpp.
References BONE_NO_DEFORM, Bone::childbase, Bone::flag, is_bone_deform_group(), and LISTBASE_FOREACH.
Referenced by is_bone_deform_group().
|
protected |
Definition at line 46 of file AnimationExporter.cpp.
References encode_xml(), id_name(), SNPRINTF, and translate_id().
Referenced by exportAnimation().
|
protected |
Definition at line 56 of file AnimationExporter.cpp.
References anim_meta, and translate_id().
Referenced by export_collada_matrix_animation().
| void AnimationExporter::operator() | ( | Object * | ob | ) |
Called for each exported object.
|
protected |
|
protected |
|
protected |
References v.
|
protected |
|
protected |
Definition at line 92 of file AnimationExporter.h.
Referenced by exportAnimations(), and openAnimationWithClip().