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:
authorCampbell Barton <ideasman42@gmail.com>2017-08-23 09:10:45 +0300
committerCampbell Barton <ideasman42@gmail.com>2017-08-23 09:10:45 +0300
commit58a4c767a14b60b903fbe5c5e7e960c57212faeb (patch)
tree8483aebad87ecc50cdeb8f76e861c755efb2cbd7 /source/blender/makesrna/intern/rna_wm.c
parent9cfb72ff81a36c26f4b611ec733432968f15a2de (diff)
parentb8d77c44f112cae1e98308ff33ce055ea4fb46ff (diff)
Merge branch 'master' into blender2.8
Diffstat (limited to 'source/blender/makesrna/intern/rna_wm.c')
-rw-r--r--source/blender/makesrna/intern/rna_wm.c34
1 files changed, 20 insertions, 14 deletions
diff --git a/source/blender/makesrna/intern/rna_wm.c b/source/blender/makesrna/intern/rna_wm.c
index 14e27235b81..637ba1d35e5 100644
--- a/source/blender/makesrna/intern/rna_wm.c
+++ b/source/blender/makesrna/intern/rna_wm.c
@@ -1239,6 +1239,16 @@ static StructRNA *rna_Operator_register(
if (validate(&dummyotr, data, have_function) != 0)
return NULL;
+ /* check if we have registered this operator type before, and remove it */
+ {
+ wmOperatorType *ot = WM_operatortype_find(dummyot.idname, true);
+ if (ot && ot->ext.srna)
+ rna_Operator_unregister(bmain, ot->ext.srna);
+ }
+ if (!RNA_struct_available_or_report(reports, identifier)) {
+ return NULL;
+ }
+
{ /* convert foo.bar to FOO_OT_bar
* allocate the description and the idname in 1 go */
@@ -1306,13 +1316,6 @@ static StructRNA *rna_Operator_register(
}
}
- /* check if we have registered this operator type before, and remove it */
- {
- wmOperatorType *ot = WM_operatortype_find(dummyot.idname, true);
- if (ot && ot->ext.srna)
- rna_Operator_unregister(bmain, ot->ext.srna);
- }
-
/* XXX, this doubles up with the operator name [#29666]
* for now just remove from dir(bpy.types) */
@@ -1415,6 +1418,16 @@ static StructRNA *rna_MacroOperator_register(
return NULL;
}
+ /* check if we have registered this operator type before, and remove it */
+ {
+ wmOperatorType *ot = WM_operatortype_find(dummyot.idname, true);
+ if (ot && ot->ext.srna)
+ rna_Operator_unregister(bmain, ot->ext.srna);
+ }
+ if (!RNA_struct_available_or_report(reports, identifier)) {
+ return NULL;
+ }
+
{ /* convert foo.bar to FOO_OT_bar
* allocate the description and the idname in 1 go */
const uint idname_len = strlen(temp_buffers.idname) + 4;
@@ -1441,13 +1454,6 @@ static StructRNA *rna_MacroOperator_register(
dummyot.undo_group = ch;
}
- /* check if we have registered this operator type before, and remove it */
- {
- wmOperatorType *ot = WM_operatortype_find(dummyot.idname, true);
- if (ot && ot->ext.srna)
- rna_Operator_unregister(bmain, ot->ext.srna);
- }
-
/* XXX, this doubles up with the operator name [#29666]
* for now just remove from dir(bpy.types) */