[Bf-blender-cvs] [4877c9362a] master: Collada simplify: avoid duplicate negation in boolean

Gaia Clary noreply at git.blender.org
Tue Mar 14 19:31:51 CET 2017


Commit: 4877c9362aae969a74744dcb4038e088cd56b65f
Author: Gaia Clary
Date:   Tue Mar 14 15:07:31 2017 +0100
Branches: master
https://developer.blender.org/rB4877c9362aae969a74744dcb4038e088cd56b65f

Collada simplify: avoid duplicate negation in boolean

===================================================================

M	source/blender/collada/ArmatureImporter.cpp

===================================================================

diff --git a/source/blender/collada/ArmatureImporter.cpp b/source/blender/collada/ArmatureImporter.cpp
index 17334ca326..f4ce399277 100644
--- a/source/blender/collada/ArmatureImporter.cpp
+++ b/source/blender/collada/ArmatureImporter.cpp
@@ -106,7 +106,7 @@ int ArmatureImporter::create_bone(SkinInfo *skin, COLLADAFW::Node *node, EditBon
 	*/
 
 	std::map<COLLADAFW::UniqueId, SkinInfo>::iterator skin_it;
-	bool bone_is_not_skinned = true;
+	bool bone_is_skinned = false;
 	for (skin_it = skin_by_data_uid.begin(); skin_it != skin_by_data_uid.end(); skin_it++) {
 
 		SkinInfo *b = &skin_it->second;
@@ -123,13 +123,13 @@ int ArmatureImporter::create_bone(SkinInfo *skin, COLLADAFW::Node *node, EditBon
 				mul_m4_m4m4(mat, invmat, mat);
 			}
 
-			bone_is_not_skinned = false;
+			bone_is_skinned = true;
 			break;
 		}
 	}
 
 	// create a bone even if there's no joint data for it (i.e. it has no influence)
-	if (bone_is_not_skinned) {
+	if (!bone_is_skinned) {
 		float obmat[4][4];
 		// bone-space
 		get_node_mat(obmat, node, NULL, NULL);
@@ -141,6 +141,7 @@ int ArmatureImporter::create_bone(SkinInfo *skin, COLLADAFW::Node *node, EditBon
 		else {
 			copy_m4_m4(mat, obmat);
 		}
+
 	}
 
 	if (parent) bone->parent = parent;




More information about the Bf-blender-cvs mailing list