Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2010-11-22 20:21:18 +0300
committerCampbell Barton <ideasman42@gmail.com>2010-11-22 20:21:18 +0300
commit1d468c75e708bd992d507db12925e0b185556791 (patch)
tree974de9412080f5633908ac3d948220f9ca1b0c57 /release/scripts/modules/bpy/ops.py
parentd43b55a20059938a5ae897b14a1afc8dd9481528 (diff)
bugfix [#24805] bpy operator runs in wrong order or is ignored at all
Diffstat (limited to 'release/scripts/modules/bpy/ops.py')
-rw-r--r--release/scripts/modules/bpy/ops.py20
1 files changed, 14 insertions, 6 deletions
diff --git a/release/scripts/modules/bpy/ops.py b/release/scripts/modules/bpy/ops.py
index 5b4adbdb23e..3d4156d0ca2 100644
--- a/release/scripts/modules/bpy/ops.py
+++ b/release/scripts/modules/bpy/ops.py
@@ -134,6 +134,16 @@ class bpy_ops_submodule_op(object):
return C_dict, C_exec
+ @staticmethod
+ def _scene_update(context):
+ scene = context.scene
+ if scene: # None in backgroud mode
+ scene.update()
+ else:
+ for scene in bpy.data.scenes:
+ scene.update()
+
+
__doc__ = property(_get_doc)
def __init__(self, module, func):
@@ -159,6 +169,9 @@ class bpy_ops_submodule_op(object):
# Get the operator from blender
wm = context.window_manager
+ # run to account for any rna values the user changes.
+ __class__._scene_update(context)
+
if args:
C_dict, C_exec = __class__._parse_args(args)
ret = op_call(self.idname_py(), C_dict, kw, C_exec)
@@ -166,12 +179,7 @@ class bpy_ops_submodule_op(object):
ret = op_call(self.idname_py(), None, kw)
if 'FINISHED' in ret and context.window_manager == wm:
- scene = context.scene
- if scene: # None in backgroud mode
- scene.update()
- else:
- for scene in bpy.data.scenes:
- scene.update()
+ __class__._scene_update(context)
return ret