mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-14 10:17:52 -06:00
CURA-4284 some code cleanup while debugging
This commit is contained in:
parent
b0916e4b67
commit
d802c0bd26
1 changed files with 9 additions and 4 deletions
|
@ -319,11 +319,13 @@ class StartSliceJob(Job):
|
|||
# \param message object_lists message to put the per object settings in
|
||||
def _handlePerObjectSettings(self, node, message):
|
||||
stack = node.callDecoration("getStack")
|
||||
if not stack: # Check if the node has a stack attached to it and the stack has any settings in the top container.
|
||||
|
||||
# Check if the node has a stack attached to it and the stack has any settings in the top container.
|
||||
if not stack:
|
||||
return
|
||||
|
||||
# Check all settings for relations, so we can also calculate the correct values for dependent settings.
|
||||
top_of_stack = stack.getTop() #Cache for efficiency.
|
||||
top_of_stack = stack.getTop() # Cache for efficiency.
|
||||
changed_setting_keys = set(top_of_stack.getAllKeys())
|
||||
for key in top_of_stack.getAllKeys():
|
||||
instance = top_of_stack.getInstance(key)
|
||||
|
@ -339,10 +341,13 @@ class StartSliceJob(Job):
|
|||
setting = message.addRepeatedMessage("settings")
|
||||
setting.name = key
|
||||
extruder = int(round(float(stack.getProperty(key, "limit_to_extruder"))))
|
||||
if extruder >= 0 and key not in top_of_stack.getAllKeys(): #Limited to a specific extruder, but not overridden by per-object settings.
|
||||
|
||||
# Check if limited to a specific extruder, but not overridden by per-object settings.
|
||||
if extruder >= 0 and key not in top_of_stack.getAllKeys():
|
||||
limited_stack = ExtruderManager.getInstance().getActiveExtruderStacks()[extruder]
|
||||
else:
|
||||
limited_stack = stack #Just take from the per-object settings itself.
|
||||
limited_stack = stack
|
||||
|
||||
setting.value = str(limited_stack.getProperty(key, "value")).encode("utf-8")
|
||||
Job.yieldThread()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue