[Bf-blender-cvs] [476f5c473a] master: Collada - remove no longer used functions (moved to collada_utils)

Gaia Clary noreply at git.blender.org
Thu Mar 23 15:03:30 CET 2017


Commit: 476f5c473ac752d58922e1fefbcbb5e8078d178d
Author: Gaia Clary
Date:   Thu Mar 23 14:09:00 2017 +0100
Branches: master
https://developer.blender.org/rB476f5c473ac752d58922e1fefbcbb5e8078d178d

Collada - remove no longer used functions (moved to collada_utils)

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

M	source/blender/collada/ControllerExporter.cpp

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

diff --git a/source/blender/collada/ControllerExporter.cpp b/source/blender/collada/ControllerExporter.cpp
index 62a474b518..5444c9dfa6 100644
--- a/source/blender/collada/ControllerExporter.cpp
+++ b/source/blender/collada/ControllerExporter.cpp
@@ -463,81 +463,6 @@ std::string ControllerExporter::add_joints_source(Object *ob_arm, ListBase *defb
 	return source_id;
 }
 
-static float get_property(Bone *bone, const char *key, float def)
-{
-	float result = def;
-	if (bone->prop) {
-		IDProperty *property = IDP_GetPropertyFromGroup(bone->prop, key);
-		if (property) {
-			switch (property->type) {
-				case IDP_INT:
-					result = (float)(IDP_Int(property));
-					break;
-				case IDP_FLOAT:
-					result = (float)(IDP_Float(property));
-					break;
-				case IDP_DOUBLE:
-					result = (float)(IDP_Double(property));
-					break;
-				default:
-					result = def;
-			}
-		}
-	}
-	return result;
-}
-
-/**
- * This function creates an arbitrary rest pose matrix from
- * data provided as custom properties. This is a workaround
- * for support of maya's restpose matrix which can be arbitrary
- * in opposition to Blender where the Rest pose Matrix is always
- * the Identity matrix.
- *
- * The custom properties are:
- *
- * restpose_scale_x
- * restpose_scale_y
- * restpose_scale_z
- *
- * restpose_rot_x
- * restpose_rot_y
- * restpose_rot_z
- *
- * restpose_loc_x
- * restpose_loc_y
- * restpose_loc_z
- *
- * The matrix is only setup if the scale AND the rot properties are defined.
- * The presence of the loc properties is optional.
- *
- * This feature has been implemented to support Second Life "Fitted Mesh"
- * TODO: Check if an arbitrary rest pose matrix makes sense within Blender.
- * Eventually leverage the custom property data into an "official" 
- * Edit_bone Property
- */
-static void create_restpose_mat(Bone *bone, float mat[4][4])
-{
-	float loc[3] = {
-		get_property(bone, "restpose_loc_x", 0.0),
-		get_property(bone, "restpose_loc_y", 0.0),
-		get_property(bone, "restpose_loc_z", 0.0)
-	};
-
-	float rot[3] = {
-		DEG2RADF(get_property(bone, "restpose_rot_x", 0.0)),
-		DEG2RADF(get_property(bone, "restpose_rot_y", 0.0)),
-		DEG2RADF(get_property(bone, "restpose_rot_z", 0.0))
-	};
-
-	float scale[3] = {
-		get_property(bone, "restpose_scale_x", 1.0),
-		get_property(bone, "restpose_scale_y", 1.0),
-		get_property(bone, "restpose_scale_z", 1.0)
-	};
-
-	loc_eulO_size_to_mat4(mat, loc, rot, scale, 6);
-}
 
 std::string ControllerExporter::add_inv_bind_mats_source(Object *ob_arm, ListBase *defbase, const std::string& controller_id)
 {




More information about the Bf-blender-cvs mailing list