diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-10-26 12:01:33 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-10-26 12:01:33 +0400 |
commit | 4a15df15711628c65282cc4d5a1dfd852776e014 (patch) | |
tree | bd6433fd953270ac4bf118ae0bc32ad386f875f6 /source/blender/editors/armature/armature_ops.c | |
parent | a4203573cb5c60dbdc0518251546814980973469 (diff) |
remove null checks for macro definitions, if these fail then something is broken elsewhere, better not fail silently.
Diffstat (limited to 'source/blender/editors/armature/armature_ops.c')
-rw-r--r-- | source/blender/editors/armature/armature_ops.c | 32 |
1 files changed, 13 insertions, 19 deletions
diff --git a/source/blender/editors/armature/armature_ops.c b/source/blender/editors/armature/armature_ops.c index 0090522d1e1..3c41765034d 100644 --- a/source/blender/editors/armature/armature_ops.c +++ b/source/blender/editors/armature/armature_ops.c @@ -165,37 +165,31 @@ void ED_operatormacros_armature(void) { wmOperatorType *ot; wmOperatorTypeMacro *otmacro; - + ot = WM_operatortype_append_macro("ARMATURE_OT_duplicate_move", "Duplicate", "Make copies of the selected bones within the same armature and move them", OPTYPE_UNDO | OPTYPE_REGISTER); - if (ot) { - WM_operatortype_macro_define(ot, "ARMATURE_OT_duplicate"); - otmacro = WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate"); - RNA_enum_set(otmacro->ptr, "proportional", 0); - } + WM_operatortype_macro_define(ot, "ARMATURE_OT_duplicate"); + otmacro = WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate"); + RNA_enum_set(otmacro->ptr, "proportional", 0); ot = WM_operatortype_append_macro("ARMATURE_OT_extrude_move", "Extrude", "Create new bones from the selected joints and move them", OPTYPE_UNDO | OPTYPE_REGISTER); - if (ot) { - otmacro = WM_operatortype_macro_define(ot, "ARMATURE_OT_extrude"); - RNA_boolean_set(otmacro->ptr, "forked", FALSE); - otmacro = WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate"); - RNA_enum_set(otmacro->ptr, "proportional", 0); - } - + otmacro = WM_operatortype_macro_define(ot, "ARMATURE_OT_extrude"); + RNA_boolean_set(otmacro->ptr, "forked", FALSE); + otmacro = WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate"); + RNA_enum_set(otmacro->ptr, "proportional", 0); + /* XXX would it be nicer to just be able to have standard extrude_move, but set the forked property separate? * that would require fixing a properties bug 19733 */ ot = WM_operatortype_append_macro("ARMATURE_OT_extrude_forked", "Extrude Forked", "Create new bones from the selected joints and move them", OPTYPE_UNDO | OPTYPE_REGISTER); - if (ot) { - otmacro = WM_operatortype_macro_define(ot, "ARMATURE_OT_extrude"); - RNA_boolean_set(otmacro->ptr, "forked", TRUE); - otmacro = WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate"); - RNA_enum_set(otmacro->ptr, "proportional", 0); - } + otmacro = WM_operatortype_macro_define(ot, "ARMATURE_OT_extrude"); + RNA_boolean_set(otmacro->ptr, "forked", TRUE); + otmacro = WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate"); + RNA_enum_set(otmacro->ptr, "proportional", 0); } void ED_keymap_armature(wmKeyConfig *keyconf) |