MPO: refresh MPOs on Spatial.deepClone()

cleanup_build_scripts
Kirill Vainer 9 years ago
parent 52487041b4
commit acda6e371c
  1. 7
      jme3-core/src/main/java/com/jme3/scene/Node.java
  2. 10
      jme3-core/src/main/java/com/jme3/scene/Spatial.java

@ -251,15 +251,14 @@ public class Node extends Spatial {
if ((refreshFlags & RF_LIGHTLIST) != 0){
updateWorldLightList();
}
if ((refreshFlags & RF_MATPARAM_OVERRIDE) != 0) {
updateMatParamOverrides();
}
if ((refreshFlags & RF_TRANSFORM) != 0){
// combine with parent transforms- same for all spatial
// subclasses.
updateWorldTransforms();
}
if ((refreshFlags & RF_MATPARAM_OVERRIDE) != 0) {
updateMatParamOverrides();
}
refreshFlags &= ~RF_CHILD_LIGHTLIST;
if (!children.isEmpty()) {

@ -207,9 +207,8 @@ public abstract class Spatial implements Savable, Cloneable, Collidable, Cloneab
localLights = new LightList(this);
worldLights = new LightList(this);
localOverrides = new ArrayList<MatParamOverride>();
worldOverrides = new ArrayList<MatParamOverride>();
localOverrides = new ArrayList<>();
worldOverrides = new ArrayList<>();
refreshFlags |= RF_BOUND;
}
@ -1469,6 +1468,7 @@ public abstract class Spatial implements Savable, Cloneable, Collidable, Cloneab
// the transforms and stuff get refreshed.
clone.setTransformRefresh();
clone.setLightListRefresh();
clone.setMatParamOverrideRefresh();
return clone;
}
@ -1624,9 +1624,9 @@ public abstract class Spatial implements Savable, Cloneable, Collidable, Cloneab
localOverrides = ic.readSavableArrayList("overrides", null);
if (localOverrides == null) {
localOverrides = new ArrayList<MatParamOverride>();
localOverrides = new ArrayList<>();
}
worldOverrides = new ArrayList<MatParamOverride>();
worldOverrides = new ArrayList<>();
//changed for backward compatibility with j3o files generated before the AnimControl/SkeletonControl split
//the AnimControl creates the SkeletonControl for old files and add it to the spatial.

Loading…
Cancel
Save