diff options
author | Antonio Vazquez <blendergit@gmail.com> | 2022-11-07 18:09:54 +0300 |
---|---|---|
committer | Antonio Vazquez <blendergit@gmail.com> | 2022-11-07 18:09:54 +0300 |
commit | b6b888f7fb706487d9e5ae6b0738201da5493b9f (patch) | |
tree | 852f79b4532a1b93e75c2541ca0d181b00de08a2 /source/blender/io/collada | |
parent | a2377b60548f2fe5d46b14ecdf4cf83971432b5c (diff) | |
parent | 95631c94c4bd08f8a7e9c713f624e934eb7eb7ae (diff) |
Merge branch 'master' into gpencil-new-data-proposalgpencil-new-data-proposal
Diffstat (limited to 'source/blender/io/collada')
-rw-r--r-- | source/blender/io/collada/AnimationImporter.cpp | 6 | ||||
-rw-r--r-- | source/blender/io/collada/ArmatureImporter.cpp | 4 | ||||
-rw-r--r-- | source/blender/io/collada/ControllerExporter.cpp | 4 | ||||
-rw-r--r-- | source/blender/io/collada/DocumentImporter.cpp | 4 | ||||
-rw-r--r-- | source/blender/io/collada/MeshImporter.cpp | 2 | ||||
-rw-r--r-- | source/blender/io/collada/SkinInfo.cpp | 6 | ||||
-rw-r--r-- | source/blender/io/collada/collada_utils.cpp | 8 |
7 files changed, 17 insertions, 17 deletions
diff --git a/source/blender/io/collada/AnimationImporter.cpp b/source/blender/io/collada/AnimationImporter.cpp index 2d872377bbf..826d7864067 100644 --- a/source/blender/io/collada/AnimationImporter.cpp +++ b/source/blender/io/collada/AnimationImporter.cpp @@ -332,8 +332,8 @@ void AnimationImporter::read_node_transform(COLLADAFW::Node *node, Object *ob) float mat[4][4]; TransformReader::get_node_mat(mat, node, &uid_animated_map, ob); if (ob) { - copy_m4_m4(ob->obmat, mat); - BKE_object_apply_mat4(ob, ob->obmat, false, false); + copy_m4_m4(ob->object_to_world, mat); + BKE_object_apply_mat4(ob, ob->object_to_world, false, false); } } @@ -2097,7 +2097,7 @@ Object *AnimationImporter::get_joint_object(COLLADAFW::Node *root, if (par_job) { float temp[4][4], ipar[4][4]; - invert_m4_m4(ipar, par_job->obmat); + invert_m4_m4(ipar, par_job->object_to_world); copy_m4_m4(temp, mat); mul_m4_m4m4(mat, ipar, temp); } diff --git a/source/blender/io/collada/ArmatureImporter.cpp b/source/blender/io/collada/ArmatureImporter.cpp index 1310337f501..7de08f89b7d 100644 --- a/source/blender/io/collada/ArmatureImporter.cpp +++ b/source/blender/io/collada/ArmatureImporter.cpp @@ -114,7 +114,7 @@ int ArmatureImporter::create_bone(SkinInfo *skin, Object *ob_arm = skin->BKE_armature_from_object(); if (ob_arm) { float invmat[4][4]; - invert_m4_m4(invmat, ob_arm->obmat); + invert_m4_m4(invmat, ob_arm->object_to_world); mul_m4_m4m4(mat, invmat, mat); } @@ -708,7 +708,7 @@ void ArmatureImporter::set_pose(Object *ob_arm, copy_m4_m4(mat, obmat); float invObmat[4][4]; - invert_m4_m4(invObmat, ob_arm->obmat); + invert_m4_m4(invObmat, ob_arm->object_to_world); mul_m4_m4m4(pchan->pose_mat, invObmat, mat); } diff --git a/source/blender/io/collada/ControllerExporter.cpp b/source/blender/io/collada/ControllerExporter.cpp index 6bf8d904a41..62bcdc5bf4c 100644 --- a/source/blender/io/collada/ControllerExporter.cpp +++ b/source/blender/io/collada/ControllerExporter.cpp @@ -406,7 +406,7 @@ void ControllerExporter::add_bind_shape_mat(Object *ob) 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); if (this->export_settings.get_limit_precision()) { BCMatrix::sanitize(bind_mat, LIMITTED_PRECISION); @@ -523,7 +523,7 @@ std::string ControllerExporter::add_inv_bind_mats_source(Object *ob_arm, } /* 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 (export_settings.get_apply_global_orientation()) { diff --git a/source/blender/io/collada/DocumentImporter.cpp b/source/blender/io/collada/DocumentImporter.cpp index 5e432682564..dae1c4ba894 100644 --- a/source/blender/io/collada/DocumentImporter.cpp +++ b/source/blender/io/collada/DocumentImporter.cpp @@ -412,8 +412,8 @@ Object *DocumentImporter::create_instance_node(Object *source_ob, } } /* calc new matrix and apply */ - mul_m4_m4m4(obn->obmat, obn->obmat, mat); - BKE_object_apply_mat4(obn, obn->obmat, false, false); + mul_m4_m4m4(obn->object_to_world, obn->object_to_world, mat); + BKE_object_apply_mat4(obn, obn->object_to_world, false, false); } } else { diff --git a/source/blender/io/collada/MeshImporter.cpp b/source/blender/io/collada/MeshImporter.cpp index 6d7593afb8b..1a28adf50a5 100644 --- a/source/blender/io/collada/MeshImporter.cpp +++ b/source/blender/io/collada/MeshImporter.cpp @@ -564,7 +564,7 @@ void MeshImporter::mesh_add_edges(Mesh *mesh, int len) /* set default flags */ medge = &edges[mesh->totedge]; for (int i = 0; i < len; i++, medge++) { - medge->flag = ME_EDGEDRAW | ME_EDGERENDER; + medge->flag = ME_EDGEDRAW; } mesh->totedge = totedge; diff --git a/source/blender/io/collada/SkinInfo.cpp b/source/blender/io/collada/SkinInfo.cpp index 0654bae3730..b4615635318 100644 --- a/source/blender/io/collada/SkinInfo.cpp +++ b/source/blender/io/collada/SkinInfo.cpp @@ -214,12 +214,12 @@ void SkinInfo::link_armature(bContext *C, ob->partype = PAROBJECT; BKE_object_workob_calc_parent(scene, ob, &workob); - invert_m4_m4(ob->parentinv, workob.obmat); + invert_m4_m4(ob->parentinv, workob.object_to_world); DEG_id_tag_update(&obn->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY); #endif - copy_m4_m4(ob->obmat, bind_shape_matrix); - BKE_object_apply_mat4(ob, ob->obmat, false, false); + copy_m4_m4(ob->object_to_world, bind_shape_matrix); + BKE_object_apply_mat4(ob, ob->object_to_world, false, false); amd->deformflag = ARM_DEF_VGROUP; diff --git a/source/blender/io/collada/collada_utils.cpp b/source/blender/io/collada/collada_utils.cpp index 22a73cd7db2..96ff78a715a 100644 --- a/source/blender/io/collada/collada_utils.cpp +++ b/source/blender/io/collada/collada_utils.cpp @@ -129,7 +129,7 @@ bool bc_set_parent(Object *ob, Object *par, bContext *C, bool is_parent_space) const bool keep_transform = false; if (par && is_parent_space) { - mul_m4_m4m4(ob->obmat, par->obmat, ob->obmat); + mul_m4_m4m4(ob->object_to_world, par->object_to_world, ob->object_to_world); } bool ok = ED_object_parent_set( @@ -348,10 +348,10 @@ std::string bc_replace_string(std::string data, void bc_match_scale(Object *ob, UnitConverter &bc_unit, bool scale_to_scene) { if (scale_to_scene) { - mul_m4_m4m4(ob->obmat, bc_unit.get_scale(), ob->obmat); + mul_m4_m4m4(ob->object_to_world, bc_unit.get_scale(), ob->object_to_world); } - mul_m4_m4m4(ob->obmat, bc_unit.get_rotation(), ob->obmat); - BKE_object_apply_mat4(ob, ob->obmat, false, false); + mul_m4_m4m4(ob->object_to_world, bc_unit.get_rotation(), ob->object_to_world); + BKE_object_apply_mat4(ob, ob->object_to_world, false, false); } void bc_match_scale(std::vector<Object *> *objects_done, |