mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-12-04 00:01:19 -07:00
Merge branch '4.9' of github.com:Ultimaker/Cura
This commit is contained in:
commit
8e106b2f5b
9 changed files with 43 additions and 39 deletions
|
|
@ -157,22 +157,22 @@ class AMFReader(MeshReader):
|
|||
tri_faces = tri_node.faces
|
||||
tri_vertices = tri_node.vertices
|
||||
|
||||
indices = []
|
||||
vertices = []
|
||||
indices_list = []
|
||||
vertices_list = []
|
||||
|
||||
index_count = 0
|
||||
face_count = 0
|
||||
for tri_face in tri_faces:
|
||||
face = []
|
||||
for tri_index in tri_face:
|
||||
vertices.append(tri_vertices[tri_index])
|
||||
vertices_list.append(tri_vertices[tri_index])
|
||||
face.append(index_count)
|
||||
index_count += 1
|
||||
indices.append(face)
|
||||
indices_list.append(face)
|
||||
face_count += 1
|
||||
|
||||
vertices = numpy.asarray(vertices, dtype = numpy.float32)
|
||||
indices = numpy.asarray(indices, dtype = numpy.int32)
|
||||
vertices = numpy.asarray(vertices_list, dtype = numpy.float32)
|
||||
indices = numpy.asarray(indices_list, dtype = numpy.int32)
|
||||
normals = calculateNormalsFromIndexedVertices(vertices, indices, face_count)
|
||||
|
||||
mesh_data = MeshData(vertices = vertices, indices = indices, normals = normals,file_name = file_name)
|
||||
|
|
|
|||
|
|
@ -3,7 +3,9 @@
|
|||
|
||||
import QtQuick 2.2
|
||||
import QtQuick.Controls 1.1
|
||||
import QtQuick.Controls 2.15 as QQC2
|
||||
import QtQuick.Controls.Styles 1.1
|
||||
import QtQml.Models 2.15 as Models
|
||||
import QtQuick.Layouts 1.1
|
||||
import QtQuick.Dialogs 1.1
|
||||
import QtQuick.Window 2.2
|
||||
|
|
@ -235,7 +237,7 @@ UM.Dialog
|
|||
anchors.leftMargin: base.textMargin
|
||||
anchors.top: activeScriptsList.bottom
|
||||
anchors.topMargin: base.textMargin
|
||||
menu: scriptsMenu
|
||||
onClicked: scriptsMenu.open()
|
||||
style: ButtonStyle
|
||||
{
|
||||
label: Label
|
||||
|
|
@ -244,15 +246,16 @@ UM.Dialog
|
|||
}
|
||||
}
|
||||
}
|
||||
Menu
|
||||
QQC2.Menu
|
||||
{
|
||||
id: scriptsMenu
|
||||
width: parent.width
|
||||
|
||||
Instantiator
|
||||
Models.Instantiator
|
||||
{
|
||||
model: manager.loadedScriptList
|
||||
|
||||
MenuItem
|
||||
QQC2.MenuItem
|
||||
{
|
||||
text: manager.getScriptLabelByKey(modelData.toString())
|
||||
onTriggered: manager.addScriptToList(modelData.toString())
|
||||
|
|
@ -422,7 +425,7 @@ UM.Dialog
|
|||
tooltip.target.x = position.x + 1
|
||||
}
|
||||
|
||||
onHideTooltip: tooltip.hide()
|
||||
function onHideTooltip() { tooltip.hide() }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -145,22 +145,22 @@ class TrimeshReader(MeshReader):
|
|||
tri_faces = tri_node.faces
|
||||
tri_vertices = tri_node.vertices
|
||||
|
||||
indices = []
|
||||
vertices = []
|
||||
indices_list = []
|
||||
vertices_list = []
|
||||
|
||||
index_count = 0
|
||||
face_count = 0
|
||||
for tri_face in tri_faces:
|
||||
face = []
|
||||
for tri_index in tri_face:
|
||||
vertices.append(tri_vertices[tri_index])
|
||||
vertices_list.append(tri_vertices[tri_index])
|
||||
face.append(index_count)
|
||||
index_count += 1
|
||||
indices.append(face)
|
||||
indices_list.append(face)
|
||||
face_count += 1
|
||||
|
||||
vertices = numpy.asarray(vertices, dtype = numpy.float32)
|
||||
indices = numpy.asarray(indices, dtype = numpy.int32)
|
||||
vertices = numpy.asarray(vertices_list, dtype = numpy.float32)
|
||||
indices = numpy.asarray(indices_list, dtype = numpy.int32)
|
||||
normals = calculateNormalsFromIndexedVertices(vertices, indices, face_count)
|
||||
|
||||
mesh_data = MeshData(vertices = vertices, indices = indices, normals = normals, file_name = file_name)
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ class VersionUpgrade48to49(VersionUpgrade):
|
|||
# Update visibility settings to include new top_bottom category
|
||||
parser["general"]["visible_settings"] += ";top_bottom"
|
||||
|
||||
if any([setting in parser["cura"]["categories_expanded"] for setting in self._moved_visibility_settings]):
|
||||
if "categories_expanded" in parser["cura"] and any([setting in parser["cura"]["categories_expanded"] for setting in self._moved_visibility_settings]):
|
||||
parser["cura"]["categories_expanded"] += ";top_bottom"
|
||||
|
||||
result = io.StringIO()
|
||||
|
|
@ -102,7 +102,7 @@ class VersionUpgrade48to49(VersionUpgrade):
|
|||
if "shell" in parser:
|
||||
for setting in parser["shell"]:
|
||||
if setting in self._moved_visibility_settings:
|
||||
parser["top_bottom"][setting] = None
|
||||
parser["top_bottom"][setting] = None # type: ignore
|
||||
del parser["shell"][setting]
|
||||
|
||||
result = io.StringIO()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue