diff options
author | Campbell Barton <ideasman42@gmail.com> | 2017-08-31 11:42:48 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2017-08-31 11:45:00 +0300 |
commit | 732f70a151c47dc55e9da33c0bf346764bb54ab6 (patch) | |
tree | 2662364fdee1240178eb5a4f78767cd2dc250711 /source/blender/makesrna/intern/rna_nodetree.c | |
parent | 4f1b510d75aea996dcdc65dd147d9f798a50bc1c (diff) |
RNA: existing type check used wrong identifier
Own error in recent type checks, in many cases the 'idname'
is used for the struct identifier, not the 'identifier'
which is the Python class name in this context.
Diffstat (limited to 'source/blender/makesrna/intern/rna_nodetree.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_nodetree.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c index f15605d0f83..1c7d7816f0f 100644 --- a/source/blender/makesrna/intern/rna_nodetree.c +++ b/source/blender/makesrna/intern/rna_nodetree.c @@ -633,7 +633,7 @@ static StructRNA *rna_NodeTree_register( if (nt) { rna_NodeTree_unregister(bmain, nt->ext.srna); } - if (!RNA_struct_available_or_report(reports, identifier)) { + if (!RNA_struct_available_or_report(reports, dummynt.idname)) { return NULL; } @@ -1393,16 +1393,13 @@ static bNodeType *rna_Node_register_base(Main *bmain, ReportList *reports, Struc identifier, (int)sizeof(dummynt.idname)); return NULL; } - if (!RNA_struct_available_or_report(reports, identifier)) { - return NULL; - } /* check if we have registered this node type before, and remove it */ nt = nodeTypeFind(dummynt.idname); if (nt) { rna_Node_unregister(bmain, nt->ext.srna); } - if (!RNA_struct_available_or_report(reports, identifier)) { + if (!RNA_struct_available_or_report(reports, dummynt.idname)) { return NULL; } |