mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-08 07:27:29 -06:00
Added a bunch more yielding, which should decrease the stutter in GUI
contributes to CURA-2687
This commit is contained in:
parent
a969b45372
commit
c35b606807
1 changed files with 9 additions and 1 deletions
|
@ -164,7 +164,12 @@ class StartSliceJob(Job):
|
||||||
indices = mesh_data.getIndices()
|
indices = mesh_data.getIndices()
|
||||||
if indices is not None:
|
if indices is not None:
|
||||||
#TODO: This is a very slow way of doing it! It also locks up the GUI.
|
#TODO: This is a very slow way of doing it! It also locks up the GUI.
|
||||||
verts = numpy.array([verts[vert_index] for face in indices for vert_index in face])
|
flat_vert_list = []
|
||||||
|
for face in indices:
|
||||||
|
for vert_index in face:
|
||||||
|
flat_vert_list.append(verts[vert_index])
|
||||||
|
Job.yieldThread()
|
||||||
|
verts = numpy.array(flat_vert_list)
|
||||||
else:
|
else:
|
||||||
verts = numpy.array(verts)
|
verts = numpy.array(verts)
|
||||||
|
|
||||||
|
@ -238,6 +243,7 @@ class StartSliceJob(Job):
|
||||||
else:
|
else:
|
||||||
# Normal case
|
# Normal case
|
||||||
settings[key] = stack.getProperty(key, "value")
|
settings[key] = stack.getProperty(key, "value")
|
||||||
|
Job.yieldThread()
|
||||||
|
|
||||||
start_gcode = settings["machine_start_gcode"]
|
start_gcode = settings["machine_start_gcode"]
|
||||||
settings["material_bed_temp_prepend"] = "{material_bed_temperature}" not in start_gcode #Pre-compute material material_bed_temp_prepend and material_print_temp_prepend
|
settings["material_bed_temp_prepend"] = "{material_bed_temperature}" not in start_gcode #Pre-compute material material_bed_temp_prepend and material_print_temp_prepend
|
||||||
|
@ -250,6 +256,7 @@ class StartSliceJob(Job):
|
||||||
setting_message.value = self._expandGcodeTokens(key, value, settings)
|
setting_message.value = self._expandGcodeTokens(key, value, settings)
|
||||||
else:
|
else:
|
||||||
setting_message.value = str(value).encode("utf-8")
|
setting_message.value = str(value).encode("utf-8")
|
||||||
|
Job.yieldThread()
|
||||||
|
|
||||||
## Sends for some settings which extruder they should fallback to if not
|
## Sends for some settings which extruder they should fallback to if not
|
||||||
# set.
|
# set.
|
||||||
|
@ -266,6 +273,7 @@ class StartSliceJob(Job):
|
||||||
setting_extruder = self._slice_message.addRepeatedMessage("limit_to_extruder")
|
setting_extruder = self._slice_message.addRepeatedMessage("limit_to_extruder")
|
||||||
setting_extruder.name = key
|
setting_extruder.name = key
|
||||||
setting_extruder.extruder = extruder
|
setting_extruder.extruder = extruder
|
||||||
|
Job.yieldThread()
|
||||||
|
|
||||||
## Check if a node has per object settings and ensure that they are set correctly in the message
|
## Check if a node has per object settings and ensure that they are set correctly in the message
|
||||||
# \param node \type{SceneNode} Node to check.
|
# \param node \type{SceneNode} Node to check.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue