Blender V2.61 - r43446
Public Member Functions | Protected Member Functions

AnimationExporter Class Reference

#include <AnimationExporter.h>

List of all members.

Public Member Functions

 AnimationExporter (COLLADASW::StreamWriter *sw)
void exportAnimations (Scene *sce)
void operator() (Object *ob)

Protected Member Functions

void dae_animation (Object *ob, FCurve *fcu, char *transformName, bool is_param, Material *ma=NULL)
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)
bool is_bone_deform_group (Bone *bone)
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)
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 &param, COLLADASW::InputSemantic::Semantics semantic, bool is_rot, const char *axis, bool transform)
void get_source_values (BezTriple *bezt, COLLADASW::InputSemantic::Semantics semantic, bool rotation, float *values, int *length)
float * get_eul_source_for_quat (Object *ob)
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_4x4_source (std::vector< float > &frames, Object *ob_arm, Bone *bone, const std::string &anim_id)
std::string create_interpolation_source (FCurve *fcu, const std::string &anim_id, const char *axis_name, bool *has_tangents)
std::string fake_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)
std::string get_light_param_sid (char *rna_path, int tm_type, const char *axis_name, bool append_axis)
std::string get_camera_param_sid (char *rna_path, int tm_type, const char *axis_name, bool append_axis)
void find_frames (Object *ob, std::vector< float > &fra, const char *prefix, const char *tm_name)
void find_frames (Object *ob, std::vector< float > &fra)
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)
char * extract_transform_name (char *rna_path)
std::string getObjectBoneName (Object *ob, const FCurve *fcu)

Detailed Description

Definition at line 78 of file AnimationExporter.h.


Constructor & Destructor Documentation

AnimationExporter::AnimationExporter ( COLLADASW::StreamWriter *  sw) [inline]

Definition at line 86 of file AnimationExporter.h.


Member Function Documentation

void AnimationExporter::add_source_parameters ( COLLADASW::SourceBase::ParameterNameList &  param,
COLLADASW::InputSemantic::Semantics  semantic,
bool  is_rot,
const char *  axis,
bool  transform 
) [protected]
float AnimationExporter::convert_angle ( float  angle) [protected]

Definition at line 508 of file AnimationExporter.cpp.

float AnimationExporter::convert_time ( float  frame) [protected]

Definition at line 503 of file AnimationExporter.cpp.

References FRA2TIME.

Referenced by create_source_from_vector(), and get_source_values().

std::string AnimationExporter::create_4x4_source ( std::vector< float > &  frames,
Object ob_arm,
Bone bone,
const std::string &  anim_id 
) [protected]
std::string AnimationExporter::create_interpolation_source ( FCurve fcu,
const std::string &  anim_id,
const char *  axis_name,
bool *  has_tangents 
) [protected]
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 
) [protected]
std::string AnimationExporter::create_source_from_fcurve ( COLLADASW::InputSemantic::Semantics  semantic,
FCurve fcu,
const std::string &  anim_id,
const char *  axis_name 
) [protected]
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 
) [protected]
std::string AnimationExporter::create_xyz_source ( float *  v,
int  tot,
const std::string &  anim_id 
) [protected]

Definition at line 793 of file AnimationExporter.cpp.

References add_source_parameters(), get_semantic_suffix(), i, NULL, and OUTPUT.

Referenced by dae_bone_animation().

void AnimationExporter::dae_animation ( Object ob,
FCurve fcu,
char *  transformName,
bool  is_param,
Material ma = NULL 
) [protected]
void AnimationExporter::dae_baked_animation ( std::vector< float > &  fra,
Object ob_arm,
Bone bone 
) [protected]
void AnimationExporter::dae_bone_animation ( std::vector< float > &  fra,
float *  v,
int  tm_type,
int  axis,
std::string  ob_name,
std::string  bone_name 
) [protected]
void AnimationExporter::enable_fcurves ( bAction act,
char *  bone_name 
) [protected]
void AnimationExporter::exportAnimations ( Scene sce)

