diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-02-02 08:43:35 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-02-02 08:43:35 +0400 |
commit | 697e77a49457d90821ffdfc21f0fcf60843eee05 (patch) | |
tree | 6b3dc5d7ebd65cd9d34dda1c99d7d93078a7f354 /source/blender/makesrna/intern/rna_wm.c | |
parent | 5a221dd0dea81fbe31f5e6431911288e8e3f4b53 (diff) |
fix [#29666] Duplicate entries in bpy.types
Python operator subclasses and operator types each get their own SRNA, causing double ups for bpy.types.__dir__()
From the operator type - these share names.
* ot->ext.srna
* ot->srna
Note that this conflict is still there, this only disables 'ot->ext.srna' from being included in dir(bpy.types).
Diffstat (limited to 'source/blender/makesrna/intern/rna_wm.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_wm.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/source/blender/makesrna/intern/rna_wm.c b/source/blender/makesrna/intern/rna_wm.c index 52a4a1db36b..b5c24ec568e 100644 --- a/source/blender/makesrna/intern/rna_wm.c +++ b/source/blender/makesrna/intern/rna_wm.c @@ -1050,6 +1050,9 @@ static StructRNA *rna_Operator_register(Main *bmain, ReportList *reports, void * rna_Operator_unregister(bmain, ot->ext.srna); } + /* XXX, this doubles up with the operator name [#29666] + * for now just remove from dir(bpy.types) */ + /* create a new operator type */ dummyot.ext.srna= RNA_def_struct(&BLENDER_RNA, dummyot.idname, "Operator"); RNA_def_struct_flag(dummyot.ext.srna, STRUCT_NO_IDPROPERTIES); /* operator properties are registered separately */ @@ -1126,7 +1129,10 @@ static StructRNA *rna_MacroOperator_register(Main *bmain, ReportList *reports, v rna_Operator_unregister(bmain, ot->ext.srna); } - /* create a new menu type */ + /* XXX, this doubles up with the operator name [#29666] + * for now just remove from dir(bpy.types) */ + + /* create a new operator type */ dummyot.ext.srna= RNA_def_struct(&BLENDER_RNA, dummyot.idname, "Operator"); dummyot.ext.data= data; dummyot.ext.call= call; |