Hack fix for blenderloader.
The optimisation disabled would result in null TextureKeys. -> This would then result in textures being embedded into the j3o file, seriously bloating the assets. Signed-off-by: Kai Börnert <kai-boernert@visiongamestudios.de>
This commit is contained in:
parent
5b56f1e513
commit
9f32bcf7bb
@ -232,7 +232,7 @@ public class TextureHelper extends AbstractBlenderHelper {
|
||||
LOGGER.log(Level.FINE, "Fetching texture with OMA = {0}", imageStructure.getOldMemoryAddress());
|
||||
Texture result = null;
|
||||
Image im = (Image) blenderContext.getLoadedFeature(imageStructure.getOldMemoryAddress(), LoadedDataType.FEATURE);
|
||||
if (im == null) {
|
||||
// if (im == null) { HACK force reaload always, as constructor in else case is destroying the TextureKeys!
|
||||
if ("ID".equals(imageStructure.getType())) {
|
||||
LOGGER.fine("Loading texture from external blend file.");
|
||||
result = (Texture) this.loadLibrary(imageStructure);
|
||||
@ -253,9 +253,9 @@ public class TextureHelper extends AbstractBlenderHelper {
|
||||
result = new Texture2D(new ImageLoader().loadImage(blenderContext.getInputStream(), dataFileBlock.getBlockPosition(), true));
|
||||
}
|
||||
}
|
||||
} else {
|
||||
result = new Texture2D(im);
|
||||
}
|
||||
//} else {
|
||||
// result = new Texture2D(im);
|
||||
// }
|
||||
|
||||
if (result != null) {// render result is not being loaded
|
||||
blenderContext.addLoadedFeatures(imageStructure.getOldMemoryAddress(), LoadedDataType.STRUCTURE, imageStructure);
|
||||
|
Loading…
x
Reference in New Issue
Block a user