Blender
V3.3
|
#include <ArmatureImporter.h>
Public Member Functions | |
ArmatureImporter (UnitConverter *conv, MeshImporterBase *mesh, Main *bmain, Scene *sce, ViewLayer *view_layer, const ImportSettings *import_settings) | |
~ArmatureImporter () | |
void | add_root_joint (COLLADAFW::Node *node, Object *parent) |
void | make_armatures (bContext *C, std::vector< Object * > &objects_to_scale) |
void | make_shape_keys (bContext *C) |
bool | write_skin_controller_data (const COLLADAFW::SkinControllerData *data) |
bool | write_controller (const COLLADAFW::Controller *controller) |
COLLADAFW::UniqueId * | get_geometry_uid (const COLLADAFW::UniqueId &controller_uid) |
Object * | get_armature_for_joint (COLLADAFW::Node *node) |
void | get_rna_path_for_joint (COLLADAFW::Node *node, char *joint_path, size_t count) |
bool | get_joint_bind_mat (float m[4][4], COLLADAFW::Node *joint) |
void | set_tags_map (TagsMap &tags_map) |
Definition at line 39 of file ArmatureImporter.h.
ArmatureImporter::ArmatureImporter | ( | UnitConverter * | conv, |
MeshImporterBase * | mesh, | ||
Main * | bmain, | ||
Scene * | sce, | ||
ViewLayer * | view_layer, | ||
const ImportSettings * | import_settings | ||
) |
Definition at line 33 of file ArmatureImporter.cpp.
ArmatureImporter::~ArmatureImporter | ( | ) |
Definition at line 50 of file ArmatureImporter.cpp.
root - if this joint is the top joint in hierarchy, if a joint is a child of a node (not joint), root should be true since this is where we build armature bones from
Definition at line 740 of file ArmatureImporter.cpp.
References node.
Referenced by DocumentImporter::write_node().
Object * ArmatureImporter::get_armature_for_joint | ( | COLLADAFW::Node * | node | ) |
Definition at line 985 of file ArmatureImporter.cpp.
References SkinInfo::BKE_armature_from_object(), node, and SkinInfo::uses_joint_or_descendant().
Referenced by AnimationImporter::translate_animation_OLD(), and AnimationImporter::translate_Animations().
COLLADAFW::UniqueId * ArmatureImporter::get_geometry_uid | ( | const COLLADAFW::UniqueId & | controller_uid | ) |
Definition at line 976 of file ArmatureImporter.cpp.
Referenced by MeshImporter::create_mesh_object(), and make_armatures().
Gives a world-space mat.
Definition at line 1019 of file ArmatureImporter.cpp.
References SkinInfo::get_joint_inv_bind_matrix(), and invert_m4().
Referenced by AnimationImporter::calc_joint_parent_mat_rest(), and AnimationImporter::get_joint_rest_mat().
void ArmatureImporter::get_rna_path_for_joint | ( | COLLADAFW::Node * | node, |
char * | joint_path, | ||
size_t | count | ||
) |
Definition at line 1010 of file ArmatureImporter.cpp.
References bc_get_joint_name(), BLI_snprintf(), BLI_str_escape(), count, and node.
Referenced by AnimationImporter::add_bone_animation_sampled(), AnimationImporter::apply_matrix_curves(), AnimationImporter::translate_animation_OLD(), and AnimationImporter::translate_Animations().
void ArmatureImporter::make_armatures | ( | bContext * | C, |
std::vector< Object * > & | objects_to_scale | ||
) |
Here we add bones to armatures, having armatures previously created in write_controller.
Definition at line 764 of file ArmatureImporter.cpp.
References bc_set_parent(), SkinInfo::BKE_armature_from_object(), bArmature::bonebase, C, CTX_data_main(), Object::data, ED_armature_edit_free(), ED_armature_from_edit(), ED_armature_to_edit(), ListBase::first, SkinInfo::free(), SkinInfo::get_controller_uid(), get_geometry_uid(), MeshImporterBase::get_object_by_geom_uid(), SkinInfo::get_parent(), and SkinInfo::link_armature().
Referenced by DocumentImporter::finish().
Definition at line 921 of file ArmatureImporter.cpp.
References BKE_key_add(), BKE_keyblock_add_ctime(), BKE_keyblock_convert_from_mesh(), C, CTX_data_main(), KeyBlock::curval, Object::data, MeshImporterBase::get_geometry_name(), MeshImporterBase::get_mesh_by_geom_uid(), MeshImporterBase::get_object_by_geom_uid(), Mesh::id, Mesh::key, KEY_RELATIVE, ID::name, and Key::type.
Referenced by DocumentImporter::finish().
void ArmatureImporter::set_tags_map | ( | TagsMap & | tags_map | ) |
Definition at line 1005 of file ArmatureImporter.cpp.
Referenced by DocumentImporter::finish().
bool ArmatureImporter::write_controller | ( | const COLLADAFW::Controller * | controller | ) |
Definition at line 891 of file ArmatureImporter.cpp.
References controller.
Referenced by DocumentImporter::writeController().
bool ArmatureImporter::write_skin_controller_data | ( | const COLLADAFW::SkinControllerData * | data | ) |
Definition at line 866 of file ArmatureImporter.cpp.
References SkinInfo::add_joint(), SkinInfo::borrow_skin_controller_data(), and data.
Referenced by DocumentImporter::writeSkinControllerData().