mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-08 14:34:01 -06:00
Merge branch 'master' of github.com:Ultimaker/Cura into CURA-6979
This commit is contained in:
commit
1595c3aef9
114 changed files with 1589 additions and 296 deletions
|
@ -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
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue