Disabling loading all assets by default. Now unlinked assets or those being on inactive layers will not be loaded if they are not requested to.

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@8042 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
3.0
Kae..pl 13 years ago
parent b3a37f93b7
commit daa86cfec7
  1. 1525
      engine/src/blender/com/jme3/asset/BlenderKey.java
  2. 4
      engine/src/blender/com/jme3/scene/plugins/blender/BlenderLoader.java

File diff suppressed because it is too large Load Diff

@ -153,7 +153,7 @@ public class BlenderLoader implements AssetLoader {
}
break;
case FileBlockHeader.BLOCK_MA00://Material
if ((blenderKey.getFeaturesToLoad() & FeaturesToLoad.MATERIALS) != 0) {
if (blenderKey.isLoadUnlinkedAssets() && (blenderKey.getFeaturesToLoad() & FeaturesToLoad.MATERIALS) != 0) {
loadingResults.addMaterial(converter.toMaterial(block.getStructure(dataRepository)));
}
break;
@ -163,7 +163,7 @@ public class BlenderLoader implements AssetLoader {
}
break;
case FileBlockHeader.BLOCK_WO00://World
if (worldData == null) {//onlu one world data is used
if (blenderKey.isLoadUnlinkedAssets() && worldData == null) {//onlu one world data is used
Structure worldStructure = block.getStructure(dataRepository);
String worldName = worldStructure.getName();
if (blenderKey.getUsedWorld() == null || blenderKey.getUsedWorld().equals(worldName)) {

Loading…
Cancel
Save