diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-02-27 17:54:45 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-02-27 17:54:45 +0300 |
commit | 3dd3e7321eee426112859bfc2427749c2f6113e6 (patch) | |
tree | b92e7e99389f326442fdc773eba41e30a7e4eb88 | |
parent | ddacff06f287a849b88b498d5efcab90253e49c3 (diff) |
store vars in py operators in the instance rather then the operator classes.
-rw-r--r-- | release/scripts/modules/rna_prop_ui.py | 6 | ||||
-rw-r--r-- | release/scripts/op/wm.py | 5 |
2 files changed, 2 insertions, 9 deletions
diff --git a/release/scripts/modules/rna_prop_ui.py b/release/scripts/modules/rna_prop_ui.py index 8079c461e43..246fa4bdb7d 100644 --- a/release/scripts/modules/rna_prop_ui.py +++ b/release/scripts/modules/rna_prop_ui.py @@ -164,10 +164,6 @@ class WM_OT_properties_edit(bpy.types.Operator): max = rna_max description = StringProperty(name="Tip", default="") - # the class instance is not persistant, need to store in the class - # not ideal but changes as the op runs. - _last_prop = [''] - def execute(self, context): path = self.properties.path value = self.properties.value @@ -209,7 +205,7 @@ class WM_OT_properties_edit(bpy.types.Operator): def invoke(self, context, event): - self._last_prop[:] = [self.properties.property] + self._last_prop = [self.properties.property] item = eval("context.%s" % self.properties.path) diff --git a/release/scripts/op/wm.py b/release/scripts/op/wm.py index a6ecfe21375..c70e80cdfe8 100644 --- a/release/scripts/op/wm.py +++ b/release/scripts/op/wm.py @@ -308,14 +308,11 @@ class WM_OT_context_modal_mouse(bpy.types.Operator): invert = BoolProperty(default=False, description="Invert the mouse input") initial_x = IntProperty(options={'HIDDEN'}) - _values = {} - def _values_store(self, context): path_iter = self.properties.path_iter path_item = self.properties.path_item - self._values.clear() - values = self._values + self._values = values = {} for item in getattr(context, path_iter): try: |