From 4a4f9755c8fd278fb8c7049fc9766595125f3c99 Mon Sep 17 00:00:00 2001 From: Andrzej Kapolka Date: Tue, 22 Aug 2006 22:20:47 +0000 Subject: [PATCH] Exclude animation transform targets when locking immobile models. git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@28 ed5b42cb-e716-0410-a449-f6a68f950b19 --- src/java/com/threerings/jme/model/Model.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/java/com/threerings/jme/model/Model.java b/src/java/com/threerings/jme/model/Model.java index 9b256870..54e1fc44 100644 --- a/src/java/com/threerings/jme/model/Model.java +++ b/src/java/com/threerings/jme/model/Model.java @@ -37,6 +37,7 @@ import java.nio.MappedByteBuffer; import java.nio.channels.FileChannel; import java.util.ArrayList; +import java.util.Collections; import java.util.HashMap; import java.util.HashSet; import java.util.Properties; @@ -738,8 +739,12 @@ public class Model extends ModelNode */ public void lockInstance () { - // collect the controller targets and lock recursively + // collect the instance's animation and controller targets and lock + // recursively HashSet targets = new HashSet(); + for (String aname : getAnimationNames()) { + Collections.addAll(targets, getAnimation(aname).transformTargets); + } for (Object ctrl : getControllers()) { if (ctrl instanceof ModelController) { targets.add(((ModelController)ctrl).getTarget());