Merge branch 'master' of github.com:Ultimaker/Cura into CURA-6979

This commit is contained in:
Dimitriovski 2019-12-17 16:17:43 +01:00
commit 1595c3aef9
No known key found for this signature in database
GPG key ID: 4E62757E2B0D304D
114 changed files with 1589 additions and 296 deletions

View file

@ -5,7 +5,7 @@ import numpy
import math
from PyQt5.QtGui import QImage, qRed, qGreen, qBlue
from PyQt5.QtGui import QImage, qRed, qGreen, qBlue, qAlpha
from PyQt5.QtCore import Qt
from UM.Mesh.MeshReader import MeshReader
@ -138,6 +138,11 @@ class ImageReader(MeshReader):
height_data *= scale_vector.y
height_data += base_height
if img.hasAlphaChannel():
for x in range(0, width):
for y in range(0, height):
height_data[y, x] *= qAlpha(img.pixel(x, y)) / 255.0
heightmap_face_count = 2 * height_minus_one * width_minus_one
total_face_count = heightmap_face_count + (width_minus_one * 2) * (height_minus_one * 2) + 2

View file

@ -123,7 +123,9 @@ class ZeroConfClient:
# Request more data if info is not complete
if not info.address:
info = zero_conf.get_service_info(service_type, name)
new_info = zero_conf.get_service_info(service_type, name)
if new_info is not None:
info = new_info
if info and info.address:
type_of_device = info.properties.get(b"type", None)