Skip to content

Commit cecb827

Browse files
committed
Update CustomSupportsCylinder.py
1 parent d373133 commit cecb827

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

CustomSupportsCylinder.py

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
from cura.CuraApplication import CuraApplication
3333

3434
from UM.Logger import Logger
35+
from UM.Message import Message
3536
from UM.Math.Matrix import Matrix
3637
from UM.Math.Vector import Vector
3738

@@ -55,7 +56,8 @@
5556
from UM.Scene.ToolHandle import ToolHandle
5657
from UM.Tool import Tool
5758

58-
59+
from UM.i18n import i18nCatalog
60+
catalog = i18nCatalog("cura")
5961

6062
import math
6163
import numpy
@@ -293,6 +295,17 @@ def _createSupportMesh(self, parent: CuraSceneNode, position: Vector , position2
293295
new_instance.resetState() # Ensure that the state is not seen as a user state.
294296
settings.addInstance(new_instance)
295297

298+
299+
global_container_stack = CuraApplication.getInstance().getGlobalContainerStack()
300+
301+
s_p = global_container_stack.getProperty("support_type", "value")
302+
if s_p == 'buildplate' :
303+
Message(text = "Info modification support_type :\nNew value : everywhere", title = catalog.i18nc("@info:title", "Custom Supports Cylinder")).show()
304+
Logger.log('d', 'support_type different : ' + str(s_p))
305+
# Define support_type=everywhere
306+
global_container_stack.setProperty("support_type", "value", 'everywhere')
307+
308+
296309
op = GroupedOperation()
297310
# First add node to the scene at the correct position/scale, before parenting, so the support mesh does not get scaled with the parent
298311
op.addOperation(AddSceneNodeOperation(node, self._controller.getScene().getRoot()))

0 commit comments

Comments
 (0)