mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-12 21:38:58 +08:00
Fix circular import with CuraApplication again
Contributes to issue CURA-5330.
This commit is contained in:
parent
aff341eac9
commit
8ba592b593
@ -10,7 +10,7 @@ from UM.Math.Polygon import Polygon #For typing.
|
||||
from UM.Scene.SceneNode import SceneNode
|
||||
from UM.Scene.SceneNodeDecorator import SceneNodeDecorator #To cast the deepcopy of every decorator back to SceneNodeDecorator.
|
||||
|
||||
from cura.CuraApplication import CuraApplication #To get the build plate.
|
||||
import cura.CuraApplication #To get the build plate.
|
||||
from cura.Settings.ExtruderStack import ExtruderStack #For typing.
|
||||
from cura.Settings.SettingOverrideDecorator import SettingOverrideDecorator #For per-object settings.
|
||||
|
||||
@ -30,10 +30,10 @@ class CuraSceneNode(SceneNode):
|
||||
return self._outside_buildarea or self.callDecoration("getBuildPlateNumber") < 0
|
||||
|
||||
def isVisible(self) -> bool:
|
||||
return super().isVisible() and self.callDecoration("getBuildPlateNumber") == CuraApplication.getInstance().getMultiBuildPlateModel().activeBuildPlate
|
||||
return super().isVisible() and self.callDecoration("getBuildPlateNumber") == cura.CuraApplication.CuraApplication.getInstance().getMultiBuildPlateModel().activeBuildPlate
|
||||
|
||||
def isSelectable(self) -> bool:
|
||||
return super().isSelectable() and self.callDecoration("getBuildPlateNumber") == CuraApplication.getInstance().getMultiBuildPlateModel().activeBuildPlate
|
||||
return super().isSelectable() and self.callDecoration("getBuildPlateNumber") == cura.CuraApplication.CuraApplication.getInstance().getMultiBuildPlateModel().activeBuildPlate
|
||||
|
||||
## Get the extruder used to print this node. If there is no active node, then the extruder in position zero is returned
|
||||
# TODO The best way to do it is by adding the setActiveExtruder decorator to every node when is loaded
|
||||
|
Loading…
x
Reference in New Issue
Block a user