[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [33236] trunk/blender/release/scripts/ modules/bpy/ops.py: bugfix [#24805] bpy operator runs in wrong order or is ignored at all
Campbell Barton
ideasman42 at gmail.com
Mon Nov 22 18:21:19 CET 2010
Revision: 33236
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=33236
Author: campbellbarton
Date: 2010-11-22 18:21:18 +0100 (Mon, 22 Nov 2010)
Log Message:
-----------
bugfix [#24805] bpy operator runs in wrong order or is ignored at all
Modified Paths:
--------------
trunk/blender/release/scripts/modules/bpy/ops.py
Modified: trunk/blender/release/scripts/modules/bpy/ops.py
===================================================================
--- trunk/blender/release/scripts/modules/bpy/ops.py 2010-11-22 16:20:59 UTC (rev 33235)
+++ trunk/blender/release/scripts/modules/bpy/ops.py 2010-11-22 17:21:18 UTC (rev 33236)
@@ -134,6 +134,16 @@
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 @@
# 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 @@
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
More information about the Bf-blender-cvs
mailing list