Changeset View
Changeset View
Standalone View
Standalone View
source/blender/io/collada/ControllerExporter.cpp
| Show First 20 Lines • Show All 400 Lines • ▼ Show 20 Lines | void ControllerExporter::add_bind_shape_mat(Object *ob) | ||||
| if (export_settings.get_apply_global_orientation()) { | if (export_settings.get_apply_global_orientation()) { | ||||
| /* do nothing, rotation is going to be applied to the Data */ | /* do nothing, rotation is going to be applied to the Data */ | ||||
| } | } | ||||
| else { | else { | ||||
| bc_add_global_transform(f_obmat, export_settings.get_global_transform()); | bc_add_global_transform(f_obmat, export_settings.get_global_transform()); | ||||
| } | } | ||||
| // UnitConverter::mat4_to_dae_double(bind_mat, ob->obmat); | // UnitConverter::mat4_to_dae_double(bind_mat, ob->object_to_world); | ||||
| UnitConverter::mat4_to_dae_double(bind_mat, f_obmat); | UnitConverter::mat4_to_dae_double(bind_mat, f_obmat); | ||||
| if (this->export_settings.get_limit_precision()) { | if (this->export_settings.get_limit_precision()) { | ||||
| BCMatrix::sanitize(bind_mat, LIMITTED_PRECISION); | BCMatrix::sanitize(bind_mat, LIMITTED_PRECISION); | ||||
| } | } | ||||
| addBindShapeTransform(bind_mat); | addBindShapeTransform(bind_mat); | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 100 Lines • ▼ Show 20 Lines | if (is_bone_defgroup(ob_arm, def)) { | ||||
| bc_decompose(bind_mat, loc, nullptr, nullptr, scale); | bc_decompose(bind_mat, loc, nullptr, nullptr, scale); | ||||
| /* Only translations, no rotation vs armature */ | /* Only translations, no rotation vs armature */ | ||||
| loc_eulO_size_to_mat4(bind_mat, loc, rot, scale, 6); | loc_eulO_size_to_mat4(bind_mat, loc, rot, scale, 6); | ||||
| } | } | ||||
| } | } | ||||
| /* make world-space matrix (bind_mat is armature-space) */ | /* make world-space matrix (bind_mat is armature-space) */ | ||||
| mul_m4_m4m4(world, ob_arm->obmat, bind_mat); | mul_m4_m4m4(world, ob_arm->object_to_world, bind_mat); | ||||
| if (!has_bindmat) { | if (!has_bindmat) { | ||||
| if (export_settings.get_apply_global_orientation()) { | if (export_settings.get_apply_global_orientation()) { | ||||
| bc_apply_global_transform(world, export_settings.get_global_transform()); | bc_apply_global_transform(world, export_settings.get_global_transform()); | ||||
| } | } | ||||
| } | } | ||||
| invert_m4_m4(mat, world); | invert_m4_m4(mat, world); | ||||
| ▲ Show 20 Lines • Show All 97 Lines • Show Last 20 Lines | |||||