forked from bartvdbraak/blender
store vars in py operators in the instance rather then the operator classes.
This commit is contained in:
parent
ddacff06f2
commit
3dd3e7321e
@ -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)
|
||||
|
||||
|
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user