Definition at line 41 of file AnimationExporter.cpp.

References forEachObjectInScene(), and hasAnimations().

Referenced by DocumentExporter::exportCurrentScene().

char * AnimationExporter::extract_transform_name ( char *  rna_path) [protected]
std::string AnimationExporter::fake_interpolation_source ( int  tot,
const std::string &  anim_id,
const char *  axis_name 
) [protected]

Definition at line 853 of file AnimationExporter.cpp.

References get_semantic_suffix(), and i.

Referenced by dae_baked_animation(), and dae_bone_animation().

void AnimationExporter::find_frames ( Object ob,
std::vector< float > &  fra,
const char *  prefix,
const char *  tm_name 
) [protected]
void AnimationExporter::find_frames ( Object ob,
std::vector< float > &  fra 
) [protected]
void AnimationExporter::find_rotation_frames ( Object ob,
std::vector< float > &  fra,
const char *  prefix,
int  rotmode 
) [protected]

Definition at line 1139 of file AnimationExporter.cpp.

References find_frames(), and ROT_MODE_QUAT.

Referenced by sample_and_write_bone_animation().

std::string AnimationExporter::get_camera_param_sid ( char *  rna_path,
int  tm_type,
const char *  axis_name,
bool  append_axis 
) [protected]

Definition at line 925 of file AnimationExporter.cpp.

References extract_transform_name(), and anim_index::name.

Referenced by dae_animation().

float * AnimationExporter::get_eul_source_for_quat ( Object ob) [protected]
std::string AnimationExporter::get_light_param_sid ( char *  rna_path,
int  tm_type,
const char *  axis_name,
bool  append_axis 
) [protected]

Definition at line 877 of file AnimationExporter.cpp.

References extract_transform_name(), and anim_index::name.

Referenced by dae_animation().

std::string AnimationExporter::get_semantic_suffix ( COLLADASW::InputSemantic::Semantics  semantic) [protected]
void AnimationExporter::get_source_values ( BezTriple bezt,
COLLADASW::InputSemantic::Semantics  semantic,
bool  rotation,
float *  values,
int *  length 
) [protected]
std::string AnimationExporter::get_transform_sid ( char *  rna_path,
int  tm_type,
const char *  axis_name,
bool  append_axis 
) [protected]

Definition at line 976 of file AnimationExporter.cpp.

References extract_transform_name(), and anim_index::name.

Referenced by dae_animation(), and dae_bone_animation().

std::string AnimationExporter::getObjectBoneName ( Object ob,
const FCurve fcu 
) [protected]

Definition at line 179 of file AnimationExporter.cpp.

References id_name(), NULL, and FCurve::rna_path.

Referenced by dae_animation(), and sample_and_write_bone_animation_matrix().

bool AnimationExporter::hasAnimations ( Scene sce) [protected]
bool AnimationExporter::is_bone_deform_group ( Bone bone) [protected]

Definition at line 347 of file AnimationExporter.cpp.

References BONE_NO_DEFORM, Bone::childbase, ListBase::first, and Bone::flag.

void AnimationExporter::operator() ( Object ob)
void AnimationExporter::sample_and_write_bone_animation ( Object ob_arm,
Bone bone,
int  transform_type 
) [protected]
void AnimationExporter::sample_and_write_bone_animation_matrix ( Object ob_arm,
Bone bone 
) [protected]
void AnimationExporter::sample_animation ( float *  v,
std::vector< float > &  frames,
int  type,
Bone bone,
Object ob_arm,
bPoseChannel pChan 
) [protected]
void AnimationExporter::sample_animation ( std::vector< float[4][4]> &  mats,
std::vector< float > &  frames,
Bone bone,
Object ob_arm,
bPoseChannel pChan 
) [protected]
void AnimationExporter::write_bone_animation ( Object ob_arm,
Bone bone 
) [protected]
void AnimationExporter::write_bone_animation_matrix ( Object ob_arm,
Bone bone 
) [protected]

The documentation for this class was generated from the following files: