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.
This commit is contained in:
Bastien Montagne 2014-03-13 17:37:19 +01:00
parent b7712a761a
commit 0c6e74436f

@ -204,7 +204,10 @@ class BPyOpsSubModOp(object):
import bpy import bpy
idname = self.idname() idname = self.idname()
as_string = op_as_string(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 descr = op_class.bl_rna.description
# XXX, workaround for not registering # XXX, workaround for not registering
# every __doc__ to save time on load. # every __doc__ to save time on load.