Bugfix: layers to be loaded are taken from the value set bu user in BlenderKey and not the value loaded from the blender file.
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@9853 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
This commit is contained in:
parent
a0ec19ee48
commit
a5e9159149
@ -209,21 +209,11 @@ public class BlenderLoader extends AbstractBlenderLoader {
|
||||
blenderContext.putHelper(ParticlesHelper.class, new ParticlesHelper(inputStream.getVersionNumber(), blenderKey.isFixUpAxis()));
|
||||
|
||||
// reading the blocks (dna block is automatically saved in the blender context when found)
|
||||
FileBlockHeader sceneFileBlock = null;
|
||||
do {
|
||||
fileBlock = new FileBlockHeader(inputStream, blenderContext);
|
||||
if (!fileBlock.isDnaBlock()) {
|
||||
blocks.add(fileBlock);
|
||||
// save the scene's file block
|
||||
if (fileBlock.getCode() == FileBlockHeader.BLOCK_SC00 && blenderKey.getLayersToLoad() < 0) {
|
||||
sceneFileBlock = fileBlock;
|
||||
}
|
||||
}
|
||||
} while (!fileBlock.isLastBlock());
|
||||
// VERIFY LAYERS TO BE LOADED BEFORE LOADING FEATURES
|
||||
if (sceneFileBlock != null) {
|
||||
int lay = ((Number) sceneFileBlock.getStructure(blenderContext).getFieldValue("lay")).intValue();
|
||||
blenderContext.getBlenderKey().setLayersToLoad(lay);// load only current layer
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user