remove null checks for macro definitions, if these fail then something is broken elsewhere, better not fail silently.
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -97,12 +97,9 @@ void ED_operatormacros_action(void)
|
||||
ot = WM_operatortype_append_macro("ACTION_OT_duplicate_move", "Duplicate",
|
||||
"Make a copy of all selected keyframes and move them",
|
||||
OPTYPE_UNDO | OPTYPE_REGISTER);
|
||||
if (ot) {
|
||||
WM_operatortype_macro_define(ot, "ACTION_OT_duplicate");
|
||||
otmacro = WM_operatortype_macro_define(ot, "TRANSFORM_OT_transform");
|
||||
RNA_enum_set(otmacro->ptr, "mode", TFM_TIME_DUPLICATE);
|
||||
}
|
||||
|
||||
WM_operatortype_macro_define(ot, "ACTION_OT_duplicate");
|
||||
otmacro = WM_operatortype_macro_define(ot, "TRANSFORM_OT_transform");
|
||||
RNA_enum_set(otmacro->ptr, "mode", TFM_TIME_DUPLICATE);
|
||||
}
|
||||
|
||||
/* ************************** registration - keymaps **********************************/
|
||||
|
||||
@@ -254,11 +254,9 @@ void ED_operatormacros_graph(void)
|
||||
ot = WM_operatortype_append_macro("GRAPH_OT_duplicate_move", "Duplicate",
|
||||
"Make a copy of all selected keyframes and move them",
|
||||
OPTYPE_UNDO | OPTYPE_REGISTER);
|
||||
if (ot) {
|
||||
WM_operatortype_macro_define(ot, "GRAPH_OT_duplicate");
|
||||
otmacro = WM_operatortype_macro_define(ot, "TRANSFORM_OT_transform");
|
||||
RNA_enum_set(otmacro->ptr, "mode", TFM_TIME_DUPLICATE);
|
||||
}
|
||||
WM_operatortype_macro_define(ot, "GRAPH_OT_duplicate");
|
||||
otmacro = WM_operatortype_macro_define(ot, "TRANSFORM_OT_transform");
|
||||
RNA_enum_set(otmacro->ptr, "mode", TFM_TIME_DUPLICATE);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user