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:
authorBastien Montagne <montagne29@wanadoo.fr>2014-03-13 20:37:19 +0400
committerBastien Montagne <montagne29@wanadoo.fr>2014-03-13 20:37:19 +0400
commit0c6e74436fd8aba1a8d015d3427a751480f9530c (patch)
tree5e7f17cd540831cde068fd11ea1b4299f5e29eb2 /release/scripts/modules
parentb7712a761ae66d5a0b54a31e6bf2f8f19c37b0da (diff)
Fix T39158: Help > Operator Cheat Sheet causes a python recursive loop.
Core issue exists since ages - the thing you get from bpy.types.YOUR_OT_operator is fuzzy, and may change, due to the fact that both Operator and OperatorProperties share the same name... Would be cool to get rid of this issue one day, but for now it's safer to use rna acessor... This commit is to be backported to 2.70.
Diffstat (limited to 'release/scripts/modules')
-rw-r--r--release/scripts/modules/bpy/ops.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/release/scripts/modules/bpy/ops.py b/release/scripts/modules/bpy/ops.py
index 1d71bffbd84..e457c087ab8 100644
--- a/release/scripts/modules/bpy/ops.py
+++ b/release/scripts/modules/bpy/ops.py
@@ -204,7 +204,10 @@ class BPyOpsSubModOp(object):
import bpy
idname = self.idname()
as_string = op_as_string(idname)
- op_class = getattr(bpy.types, idname)
+ # XXX You never quite know what you get from bpy.types, with operators... Operator and OperatorProperties
+ # are shadowing each other, and not in the same way for native ops and py ones! See T39158.
+ # op_class = getattr(bpy.types, idname)
+ op_class = op_get_rna(idname)
descr = op_class.bl_rna.description
# XXX, workaround for not registering
# every __doc__ to save time on load.