Fixed transform constraints.

This commit is contained in:
NathanSweet 2016-02-18 05:15:18 +01:00
parent 7211cc3c7b
commit 3a7a4a642b

View File

@ -152,11 +152,11 @@ namespace Spine {
// Transform constraints. // Transform constraints.
if (root.ContainsKey("transform")) { if (root.ContainsKey("transform")) {
foreach (Dictionary<String, Object> transformMap in (List<Object>)root["ik"]) { foreach (Dictionary<String, Object> transformMap in (List<Object>)root["transform"]) {
TransformConstraintData transformConstraintData = new TransformConstraintData((String)transformMap["name"]); TransformConstraintData transformConstraintData = new TransformConstraintData((String)transformMap["name"]);
String boneName = (String)transformMap["bone"]; String boneName = (String)transformMap["bone"];
transformConstraintData.target = skeletonData.FindBone(boneName); transformConstraintData.bone = skeletonData.FindBone(boneName);
if (transformConstraintData.target == null) throw new Exception("Bone not found: " + boneName); if (transformConstraintData.target == null) throw new Exception("Bone not found: " + boneName);
String targetName = (String)transformMap["target"]; String targetName = (String)transformMap["target"];