1040 Commits

Author SHA1 Message Date
Lipu Fei
3fbdb27e8e Merge branch 'master' into feature_dark_colours_icons
CURA-4148

Resolve merge conflicts.
2017-08-28 11:13:38 +02:00
Ghostkeeper
585c04dfaa
Also show warning icon when the set-up on other extruders is unsupported
So I added a function that checks the support on all extruders and the global stack.

Contributes to issue CURA-4148.
2017-08-25 14:27:45 +02:00
Lipu Fei
141aad5513 Trigger to re-evaluate default settings in per-object settings when the active stack gets changed.
CURA-4186

Trigger signals to re-evaluate default settings in pre-object settings
when the active stack gets changed. Otherwise the values won't be
updated directly.
2017-08-25 12:48:47 +02:00
Lipu Fei
a320784a6d For a per-object setting, use the user-defined value first
CURA-4186

In a per-object setting, if there is user defined value, use that first.
If the value is default, then evaluate it with the normal routine.
2017-08-25 12:19:05 +02:00
Lipu Fei
c44e527305 Remove warning in /PerObjectContainerStack
CURA-4186
2017-08-25 11:57:52 +02:00
Lipu Fei
50a7e8146f Add a dedicated stack class for per-object settings
CURA-4186

Add a dedicated stack class PerObjectContainerStack for per-object
settings to evaluate limit_to_extruder values correctly.
2017-08-24 17:09:28 +02:00
Lipu Fei
365379f735 Add missing context in getProperty() in global and extruder stacks
CURA-4186

All getProperty() calls should use the provided context.
2017-08-24 17:01:03 +02:00
Lipu Fei
759d44dbef Add stack context for function evaluation
CURA-4186
2017-08-23 14:39:08 +02:00
fieldOfView
32a863d9dc Find a material with the correct diameter when adding a printer 2017-08-23 11:13:36 +02:00
Jaime van Kessel
ca1f7430c1 Merge branch 'fix_add_machine_material_diameter' of https://github.com/fieldOfView/Cura 2017-08-23 11:11:45 +02:00
alekseisasin
9363f93467 Merge pull request #2224 from fieldOfView/fix_multiextruder_menus
Fix multiextruder menus
2017-08-23 09:08:48 +02:00
fieldOfView
43c6801e58 Find a material with the correct diameter when adding a printer 2017-08-20 16:52:56 +02:00
Ghostkeeper
64753f8c8b
Merge branch '2.7' 2017-08-18 10:42:14 +02:00
Lipu Fei
b20711ef7c Remove incorrect maximum extruder count check
CURA-4188
2017-08-17 16:36:57 +02:00
Lipu Fei
9aa65eab44 Merge branch '2.7' 2017-08-15 14:43:36 +02:00
Lipu Fei
e67286c0d8 Do not add extruder stacks for single-extrusion machines
CURA-4167

In the current architecture, single-extrusion machines don't have
extruder stacks.
2017-08-15 14:19:23 +02:00
alekseisasin
bc4b1d9c4d Merge remote-tracking branch 'origin/2.7' 2017-08-14 15:11:33 +02:00
Ghostkeeper
3316f3aa13
Add warning contexts to not translate XML tags
This went wrong a few times with previous translations. Let's hope that this prevents it from happening again.

Contributes to issue CURA-4113.
2017-08-14 14:06:20 +02:00
Ghostkeeper
7ab6a551c1
Clarify that XML material tags don't get translated
Some of the translators got this wrong last time. Let's see how good they read this next time...

Contributes to issue CURA-4113.
2017-08-14 13:54:11 +02:00
Lipu Fei
dce575f661 Remove wall_extruder_nr from ExtruderManager.getUsedExtruderStacks
CURA-4145
2017-08-14 13:39:56 +02:00
Lipu Fei
bb1316fc88 Check if a material is being used based on base_file
CURA-4129
2017-08-14 08:48:07 +02:00
Lipu Fei
4bac499c22 Use QualityManager._getFilteredContainersForStack() to get qualities
CURA-4151

The quality searching code in _configureProfile() for importing quality
profiles doesn't take into account base materials. Use the function in
QualityManager to solve this problem.
2017-08-10 12:14:43 +02:00
Lipu Fei
6fd3963e8f Fix material searching in isContainerUsed()
CURA-4129

Searching for used materials should also take into account the material
container ID.
2017-08-09 09:47:36 +02:00
Lipu Fei
e414621250 Fix code style 2017-08-09 09:27:42 +02:00
Lipu Fei
ab3d8349b6 Also skip empty containers when getting layer height for a quality profile
CURA-4133

On some machines such as UM2, there is no material. Getting the layer
height in this case will result back to the global stack itself, which
is the layer height of the current setting. This is a problem for
"Normal" (or "Fine") quality because it uses the machine's default layer
height.
2017-08-09 09:24:04 +02:00
Lipu Fei
8c6abc85fc Rename variable in for loop
CURA-4129
2017-08-08 16:32:40 +02:00
Lipu Fei
bb1475d1fd Search for instance containers with type material
CURA-4129
2017-08-08 16:32:02 +02:00
Ghostkeeper
b9cdeb68d6
Don't crash when there is no global quality container
We fill the stack with an empty container rather than with None in that case.

Contributes to issue CURA-3301.
2017-08-08 14:40:02 +02:00
Ghostkeeper
fe406f530c
Never fill None for quality changes profile
We want it to be the empty profile instead. This gets passed on all the way to _replaceQualityOrQualityChangesInStack where the metadata is requested.

Contributes to issue CURA-3301.
2017-08-08 13:51:40 +02:00
fieldOfView
975e7f04b4 Remove unused incorrect code
The property is called activeMaterialIds, but it returns the stack ids. The code is superceeded by allActiveMaterialIds.
2017-08-08 11:27:45 +02:00
Lipu Fei
4a34f141d1 Check if a material container is used by GUID
CURA-4129

isContainerUsed() is used to enable/disable the "Remove" button on the
Material Manager dialog. When a custom material is created, it creates
multiple containers, one for each extruder variant. In the dialog, it
only checks if the material for the currently active extruder is being
used or not. This causes a problem when 2 extruders are of different
types and one uses a custom material. Then, the "Remove" button will
not be correctly enabled/disable in the Material Manager dialog when
the other extruder is activated.
2017-08-07 13:17:47 +02:00
Lipu Fei
09576241db Generate unique names for definition changes containers
CURA-4107
2017-08-07 10:59:24 +02:00
Lipu Fei
76e8090dbd Remove duplicated function createDefinitionChangesContainer()
CURA-4107
2017-08-07 10:59:24 +02:00
Ghostkeeper
cf1309c650
Don't update next stack if there is no next stack
Not all extruder stacks have a next stack. Well currently every extruder stack should have a next stack, but the code is built around the possibility that there isn't a next stack elsewhere too.

Contributes to issue CURA-4121.
2017-08-07 09:47:53 +02:00
Ghostkeeper
584e1b6abb
Set the next stack before adding the user container
Since the user container may trigger a propertyChanged signal, which then requests the next stack.

Contributes to issue CURA-4121.
2017-08-07 09:45:16 +02:00
Lipu Fei
792feaade6 Always create a definition changes container for a newly created stack
CURA-4107

A newly created stack will have an empty definition changes container by
default, but when a machine or extruder gets activate, Cura will create
a definition changes container for it if it has an empty one. This lazy
creation caused the problem when after Cura creates a multi-extrusion
machine for the first time, switching to a different extruder tab will
cause an extruder stack change, which eventually triggers an unnecessary
auto-slice.
2017-08-01 09:40:51 +02:00
Jaime van Kessel
e636dbdd10 Merge pull request #2107 from fieldOfView/feature_pyserial_usb_detection
Use pyserial to list serial ports
2017-07-27 09:31:35 +02:00
Lipu Fei
2aa8e590bf Merge pull request #2056 from Ultimaker/top_most_skin_feature
Top most skin feature (CURA-3940)
2017-07-26 14:58:08 +02:00
Lipu Fei
9c1d23fe5b Make sure MachineManager initializes after ContainerRegistry does
CURA-4084

When MachineManager gets created, it will find and set the current
active machine. This requires the ContainerRegistry to be initialized
first.
2017-07-26 14:09:18 +02:00
Lipu Fei
93731b8d1f Trigger auto-slice based on stackValidation instead of stack/setting changes
CURA-4084

Stack error checks are scheduled with a delay, and when a container is
changed (e.g. Quality), the auto-slice may get triggered before the
error check is done. Because the error check result is cached, the
auto-slicing will use the previous result instead of new. So, the
auto-slicing should be triggered when a stack validation is finished
instead of when a stack/setting gets changed.
2017-07-26 14:09:18 +02:00
Tim Kuipers
5f97d2cbde fix: account for roofing extruder when checking which extruder is used (CURA-4069, CURA-3940) 2017-07-21 15:53:05 +02:00
Lipu Fei
b0be901079 Do not check support_interface_extruder_nr if it is used
CURA-4069

support_bottom_extruder_nr and support_roof_extruder_nr are the support
interface extruder numbers, so checking those two is enough and there is
no need to check the interface extruder number.
2017-07-21 13:40:13 +02:00
Lipu Fei
1b0268f09c Use extruder_nr as integers for comparison
CURA-4069
2017-07-21 13:32:46 +02:00
Lipu Fei
9a92b58ac3 Check all limit_to_extruder features in getUsedExtruderStacks()
CURA-4069

getUsedExtruderStacks() doesn't take into account some new limit to
extruder features, The BuildVolume uses it to determine disallowed
areas, and this makes it give incorrect results.
2017-07-21 13:28:12 +02:00
Arjen Hiemstra
b839cb74f4 Do not only check if activeMaterialId is None, also check for empty
Fixes CURA-4065
2017-07-20 12:01:21 +02:00
Arjen Hiemstra
573d25982e Minor cleanup of SettingOverrideDecorator
We never use the _instance variable except in deepcopy, so no need to
store that.

Contributes to CURA-3719
2017-07-18 11:23:43 +02:00
Lipu Fei
18fddf50c7 Add type hinting for container_id in ExtruderStack
CURA-4049
2017-07-18 09:22:45 +02:00
Youness Alaoui
7e7e15a12b Fix MachineManager connection to OutputDeviceManager signals late.
If a PrinterOutputDevice is able to connect quickly to a machine, then
by the time the MachineManager is created and connects to the signal,
it will be too late, and it might miss that there is already connected
devices.

# Conflicts:
#	plugins/USBPrinting/USBPrinterOutputDeviceManager.py
2017-07-12 14:06:08 +02:00
Arjen Hiemstra
95b825a4c5 Emit propertiesChanged on the global stack from the extruder stack
But only when the setting that changed has a relation that is not
settable per extruder.

Fixes CURA-3521
2017-07-11 12:03:23 +02:00
Ghostkeeper
012d299d98
Prevent circular import
When this is imported during the __init__, it'll long have been imported elsewhere and won't need to import it again but still guarantees that it is actually imported if no other module does it first.

Contributes to issue CURA-4024.
2017-07-10 16:42:38 +02:00