Get scale factor from global stack

This is the one that's actually used by CuraEngine. If I get it per-object, the material profile overrides it.

Contributes to issue CURA-7118.
This commit is contained in:
Ghostkeeper 2020-09-02 02:08:18 +02:00
parent 4e283b5a78
commit a6707217c7
No known key found for this signature in database
GPG key ID: D2A8871EE34EC59A

View file

@ -380,7 +380,7 @@ class ConvexHullDecorator(SceneNodeDecorator):
influences the collision area.
"""
scale_factor = self._getSettingProperty("material_shrinkage_percentage") / 100.0
scale_factor = self._global_stack.getProperty("material_shrinkage_percentage", "value") / 100.0
center = self.getNode().getBoundingBox().center
result = convex_hull.scale(scale_factor, [center.x, center.z]) # Yes, use Z instead of Y. Mixed conventions there with how the OpenGL coordinates are transmitted.