public static TextureData takeFacadeTextureData(BuildingModel buildingModel, BuildingPart bp, Wall w, WallPart wp, BuildingElementsTextureManager tm, boolean colorable) { String mt = null; if (wp != null && wp.getFacadeMaterialType() != null) { mt = wp.getFacadeMaterialType(); } else if (w.getFacadeMaterialType() != null) { mt = w.getFacadeMaterialType(); } else if (bp.getFacadeMaterialType() != null) { mt = bp.getFacadeMaterialType(); } else if (buildingModel.getFacadeMaterialType() != null) { mt = buildingModel.getFacadeMaterialType(); } TextureData td = tm.findTexture(new TextureFindCriteria(Type.FACADE, mt, null, null, null, colorable)); if (td == null) { td = new TextureData(null, 1, 1); } return td; }