Blender
V3.3
|
#include <AnimationExporter.h>
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 74 of file AnimationExporter.h.
|
inline |
Definition at line 82 of file AnimationExporter.h.
References sw.
|
protected |
Definition at line 496 of file AnimationExporter.cpp.
References transform().
Referenced by collada_source_from_values(), and collada_tangent_from_curve().
Definition at line 62 of file AnimationExporter.cpp.
Referenced by exportAnimation().
|
protected |
Definition at line 667 of file AnimationExporter.cpp.
References BEZT_IPO_BEZ, BEZT_IPO_CONST, curve, and get_semantic_suffix().
Referenced by export_collada_curve_animation().
|
protected |
Interpolation sources.
Definition at line 712 of file AnimationExporter.cpp.
References get_semantic_suffix().
Referenced by export_collada_curve_animation(), and export_collada_matrix_animation().
|
protected |
Input and Output sources (single valued).
Definition at line 580 of file AnimationExporter.cpp.
References add_source_parameters(), BC_SOURCE_TYPE_ANGLE, BC_SOURCE_TYPE_TIMEFRAME, FRA2TIME, get_semantic_suffix(), RAD2DEGF, scene, and stride.
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 626 of file AnimationExporter.cpp.
References add_source_parameters(), get_semantic_suffix(), and sample.
|
protected |
Definition at line 535 of file AnimationExporter.cpp.
References add_source_parameters(), bc_startswith(), FCurve::bezt, curve, FRA2TIME, get_semantic_suffix(), RAD2DEGF, scene, FCurve::totvert, and BezTriple::vec.
Referenced by export_collada_curve_animation().
|
protected |
|
protected |
|
protected |
|
protected |
Export for one bone.
Definition at line 340 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 232 of file AnimationExporter.cpp.
References Bone::childbase, export_bone_animation(), ListBase::first, and sampler().
Referenced by exportAnimation().
|
protected |
Call to the low level collada exporter.
Definition at line 377 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(), curve, EMPTY_STRING, and sampler().
Referenced by export_curve_animation().
|
protected |
Call to the low level collada exporter.
Definition at line 442 of file AnimationExporter.cpp.
References BC_SOURCE_TYPE_TIMEFRAME, collada_linear_interpolation_source(), collada_source_from_values(), EMPTY_STRING, openAnimationWithClip(), and sampler().
Referenced by export_bone_animation(), and export_matrix_animation().
|
protected |
Export one single curve.
Definition at line 299 of file AnimationExporter.cpp.
References BC_ANIMATION_TYPE_MATERIAL, bc_get_action_id(), bc_getSceneObjectAction(), BKE_object_material_get(), curve, encode_xml(), export_collada_curve_animation(), get_axis_name(), get_collada_sid(), id_name(), and translate_id().
Referenced by export_curve_animation_set().
|
protected |
Export all animation FCurves of an Object.
Definition at line 153 of file AnimationExporter.cpp.
References curve, curves, export_curve_animation(), get_modified_export_curve(), and sampler().
Referenced by exportAnimation().
|
protected |
Export animation as matrix data.
Definition at line 194 of file AnimationExporter.cpp.
References bc_get_action_id(), bc_getSceneObjectAction(), encode_xml(), export_collada_matrix_animation(), id_name(), Object::parentinv, sampler(), and translate_id().
Referenced by exportAnimation().
Referenced by exportAnimation().
|
protected |
Main entry point into Animation export (called for each exported object).
Definition at line 115 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::first, OB_ARMATURE, open_animation_container(), sampler(), and Object::type.
Referenced by exportAnimations().
bool AnimationExporter::exportAnimations | ( | ) |
Definition at line 69 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 16 of file AnimationExporter.cpp.
References id.
Referenced by export_curve_animation().
|
protected |
Definition at line 737 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 789 of file AnimationExporter.cpp.
References curve, and get_collada_name().
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 254 of file AnimationExporter.cpp.
References BCAnimationCurve::add_value(), BC_ANIMATION_TYPE_CAMERA, BCAnimationCurve::clean_handles(), curve, curves, Object::data, focallength_to_fov(), BCAnimationCurve::get_value(), and RAD2DEGF.
Referenced by export_curve_animation_set().
|
protected |
|
protected |
|
protected |
Definition at line 477 of file AnimationExporter.cpp.
Referenced by collada_interpolation_source(), collada_linear_interpolation_source(), collada_source_from_values(), and collada_tangent_from_curve().
Definition at line 356 of file AnimationExporter.cpp.
References BONE_NO_DEFORM, Bone::childbase, ListBase::first, and Bone::flag.
Definition at line 42 of file AnimationExporter.cpp.
References encode_xml(), id_name(), and translate_id().
Referenced by exportAnimation().
|
protected |
Definition at line 52 of file AnimationExporter.cpp.
References anim_meta, and translate_id().
Referenced by export_collada_matrix_animation().
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
Definition at line 135 of file AnimationExporter.h.
Referenced by exportAnimations(), and openAnimationWithClip().