|
Blender V4.5
|
#include <ArmatureImporter.h>
Inherits TransformReader.
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 joint_path_maxncpy) |
| bool | get_joint_bind_mat (float m[4][4], COLLADAFW::Node *joint) |
| void | set_tags_map (TagsMap &tags_map) |
Definition at line 40 of file ArmatureImporter.h.
| ArmatureImporter::ArmatureImporter | ( | UnitConverter * | conv, |
| MeshImporterBase * | mesh, | ||
| Main * | bmain, | ||
| Scene * | sce, | ||
| ViewLayer * | view_layer, | ||
| const ImportSettings * | import_settings ) |
Definition at line 38 of file ArmatureImporter.cpp.
References nullptr, and TransformReader::TransformReader().
| ArmatureImporter::~ArmatureImporter | ( | ) |
Definition at line 55 of file ArmatureImporter.cpp.
| void ArmatureImporter::add_root_joint | ( | COLLADAFW::Node * | node, |
| Object * | parent ) |
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 751 of file ArmatureImporter.cpp.
| Object * ArmatureImporter::get_armature_for_joint | ( | COLLADAFW::Node * | node | ) |
Definition at line 997 of file ArmatureImporter.cpp.
References SkinInfo::BKE_armature_from_object(), and SkinInfo::uses_joint_or_descendant().
| COLLADAFW::UniqueId * ArmatureImporter::get_geometry_uid | ( | const COLLADAFW::UniqueId & | controller_uid | ) |
Definition at line 988 of file ArmatureImporter.cpp.
Referenced by make_armatures().
| bool ArmatureImporter::get_joint_bind_mat | ( | float | m[4][4], |
| COLLADAFW::Node * | joint ) |
Gives a world-space mat.
Definition at line 1031 of file ArmatureImporter.cpp.
References SkinInfo::get_joint_inv_bind_matrix(), and invert_m4().
| void ArmatureImporter::get_rna_path_for_joint | ( | COLLADAFW::Node * | node, |
| char * | joint_path, | ||
| size_t | joint_path_maxncpy ) |
Definition at line 1022 of file ArmatureImporter.cpp.
References bc_get_joint_name(), BLI_snprintf(), BLI_str_escape(), and Bone::name.
Here we add bones to armatures, having armatures previously created in write_controller.
Definition at line 775 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, FLT_MAX, SkinInfo::free(), SkinInfo::get_controller_uid(), get_geometry_uid(), SkinInfo::get_parent(), and SkinInfo::link_armature().
| void ArmatureImporter::make_shape_keys | ( | bContext * | C | ) |
Definition at line 933 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, i, Mesh::id, Mesh::key, KEY_RELATIVE, ID::name, and Key::type.
| void ArmatureImporter::set_tags_map | ( | TagsMap & | tags_map | ) |
Definition at line 1017 of file ArmatureImporter.cpp.
| bool ArmatureImporter::write_controller | ( | const COLLADAFW::Controller * | controller | ) |
Definition at line 903 of file ArmatureImporter.cpp.
References controller.
| bool ArmatureImporter::write_skin_controller_data | ( | const COLLADAFW::SkinControllerData * | data | ) |
Definition at line 878 of file ArmatureImporter.cpp.
References SkinInfo::add_joint(), SkinInfo::borrow_skin_controller_data(), data, and i.