Ignoring textures that are defined but disabled in material.

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7944 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
3.0
Kae..pl 14 years ago
parent 733195c33c
commit fbd1cb837b
  1. 3
      engine/src/blender/com/jme3/scene/plugins/blender/helpers/v249/MaterialHelper.java

@ -236,9 +236,10 @@ public class MaterialHelper extends AbstractBlenderHelper {
if ((dataRepository.getBlenderKey().getFeaturesToLoad() & FeaturesToLoad.TEXTURES) != 0) { if ((dataRepository.getBlenderKey().getFeaturesToLoad() & FeaturesToLoad.TEXTURES) != 0) {
TextureHelper textureHelper = dataRepository.getHelper(TextureHelper.class); TextureHelper textureHelper = dataRepository.getHelper(TextureHelper.class);
DynamicArray<Pointer> mtexs = (DynamicArray<Pointer>) structure.getFieldValue("mtex"); DynamicArray<Pointer> mtexs = (DynamicArray<Pointer>) structure.getFieldValue("mtex");
int separatedTextures = ((Number)structure.getFieldValue("septex")).intValue();
for (int i = 0; i < mtexs.getTotalSize(); ++i) { for (int i = 0; i < mtexs.getTotalSize(); ++i) {
Pointer p = mtexs.get(i); Pointer p = mtexs.get(i);
if (p.isNotNull()) { if (p.isNotNull() && (separatedTextures & (1 << i)) == 0) {
List<Structure> mtex = p.fetchData(dataRepository.getInputStream()); List<Structure> mtex = p.fetchData(dataRepository.getInputStream());
if (mtex.size() == 1) { if (mtex.size() == 1) {
Structure textureLink = mtex.get(0); Structure textureLink = mtex.get(0);

Loading…
Cancel
Save