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
|
max = rna_max
|
||||||
description = StringProperty(name="Tip", default="")
|
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):
|
def execute(self, context):
|
||||||
path = self.properties.path
|
path = self.properties.path
|
||||||
value = self.properties.value
|
value = self.properties.value
|
||||||
@ -209,7 +205,7 @@ class WM_OT_properties_edit(bpy.types.Operator):
|
|||||||
|
|
||||||
def invoke(self, context, event):
|
def invoke(self, context, event):
|
||||||
|
|
||||||
self._last_prop[:] = [self.properties.property]
|
self._last_prop = [self.properties.property]
|
||||||
|
|
||||||
item = eval("context.%s" % self.properties.path)
|
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")
|
invert = BoolProperty(default=False, description="Invert the mouse input")
|
||||||
initial_x = IntProperty(options={'HIDDEN'})
|
initial_x = IntProperty(options={'HIDDEN'})
|
||||||
|
|
||||||
_values = {}
|
|
||||||
|
|
||||||
def _values_store(self, context):
|
def _values_store(self, context):
|
||||||
path_iter = self.properties.path_iter
|
path_iter = self.properties.path_iter
|
||||||
path_item = self.properties.path_item
|
path_item = self.properties.path_item
|
||||||
|
|
||||||
self._values.clear()
|
self._values = values = {}
|
||||||
values = self._values
|
|
||||||
|
|
||||||
for item in getattr(context, path_iter):
|
for item in getattr(context, path_iter):
|
||||||
try:
|
try:
|
||||||
|
Loading…
Reference in New Issue
Block a user