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>2011-02-25 07:15:45 +0300
committerCampbell Barton <ideasman42@gmail.com>2011-02-25 07:15:45 +0300
commit8a1cff54ceb9a136fc5a254eeffd20939c3e8fa6 (patch)
tree5b2e9a0908dcaf81e75aa96a9b67beaece137447 /source/blender/editors/armature/armature_ops.c
parentaa9c91f01a67d12e37809ad29f46bc46c19fd3d9 (diff)
internal operator/wm/macro function: dont crash if operators are not found (warning will be printed).
Diffstat (limited to 'source/blender/editors/armature/armature_ops.c')
-rw-r--r--source/blender/editors/armature/armature_ops.c28
1 files changed, 17 insertions, 11 deletions
diff --git a/source/blender/editors/armature/armature_ops.c b/source/blender/editors/armature/armature_ops.c
index 63a57178163..26414e59a3c 100644
--- a/source/blender/editors/armature/armature_ops.c
+++ b/source/blender/editors/armature/armature_ops.c
@@ -166,23 +166,29 @@ void ED_operatormacros_armature(void)
wmOperatorTypeMacro *otmacro;
ot= WM_operatortype_append_macro("ARMATURE_OT_duplicate_move", "Duplicate", OPTYPE_UNDO|OPTYPE_REGISTER);
- WM_operatortype_macro_define(ot, "ARMATURE_OT_duplicate");
- otmacro= WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate");
- RNA_enum_set(otmacro->ptr, "proportional", 0);
+ 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);
+ }
ot= WM_operatortype_append_macro("ARMATURE_OT_extrude_move", "Extrude", OPTYPE_UNDO|OPTYPE_REGISTER);
- otmacro=WM_operatortype_macro_define(ot, "ARMATURE_OT_extrude");
- RNA_enum_set(otmacro->ptr, "forked", 0);
- otmacro= WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate");
- RNA_enum_set(otmacro->ptr, "proportional", 0);
+ if(ot) {
+ otmacro=WM_operatortype_macro_define(ot, "ARMATURE_OT_extrude");
+ RNA_enum_set(otmacro->ptr, "forked", 0);
+ 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", OPTYPE_UNDO|OPTYPE_REGISTER);
- otmacro=WM_operatortype_macro_define(ot, "ARMATURE_OT_extrude");
- RNA_enum_set(otmacro->ptr, "forked", 1);
- otmacro= WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate");
- RNA_enum_set(otmacro->ptr, "proportional", 0);
+ if(ot) {
+ otmacro=WM_operatortype_macro_define(ot, "ARMATURE_OT_extrude");
+ RNA_enum_set(otmacro->ptr, "forked", 1);
+ otmacro= WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate");
+ RNA_enum_set(otmacro->ptr, "proportional", 0);
+ }
}
void ED_keymap_armature(wmKeyConfig *keyconf)