Jaime van Kessel 8 лет назад
Родитель
Сommit
1ae69b25fa

+ 2 - 1
plugins/PerObjectSettingsTool/PerObjectSettingVisibilityHandler.py

@@ -5,7 +5,8 @@ from UM.Logger import Logger
 
 from cura.SettingOverrideDecorator import SettingOverrideDecorator
 
-
+##  The per object setting visibility handler ensures that only setting defintions that have a matching instance Container
+#   are returned as visible. 
 class PerObjectSettingVisibilityHandler(QObject):
     def __init__(self, parent = None, *args, **kwargs):
         super().__init__(parent = parent, *args, **kwargs)

+ 3 - 4
plugins/PerObjectSettingsTool/PerObjectSettingsTool.py

@@ -7,12 +7,14 @@ from UM.Application import Application
 from UM.Preferences import Preferences
 
 
+##  This tool allows the user to add & change settings per node in the scene.
+#   The settings per object are kept in a ContainerStack, which is linked to a node by decorator.
 class PerObjectSettingsTool(Tool):
     def __init__(self):
         super().__init__()
         self._model = None
 
-        self.setExposedProperties("SelectedObjectId","ContainerID")
+        self.setExposedProperties("SelectedObjectId", "ContainerID")
 
         Preferences.getInstance().preferenceChanged.connect(self._onPreferenceChanged)
         Selection.selectionChanged.connect(self.propertyChanged)
@@ -40,9 +42,6 @@ class PerObjectSettingsTool(Tool):
         except AttributeError:
             return ""
 
-    def setContainerID(self, value):
-        pass
-
     def _onPreferenceChanged(self, preference):
         if preference == "cura/active_mode":
             enabled = Preferences.getInstance().getValue(preference)==1