diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2011-09-15 17:20:18 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2011-09-15 17:20:18 +0400 |
commit | 0eda51f2eabe24016efdc8f07825f1ba667cac33 (patch) | |
tree | 03d6f876da6b1256b8890b89db09b63952fa544f /source/blender/editors/armature | |
parent | 30293dc2ca8052ad0c7113c77365feca590f4d05 (diff) |
Fixing issues with i18n stuff:
- Make gettext stuff draw-time. so switching between languages
can happens without restart now.
- Added option to translate visible interface (menus, buttons, labels)
and tooltips. Now it's possible to have english UI and localized tooltips.
- Clean-up sources, do not use gettext stuff for things which can be
collected with RNA.
- Fix issues with windows 64bit and ru_RU locale on my desktop
(it was codepage issue).
- Added operator "Get Messages" which generates new text block with
with all strings collected from RNA.
- Changed script for updating blender.pot so now it appends
messages collected from rna to automatically gathered messages.
To update .pot you have to re-generate messages.txt using "Get Messages"
operator and then run update_pot script.
- Clean up old translation stuff which wasn't used and most probably
wouldn't be used.
- Return back "International Fonts" option, so if it's disabled, no
gettext lookups happens on draw.
- Merged read_homefile function back. No need in splitting it.
TODO:
- Custom fonts and font size.
Current font isn't nice at least for russian locale, it's
difficult to read it.
- Put references to messages.txt so gettext can merge translation when
name/description of some property changes.
Diffstat (limited to 'source/blender/editors/armature')
-rw-r--r-- | source/blender/editors/armature/armature_ops.c | 7 | ||||
-rw-r--r-- | source/blender/editors/armature/editarmature.c | 204 | ||||
-rw-r--r-- | source/blender/editors/armature/editarmature_sketch.c | 24 | ||||
-rw-r--r-- | source/blender/editors/armature/poseSlide.c | 40 | ||||
-rw-r--r-- | source/blender/editors/armature/poselib.c | 42 | ||||
-rw-r--r-- | source/blender/editors/armature/poseobject.c | 132 |
6 files changed, 220 insertions, 229 deletions
diff --git a/source/blender/editors/armature/armature_ops.c b/source/blender/editors/armature/armature_ops.c index 6369f9280e6..81ece9ddc9a 100644 --- a/source/blender/editors/armature/armature_ops.c +++ b/source/blender/editors/armature/armature_ops.c @@ -37,7 +37,6 @@ #include "BLI_math.h" #include "BLI_blenlib.h" -#include "BLF_api.h" #include "RNA_access.h" @@ -172,14 +171,14 @@ void ED_operatormacros_armature(void) wmOperatorType *ot; wmOperatorTypeMacro *otmacro; - ot= WM_operatortype_append_macro("ARMATURE_OT_duplicate_move", _("Duplicate"), OPTYPE_UNDO|OPTYPE_REGISTER); + ot= WM_operatortype_append_macro("ARMATURE_OT_duplicate_move", "Duplicate", 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); } - ot= WM_operatortype_append_macro("ARMATURE_OT_extrude_move", _("Extrude"), OPTYPE_UNDO|OPTYPE_REGISTER); + ot= WM_operatortype_append_macro("ARMATURE_OT_extrude_move", "Extrude", OPTYPE_UNDO|OPTYPE_REGISTER); if(ot) { otmacro=WM_operatortype_macro_define(ot, "ARMATURE_OT_extrude"); RNA_boolean_set(otmacro->ptr, "forked", 0); @@ -189,7 +188,7 @@ void ED_operatormacros_armature(void) // 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); + ot= WM_operatortype_append_macro("ARMATURE_OT_extrude_forked", "Extrude Forked", OPTYPE_UNDO|OPTYPE_REGISTER); if(ot) { otmacro=WM_operatortype_macro_define(ot, "ARMATURE_OT_extrude"); RNA_boolean_set(otmacro->ptr, "forked", 1); diff --git a/source/blender/editors/armature/editarmature.c b/source/blender/editors/armature/editarmature.c index e7ccd8a346b..a4b1e9a6e2c 100644 --- a/source/blender/editors/armature/editarmature.c +++ b/source/blender/editors/armature/editarmature.c @@ -51,8 +51,6 @@ #include "BLI_editVert.h" #include "BLI_ghash.h" -#include "BLF_api.h" - #include "BKE_animsys.h" #include "BKE_action.h" #include "BKE_armature.h" @@ -731,9 +729,9 @@ static int apply_armature_pose2bones_exec (bContext *C, wmOperator *op) void POSE_OT_armature_apply (wmOperatorType *ot) { /* identifiers */ - ot->name= _("Apply Pose as Rest Pose"); + ot->name= "Apply Pose as Rest Pose"; ot->idname= "POSE_OT_armature_apply"; - ot->description= _("Apply the current pose as the new rest pose"); + ot->description= "Apply the current pose as the new rest pose"; /* callbacks */ ot->exec= apply_armature_pose2bones_exec; @@ -782,9 +780,9 @@ static int pose_visual_transform_apply_exec (bContext *C, wmOperator *UNUSED(op) void POSE_OT_visual_transform_apply (wmOperatorType *ot) { /* identifiers */ - ot->name= _("Apply Visual Transform to Pose"); + ot->name= "Apply Visual Transform to Pose"; ot->idname= "POSE_OT_visual_transform_apply"; - ot->description= _("Apply final constrained position of pose bones to their transform."); + ot->description= "Apply final constrained position of pose bones to their transform."; /* callbacks */ ot->exec= pose_visual_transform_apply_exec; @@ -1245,9 +1243,9 @@ static int separate_armature_exec (bContext *C, wmOperator *UNUSED(op)) void ARMATURE_OT_separate (wmOperatorType *ot) { /* identifiers */ - ot->name= _("Separate Bones"); + ot->name= "Separate Bones"; ot->idname= "ARMATURE_OT_separate"; - ot->description= _("Isolate selected bones into a separate armature"); + ot->description= "Isolate selected bones into a separate armature"; /* callbacks */ ot->invoke= WM_operator_confirm; @@ -1469,9 +1467,9 @@ static int pose_select_linked_poll(bContext *C) void POSE_OT_select_linked(wmOperatorType *ot) { /* identifiers */ - ot->name= _("Select Connected"); + ot->name= "Select Connected"; ot->idname= "POSE_OT_select_linked"; - ot->description= _("Select bones related to selected ones by parent/child relationships"); + ot->description= "Select bones related to selected ones by parent/child relationships"; /* api callbacks */ ot->exec= NULL; @@ -1482,7 +1480,7 @@ void POSE_OT_select_linked(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* props */ - RNA_def_boolean(ot->srna, "extend", FALSE, _("Extend"), _("Extend selection instead of deselecting everything first.")); + RNA_def_boolean(ot->srna, "extend", FALSE, "Extend", "Extend selection instead of deselecting everything first."); } /* **************** END Posemode stuff ********************** */ @@ -1563,9 +1561,9 @@ static int armature_select_linked_poll(bContext *C) void ARMATURE_OT_select_linked(wmOperatorType *ot) { /* identifiers */ - ot->name= _("Select Connected"); + ot->name= "Select Connected"; ot->idname= "ARMATURE_OT_select_linked"; - ot->description= _("Select bones related to selected ones by parent/child relationships"); + ot->description= "Select bones related to selected ones by parent/child relationships"; /* api callbacks */ ot->exec= NULL; @@ -1576,7 +1574,7 @@ void ARMATURE_OT_select_linked(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties s*/ - RNA_def_boolean(ot->srna, "extend", FALSE, _("Extend"), _("Extend selection instead of deselecting everything first.")); + RNA_def_boolean(ot->srna, "extend", FALSE, "Extend", "Extend selection instead of deselecting everything first."); } /* does bones and points */ @@ -1748,9 +1746,9 @@ static int armature_delete_selected_exec(bContext *C, wmOperator *UNUSED(op)) void ARMATURE_OT_delete(wmOperatorType *ot) { /* identifiers */ - ot->name= _("Delete Selected Bone(s)"); + ot->name= "Delete Selected Bone(s)"; ot->idname= "ARMATURE_OT_delete"; - ot->description= _("Remove selected bones from the armature"); + ot->description= "Remove selected bones from the armature"; /* api callbacks */ ot->invoke = WM_operator_confirm; @@ -1997,12 +1995,12 @@ float ED_rollBoneToVector(EditBone *bone, const float align_axis[3], const short static EnumPropertyItem prop_calc_roll_types[] = { - {0, "X", 0, N_("X Axis"), ""}, - {1, "Y", 0, N_("Y Axis"), ""}, - {2, "Z", 0, N_("Z Axis"), ""}, - {5, "ACTIVE", 0, N_("Active Bone"), ""}, - {6, "VIEW", 0, N_("View Axis"), ""}, - {7, "CURSOR", 0, N_("Cursor"), ""}, + {0, "X", 0, "X Axis", ""}, + {1, "Y", 0, "Y Axis", ""}, + {2, "Z", 0, "Z Axis", ""}, + {5, "ACTIVE", 0, "Active Bone", ""}, + {6, "VIEW", 0, "View Axis", ""}, + {7, "CURSOR", 0, "Cursor", ""}, {0, NULL, 0, NULL, NULL} }; @@ -2103,9 +2101,9 @@ static int armature_calc_roll_exec(bContext *C, wmOperator *op) void ARMATURE_OT_calculate_roll(wmOperatorType *ot) { /* identifiers */ - ot->name= _("Recalculate Roll"); + ot->name= "Recalculate Roll"; ot->idname= "ARMATURE_OT_calculate_roll"; - ot->description= _("Automatically fix alignment of select bones' axes"); + ot->description= "Automatically fix alignment of select bones' axes"; /* api callbacks */ ot->invoke = WM_menu_invoke; @@ -2116,9 +2114,9 @@ void ARMATURE_OT_calculate_roll(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - ot->prop= RNA_def_enum(ot->srna, "type", RNA_enum_items_gettexted(prop_calc_roll_types), 0, _("Type"), ""); - RNA_def_boolean(ot->srna, "axis_flip", 0, _("Flip Axis"), _("Negate the alignment axis.")); - RNA_def_boolean(ot->srna, "axis_only", 0, _("Shortest Rotation"), _("Ignore the axis direction, use the shortest rotation to align.")); + ot->prop= RNA_def_enum(ot->srna, "type", prop_calc_roll_types, 0, "Type", ""); + RNA_def_boolean(ot->srna, "axis_flip", 0, "Flip Axis", "Negate the alignment axis."); + RNA_def_boolean(ot->srna, "axis_only", 0, "Shortest Rotation", "Ignore the axis direction, use the shortest rotation to align."); } /* **************** undo for armatures ************** */ @@ -2410,9 +2408,9 @@ static int armature_click_extrude_invoke(bContext *C, wmOperator *op, wmEvent *e void ARMATURE_OT_click_extrude(wmOperatorType *ot) { /* identifiers */ - ot->name= _("Click-Extrude"); + ot->name= "Click-Extrude"; ot->idname= "ARMATURE_OT_click_extrude"; - ot->description= _("Create a new bone going from the last selected joint to the mouse position"); + ot->description= "Create a new bone going from the last selected joint to the mouse position"; /* api callbacks */ ot->invoke = armature_click_extrude_invoke; @@ -2679,9 +2677,9 @@ static int armature_duplicate_selected_exec(bContext *C, wmOperator *UNUSED(op)) void ARMATURE_OT_duplicate(wmOperatorType *ot) { /* identifiers */ - ot->name= _("Duplicate Selected Bone(s)"); + ot->name= "Duplicate Selected Bone(s)"; ot->idname= "ARMATURE_OT_duplicate"; - ot->description= _("Make copies of the selected bones within the same armature"); + ot->description= "Make copies of the selected bones within the same armature"; /* api callbacks */ ot->exec = armature_duplicate_selected_exec; @@ -2953,9 +2951,9 @@ static int armature_fill_bones_exec (bContext *C, wmOperator *op) void ARMATURE_OT_fill (wmOperatorType *ot) { /* identifiers */ - ot->name= _("Fill Between Joints"); + ot->name= "Fill Between Joints"; ot->idname= "ARMATURE_OT_fill"; - ot->description= _("Add bone between selected joint(s) and/or 3D-Cursor"); + ot->description= "Add bone between selected joint(s) and/or 3D-Cursor"; /* callbacks */ ot->exec= armature_fill_bones_exec; @@ -3132,14 +3130,14 @@ static int armature_merge_exec (bContext *C, wmOperator *op) void ARMATURE_OT_merge (wmOperatorType *ot) { static EnumPropertyItem merge_types[] = { - {1, "WITHIN_CHAIN", 0, N_("Within Chains"), ""}, + {1, "WITHIN_CHAIN", 0, "Within Chains", ""}, {0, NULL, 0, NULL, NULL} }; /* identifiers */ - ot->name= _("Merge Bones"); + ot->name= "Merge Bones"; ot->idname= "ARMATURE_OT_merge"; - ot->description= _("Merge continuous chains of selected bones"); + ot->description= "Merge continuous chains of selected bones"; /* callbacks */ ot->invoke= WM_menu_invoke; @@ -3150,7 +3148,7 @@ void ARMATURE_OT_merge (wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - ot->prop= RNA_def_enum(ot->srna, "type", RNA_enum_items_gettexted(merge_types), 0, _("Type"), ""); + ot->prop= RNA_def_enum(ot->srna, "type", merge_types, 0, "Type", ""); } /* ************** END Add/Remove stuff in editmode ************ */ @@ -3186,9 +3184,9 @@ static int armature_hide_exec(bContext *C, wmOperator *op) void ARMATURE_OT_hide(wmOperatorType *ot) { /* identifiers */ - ot->name= _("Hide Selected Bones"); + ot->name= "Hide Selected Bones"; ot->idname= "ARMATURE_OT_hide"; - ot->description= _("Tag selected bones to not be visible in Edit Mode"); + ot->description= "Tag selected bones to not be visible in Edit Mode"; /* api callbacks */ ot->exec= armature_hide_exec; @@ -3198,7 +3196,7 @@ void ARMATURE_OT_hide(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* props */ - RNA_def_boolean(ot->srna, "unselected", 0, _("Unselected"), _("Hide unselected rather than selected.")); + RNA_def_boolean(ot->srna, "unselected", 0, "Unselected", "Hide unselected rather than selected."); } static int armature_reveal_exec(bContext *C, wmOperator *UNUSED(op)) @@ -3226,9 +3224,9 @@ static int armature_reveal_exec(bContext *C, wmOperator *UNUSED(op)) void ARMATURE_OT_reveal(wmOperatorType *ot) { /* identifiers */ - ot->name= _("Reveal Bones"); + ot->name= "Reveal Bones"; ot->idname= "ARMATURE_OT_reveal"; - ot->description= _("Unhide all bones that have been tagged to be hidden in Edit Mode"); + ot->description= "Unhide all bones that have been tagged to be hidden in Edit Mode"; /* api callbacks */ ot->exec= armature_reveal_exec; @@ -3435,9 +3433,9 @@ static int armature_extrude_exec(bContext *C, wmOperator *op) void ARMATURE_OT_extrude(wmOperatorType *ot) { /* identifiers */ - ot->name= _("Extrude"); + ot->name= "Extrude"; ot->idname= "ARMATURE_OT_extrude"; - ot->description= _("Create new bones from the selected joints"); + ot->description= "Create new bones from the selected joints"; /* api callbacks */ ot->exec= armature_extrude_exec; @@ -3447,7 +3445,7 @@ void ARMATURE_OT_extrude(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* props */ - RNA_def_boolean(ot->srna, "forked", 0, _("Forked"), ""); + RNA_def_boolean(ot->srna, "forked", 0, "Forked", ""); } /* ********************** Bone Add ********************/ @@ -3498,9 +3496,9 @@ static int armature_bone_primitive_add_exec(bContext *C, wmOperator *op) void ARMATURE_OT_bone_primitive_add(wmOperatorType *ot) { /* identifiers */ - ot->name= _("Add Bone"); + ot->name= "Add Bone"; ot->idname= "ARMATURE_OT_bone_primitive_add"; - ot->description= _("Add a new bone located at the 3D-Cursor"); + ot->description= "Add a new bone located at the 3D-Cursor"; /* api callbacks */ ot->exec = armature_bone_primitive_add_exec; @@ -3509,7 +3507,7 @@ void ARMATURE_OT_bone_primitive_add(wmOperatorType *ot) /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; - RNA_def_string(ot->srna, "name", "Bone", 32, _("Name"), _("Name of the newly created bone")); + RNA_def_string(ot->srna, "name", "Bone", 32, "Name", "Name of the newly created bone"); } @@ -3588,9 +3586,9 @@ static int armature_subdivide_exec(bContext *C, wmOperator *op) void ARMATURE_OT_subdivide(wmOperatorType *ot) { /* identifiers */ - ot->name= _("Subdivide Multi"); + ot->name= "Subdivide Multi"; ot->idname= "ARMATURE_OT_subdivide"; - ot->description= _("Break selected bones into chains of smaller bones"); + ot->description= "Break selected bones into chains of smaller bones"; /* api callbacks */ ot->exec = armature_subdivide_exec; @@ -3600,7 +3598,7 @@ void ARMATURE_OT_subdivide(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* Properties */ - RNA_def_int(ot->srna, "number_cuts", 1, 1, INT_MAX, _("Number of Cuts"), "", 1, 10); + RNA_def_int(ot->srna, "number_cuts", 1, 1, INT_MAX, "Number of Cuts", "", 1, 10); } /* ----------- */ @@ -3690,9 +3688,9 @@ static int armature_switch_direction_exec(bContext *C, wmOperator *UNUSED(op)) void ARMATURE_OT_switch_direction(wmOperatorType *ot) { /* identifiers */ - ot->name= _("Switch Direction"); + ot->name= "Switch Direction"; ot->idname= "ARMATURE_OT_switch_direction"; - ot->description= _("Change the direction that a chain of bones points in (head <-> tail swap)"); + ot->description= "Change the direction that a chain of bones points in (head <-> tail swap)"; /* api callbacks */ ot->exec = armature_switch_direction_exec; @@ -3764,8 +3762,8 @@ static void bone_connect_to_new_parent(ListBase *edbo, EditBone *selbone, EditBo } static EnumPropertyItem prop_editarm_make_parent_types[] = { - {ARM_PAR_CONNECT, "CONNECTED", 0, N_("Connected"), ""}, - {ARM_PAR_OFFSET, "OFFSET", 0, N_("Keep Offset"), ""}, + {ARM_PAR_CONNECT, "CONNECTED", 0, "Connected", ""}, + {ARM_PAR_OFFSET, "OFFSET", 0, "Keep Offset", ""}, {0, NULL, 0, NULL, NULL} }; @@ -3865,9 +3863,9 @@ static int armature_parent_set_invoke(bContext *C, wmOperator *UNUSED(op), wmEve void ARMATURE_OT_parent_set(wmOperatorType *ot) { /* identifiers */ - ot->name= _("Make Parent"); + ot->name= "Make Parent"; ot->idname= "ARMATURE_OT_parent_set"; - ot->description= _("Set the active bone as the parent of the selected bones"); + ot->description= "Set the active bone as the parent of the selected bones"; /* api callbacks */ ot->invoke = armature_parent_set_invoke; @@ -3877,12 +3875,12 @@ void ARMATURE_OT_parent_set(wmOperatorType *ot) /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; - RNA_def_enum(ot->srna, "type", RNA_enum_items_gettexted(prop_editarm_make_parent_types), 0, _("ParentType"), _("Type of parenting")); + RNA_def_enum(ot->srna, "type", prop_editarm_make_parent_types, 0, "ParentType", "Type of parenting"); } static EnumPropertyItem prop_editarm_clear_parent_types[] = { - {1, "CLEAR", 0, N_("Clear Parent"), ""}, - {2, "DISCONNECT", 0, N_("Disconnect Bone"), ""}, + {1, "CLEAR", 0, "Clear Parent", ""}, + {2, "DISCONNECT", 0, "Disconnect Bone", ""}, {0, NULL, 0, NULL, NULL} }; @@ -3919,9 +3917,9 @@ static int armature_parent_clear_exec(bContext *C, wmOperator *op) void ARMATURE_OT_parent_clear(wmOperatorType *ot) { /* identifiers */ - ot->name= _("Clear Parent"); + ot->name= "Clear Parent"; ot->idname= "ARMATURE_OT_parent_clear"; - ot->description= _("Remove the parent-child relationship between selected bones and their parents"); + ot->description= "Remove the parent-child relationship between selected bones and their parents"; /* api callbacks */ ot->invoke = WM_menu_invoke; @@ -3931,7 +3929,7 @@ void ARMATURE_OT_parent_clear(wmOperatorType *ot) /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; - ot->prop= RNA_def_enum(ot->srna, "type", RNA_enum_items_gettexted(prop_editarm_clear_parent_types), 0, _("ClearType"), _("What way to clear parenting")); + ot->prop= RNA_def_enum(ot->srna, "type", prop_editarm_clear_parent_types, 0, "ClearType", "What way to clear parenting"); } /* **************** Selections ******************/ @@ -3956,9 +3954,9 @@ static int armature_select_inverse_exec(bContext *C, wmOperator *UNUSED(op)) void ARMATURE_OT_select_inverse(wmOperatorType *ot) { /* identifiers */ - ot->name= _("Select Inverse"); + ot->name= "Select Inverse"; ot->idname= "ARMATURE_OT_select_inverse"; - ot->description= _("Flip the selection status of bones (selected -> unselected, unselected -> selected)"); + ot->description= "Flip the selection status of bones (selected -> unselected, unselected -> selected)"; /* api callbacks */ ot->exec= armature_select_inverse_exec; @@ -4016,9 +4014,9 @@ static int armature_de_select_all_exec(bContext *C, wmOperator *op) void ARMATURE_OT_select_all(wmOperatorType *ot) { /* identifiers */ - ot->name= _("Select or Deselect All"); + ot->name= "Select or Deselect All"; ot->idname= "ARMATURE_OT_select_all"; - ot->description= _("Toggle selection status of all bones"); + ot->description= "Toggle selection status of all bones"; /* api callbacks */ ot->exec= armature_de_select_all_exec; @@ -4091,15 +4089,15 @@ static int armature_select_hierarchy_exec(bContext *C, wmOperator *op) void ARMATURE_OT_select_hierarchy(wmOperatorType *ot) { static EnumPropertyItem direction_items[]= { - {BONE_SELECT_PARENT, "PARENT", 0, N_("Select Parent"), ""}, - {BONE_SELECT_CHILD, "CHILD", 0, N_("Select Child"), ""}, + {BONE_SELECT_PARENT, "PARENT", 0, "Select Parent", ""}, + {BONE_SELECT_CHILD, "CHILD", 0, "Select Child", ""}, {0, NULL, 0, NULL, NULL} }; /* identifiers */ - ot->name= _("Select Hierarchy"); + ot->name= "Select Hierarchy"; ot->idname= "ARMATURE_OT_select_hierarchy"; - ot->description= _("Select immediate parent/children of selected bones"); + ot->description= "Select immediate parent/children of selected bones"; /* api callbacks */ ot->exec= armature_select_hierarchy_exec; @@ -4109,9 +4107,9 @@ void ARMATURE_OT_select_hierarchy(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* props */ - RNA_def_enum(ot->srna, "direction", RNA_enum_items_gettexted(direction_items), - BONE_SELECT_PARENT, _("Direction"), ""); - RNA_def_boolean(ot->srna, "extend", 0, _("Add to Selection"), ""); + RNA_def_enum(ot->srna, "direction", direction_items, + BONE_SELECT_PARENT, "Direction", ""); + RNA_def_boolean(ot->srna, "extend", 0, "Add to Selection", ""); } /* ***************** EditBone Alignment ********************* */ @@ -4236,9 +4234,9 @@ static int armature_align_bones_exec(bContext *C, wmOperator *op) void ARMATURE_OT_align(wmOperatorType *ot) { /* identifiers */ - ot->name= _("Align Bones"); + ot->name= "Align Bones"; ot->idname= "ARMATURE_OT_align"; - ot->description= _("Align selected bones to the active bone (or to their parent)"); + ot->description= "Align selected bones to the active bone (or to their parent)"; /* api callbacks */ ot->invoke = WM_operator_confirm; @@ -4951,9 +4949,9 @@ static int pose_clear_scale_exec(bContext *C, wmOperator *op) void POSE_OT_scale_clear(wmOperatorType *ot) { /* identifiers */ - ot->name= _("Clear Pose Scale"); + ot->name= "Clear Pose Scale"; ot->idname= "POSE_OT_scale_clear"; - ot->description = _("Reset scaling of selected bones to their default values"); + ot->description = "Reset scaling of selected bones to their default values"; /* api callbacks */ ot->exec = pose_clear_scale_exec; @@ -4972,9 +4970,9 @@ static int pose_clear_rot_exec(bContext *C, wmOperator *op) void POSE_OT_rot_clear(wmOperatorType *ot) { /* identifiers */ - ot->name= _("Clear Pose Rotation"); + ot->name= "Clear Pose Rotation"; ot->idname= "POSE_OT_rot_clear"; - ot->description = _("Reset rotations of selected bones to their default values"); + ot->description = "Reset rotations of selected bones to their default values"; /* api callbacks */ ot->exec = pose_clear_rot_exec; @@ -4993,9 +4991,9 @@ static int pose_clear_loc_exec(bContext *C, wmOperator *op) void POSE_OT_loc_clear(wmOperatorType *ot) { /* identifiers */ - ot->name= _("Clear Pose Location"); + ot->name= "Clear Pose Location"; ot->idname= "POSE_OT_loc_clear"; - ot->description = _("Reset locations of selected bones to their default values"); + ot->description = "Reset locations of selected bones to their default values"; /* api callbacks */ ot->exec = pose_clear_loc_exec; @@ -5014,9 +5012,9 @@ static int pose_clear_transforms_exec(bContext *C, wmOperator *op) void POSE_OT_transforms_clear(wmOperatorType *ot) { /* identifiers */ - ot->name= _("Clear Pose Transforms"); + ot->name= "Clear Pose Transforms"; ot->idname= "POSE_OT_transforms_clear"; - ot->description = _("Reset location, rotation, and scaling of selected bones to their default values"); + ot->description = "Reset location, rotation, and scaling of selected bones to their default values"; /* api callbacks */ ot->exec = pose_clear_transforms_exec; @@ -5048,9 +5046,9 @@ static int pose_select_inverse_exec(bContext *C, wmOperator *UNUSED(op)) void POSE_OT_select_inverse(wmOperatorType *ot) { /* identifiers */ - ot->name= _("Select Inverse"); + ot->name= "Select Inverse"; ot->idname= "POSE_OT_select_inverse"; - ot->description= _("Flip the selection status of bones (selected -> unselected, unselected -> selected)"); + ot->description= "Flip the selection status of bones (selected -> unselected, unselected -> selected)"; /* api callbacks */ ot->exec= pose_select_inverse_exec; @@ -5099,9 +5097,9 @@ static int pose_de_select_all_exec(bContext *C, wmOperator *op) void POSE_OT_select_all(wmOperatorType *ot) { /* identifiers */ - ot->name= _("Select or Deselect All"); + ot->name= "Select or Deselect All"; ot->idname= "POSE_OT_select_all"; - ot->description= _("Toggle selection status of all bones"); + ot->description= "Toggle selection status of all bones"; /* api callbacks */ ot->exec= pose_de_select_all_exec; @@ -5143,9 +5141,9 @@ static int pose_select_parent_exec(bContext *C, wmOperator *UNUSED(op)) void POSE_OT_select_parent(wmOperatorType *ot) { /* identifiers */ - ot->name= _("Select Parent Bone"); + ot->name= "Select Parent Bone"; ot->idname= "POSE_OT_select_parent"; - ot->description= _("Select bones that are parents of the currently selected bones"); + ot->description= "Select bones that are parents of the currently selected bones"; /* api callbacks */ ot->exec= pose_select_parent_exec; @@ -5208,9 +5206,9 @@ static int pose_hide_exec(bContext *C, wmOperator *op) void POSE_OT_hide(wmOperatorType *ot) { /* identifiers */ - ot->name= _("Hide Selected"); + ot->name= "Hide Selected"; ot->idname= "POSE_OT_hide"; - ot->description= _("Tag selected bones to not be visible in Pose Mode"); + ot->description= "Tag selected bones to not be visible in Pose Mode"; /* api callbacks */ ot->exec= pose_hide_exec; @@ -5220,7 +5218,7 @@ void POSE_OT_hide(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* props */ - RNA_def_boolean(ot->srna, "unselected", 0, _("Unselected"), ""); + RNA_def_boolean(ot->srna, "unselected", 0, "Unselected", ""); } static int show_pose_bone_cb(Object *ob, Bone *bone, void *UNUSED(ptr)) @@ -5254,9 +5252,9 @@ static int pose_reveal_exec(bContext *C, wmOperator *UNUSED(op)) void POSE_OT_reveal(wmOperatorType *ot) { /* identifiers */ - ot->name= _("Reveal Selected"); + ot->name= "Reveal Selected"; ot->idname= "POSE_OT_reveal"; - ot->description= _("Unhide all bones that have been tagged to be hidden in Pose Mode"); + ot->description= "Unhide all bones that have been tagged to be hidden in Pose Mode"; /* api callbacks */ ot->exec= pose_reveal_exec; @@ -5471,9 +5469,9 @@ static int armature_flip_names_exec (bContext *C, wmOperator *UNUSED(op)) void ARMATURE_OT_flip_names (wmOperatorType *ot) { /* identifiers */ - ot->name= _("Flip Names"); + ot->name= "Flip Names"; ot->idname= "ARMATURE_OT_flip_names"; - ot->description= _("Flips (and corrects) the axis suffixes of the names of selected bones"); + ot->description= "Flips (and corrects) the axis suffixes of the names of selected bones"; /* api callbacks */ ot->exec= armature_flip_names_exec; @@ -5517,15 +5515,15 @@ static int armature_autoside_names_exec (bContext *C, wmOperator *op) void ARMATURE_OT_autoside_names (wmOperatorType *ot) { static EnumPropertyItem axis_items[]= { - {0, "XAXIS", 0, N_("X-Axis"), N_("Left/Right")}, - {1, "YAXIS", 0, N_("Y-Axis"), N_("Front/Back")}, - {2, "ZAXIS", 0, N_("Z-Axis"), N_("Top/Bottom")}, + {0, "XAXIS", 0, "X-Axis", "Left/Right"}, + {1, "YAXIS", 0, "Y-Axis", "Front/Back"}, + {2, "ZAXIS", 0, "Z-Axis", "Top/Bottom"}, {0, NULL, 0, NULL, NULL}}; /* identifiers */ - ot->name= _("AutoName by Axis"); + ot->name= "AutoName by Axis"; ot->idname= "ARMATURE_OT_autoside_names"; - ot->description= _("Automatically renames the selected bones according to which side of the target axis they fall on"); + ot->description= "Automatically renames the selected bones according to which side of the target axis they fall on"; /* api callbacks */ ot->invoke= WM_menu_invoke; @@ -5536,7 +5534,7 @@ void ARMATURE_OT_autoside_names (wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* settings */ - ot->prop= RNA_def_enum(ot->srna, "type", axis_items, 0, _("Axis"), _("Axis tag names with.")); + ot->prop= RNA_def_enum(ot->srna, "type", axis_items, 0, "Axis", "Axis tag names with."); } diff --git a/source/blender/editors/armature/editarmature_sketch.c b/source/blender/editors/armature/editarmature_sketch.c index b238ae3c0c0..bcd9d746a44 100644 --- a/source/blender/editors/armature/editarmature_sketch.c +++ b/source/blender/editors/armature/editarmature_sketch.c @@ -44,8 +44,6 @@ #include "BLI_graph.h" #include "BLI_ghash.h" -#include "BLF_api.h" - #include "BKE_context.h" #include "BKE_sketch.h" @@ -2843,7 +2841,7 @@ int ED_operator_sketch_mode(const bContext *C) void SKETCH_OT_delete(wmOperatorType *ot) { /* identifiers */ - ot->name= _("delete"); + ot->name= "delete"; ot->idname= "SKETCH_OT_delete"; /* api callbacks */ @@ -2858,7 +2856,7 @@ void SKETCH_OT_delete(wmOperatorType *ot) void SKETCH_OT_select(wmOperatorType *ot) { /* identifiers */ - ot->name= _("select"); + ot->name= "select"; ot->idname= "SKETCH_OT_select"; /* api callbacks */ @@ -2873,7 +2871,7 @@ void SKETCH_OT_select(wmOperatorType *ot) void SKETCH_OT_cancel_stroke(wmOperatorType *ot) { /* identifiers */ - ot->name= _("cancel stroke"); + ot->name= "cancel stroke"; ot->idname= "SKETCH_OT_cancel_stroke"; /* api callbacks */ @@ -2888,7 +2886,7 @@ void SKETCH_OT_cancel_stroke(wmOperatorType *ot) void SKETCH_OT_convert(wmOperatorType *ot) { /* identifiers */ - ot->name= _("convert"); + ot->name= "convert"; ot->idname= "SKETCH_OT_convert"; /* api callbacks */ @@ -2903,7 +2901,7 @@ void SKETCH_OT_convert(wmOperatorType *ot) void SKETCH_OT_finish_stroke(wmOperatorType *ot) { /* identifiers */ - ot->name= _("end stroke"); + ot->name= "end stroke"; ot->idname= "SKETCH_OT_finish_stroke"; /* api callbacks */ @@ -2918,7 +2916,7 @@ void SKETCH_OT_finish_stroke(wmOperatorType *ot) void SKETCH_OT_draw_preview(wmOperatorType *ot) { /* identifiers */ - ot->name= _("draw preview"); + ot->name= "draw preview"; ot->idname= "SKETCH_OT_draw_preview"; /* api callbacks */ @@ -2926,7 +2924,7 @@ void SKETCH_OT_draw_preview(wmOperatorType *ot) ot->poll= ED_operator_sketch_mode_active_stroke; - RNA_def_boolean(ot->srna, "snap", 0, _("Snap"), ""); + RNA_def_boolean(ot->srna, "snap", 0, "Snap", ""); /* flags */ // ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; @@ -2935,7 +2933,7 @@ void SKETCH_OT_draw_preview(wmOperatorType *ot) void SKETCH_OT_draw_stroke(wmOperatorType *ot) { /* identifiers */ - ot->name= _("draw stroke"); + ot->name= "draw stroke"; ot->idname= "SKETCH_OT_draw_stroke"; /* api callbacks */ @@ -2945,7 +2943,7 @@ void SKETCH_OT_draw_stroke(wmOperatorType *ot) ot->poll= (int (*)(bContext *))ED_operator_sketch_mode; - RNA_def_boolean(ot->srna, "snap", 0, _("Snap"), ""); + RNA_def_boolean(ot->srna, "snap", 0, "Snap", ""); /* flags */ ot->flag= OPTYPE_BLOCKING; // OPTYPE_REGISTER|OPTYPE_UNDO @@ -2954,7 +2952,7 @@ void SKETCH_OT_draw_stroke(wmOperatorType *ot) void SKETCH_OT_gesture(wmOperatorType *ot) { /* identifiers */ - ot->name= _("gesture"); + ot->name= "gesture"; ot->idname= "SKETCH_OT_gesture"; /* api callbacks */ @@ -2964,7 +2962,7 @@ void SKETCH_OT_gesture(wmOperatorType *ot) ot->poll= ED_operator_sketch_mode_gesture; - RNA_def_boolean(ot->srna, "snap", 0, _("Snap"), ""); + RNA_def_boolean(ot->srna, "snap", 0, "Snap", ""); /* flags */ ot->flag= OPTYPE_BLOCKING; // OPTYPE_UNDO diff --git a/source/blender/editors/armature/poseSlide.c b/source/blender/editors/armature/poseSlide.c index c6927de0f87..16888908bab 100644 --- a/source/blender/editors/armature/poseSlide.c +++ b/source/blender/editors/armature/poseSlide.c @@ -43,8 +43,6 @@ #include "BLI_dlrbTree.h" #include "BLI_utildefines.h" -#include "BLF_api.h" - #include "DNA_anim_types.h" #include "DNA_armature_types.h" #include "DNA_object_types.h" @@ -720,9 +718,9 @@ static int pose_slide_exec_common (bContext *C, wmOperator *op, tPoseSlideOp *ps /* common code for defining RNA properties */ static void pose_slide_opdef_properties (wmOperatorType *ot) { - RNA_def_int(ot->srna, "prev_frame", 0, MINAFRAME, MAXFRAME, _("Previous Keyframe"), _("Frame number of keyframe immediately before the current frame."), 0, 50); - RNA_def_int(ot->srna, "next_frame", 0, MINAFRAME, MAXFRAME, _("Next Keyframe"), _("Frame number of keyframe immediately after the current frame."), 0, 50); - RNA_def_float_percentage(ot->srna, "percentage", 0.5f, 0.0f, 1.0f, _("Percentage"), _("Weighting factor for the sliding operation"), 0.3, 0.7); + RNA_def_int(ot->srna, "prev_frame", 0, MINAFRAME, MAXFRAME, "Previous Keyframe", "Frame number of keyframe immediately before the current frame.", 0, 50); + RNA_def_int(ot->srna, "next_frame", 0, MINAFRAME, MAXFRAME, "Next Keyframe", "Frame number of keyframe immediately after the current frame.", 0, 50); + RNA_def_float_percentage(ot->srna, "percentage", 0.5f, 0.0f, 1.0f, "Percentage", "Weighting factor for the sliding operation", 0.3, 0.7); } /* ------------------------------------ */ @@ -764,9 +762,9 @@ static int pose_slide_push_exec (bContext *C, wmOperator *op) void POSE_OT_push (wmOperatorType *ot) { /* identifiers */ - ot->name= _("Push Pose"); + ot->name= "Push Pose"; ot->idname= "POSE_OT_push"; - ot->description= _("Exaggerate the current pose"); + ot->description= "Exaggerate the current pose"; /* callbacks */ ot->exec= pose_slide_push_exec; @@ -821,9 +819,9 @@ static int pose_slide_relax_exec (bContext *C, wmOperator *op) void POSE_OT_relax (wmOperatorType *ot) { /* identifiers */ - ot->name= _("Relax Pose"); + ot->name= "Relax Pose"; ot->idname= "POSE_OT_relax"; - ot->description= _("Make the current pose more similar to its surrounding ones"); + ot->description= "Make the current pose more similar to its surrounding ones"; /* callbacks */ ot->exec= pose_slide_relax_exec; @@ -878,9 +876,9 @@ static int pose_slide_breakdown_exec (bContext *C, wmOperator *op) void POSE_OT_breakdown (wmOperatorType *ot) { /* identifiers */ - ot->name= _("Pose Breakdowner"); + ot->name= "Pose Breakdowner"; ot->idname= "POSE_OT_breakdown"; - ot->description= _("Create a suitable breakdown pose on the current frame"); + ot->description= "Create a suitable breakdown pose on the current frame"; /* callbacks */ ot->exec= pose_slide_breakdown_exec; @@ -1233,18 +1231,18 @@ static int pose_propagate_exec (bContext *C, wmOperator *op) void POSE_OT_propagate (wmOperatorType *ot) { static EnumPropertyItem terminate_items[]= { - {POSE_PROPAGATE_SMART_HOLDS, "WHILE_HELD", 0, N_("While Held"), N_("Propagate pose to all keyframes after current frame that don't change (Default behaviour)")}, - {POSE_PROPAGATE_NEXT_KEY, "NEXT_KEY", 0, N_("To Next Keyframe"), N_("Propagate pose to first keyframe following the current frame only")}, - {POSE_PROPAGATE_LAST_KEY, "LAST_KEY", 0, N_("To Last Keyframe"), N_("Propagate pose to the last keyframe only (i.e. making action cyclic)")}, - {POSE_PROPAGATE_BEFORE_FRAME, "BEFORE_FRAME", 0, N_("Before Frame"), N_("Propagate pose to all keyframes between current frame and 'Frame' property")}, - {POSE_PROPAGATE_BEFORE_END, "BEFORE_END", 0, N_("Before Last Keyframe"), N_("Propagate pose to all keyframes from current frame until no more are found")}, - {POSE_PROPAGATE_SELECTED_MARKERS, "SELECTED_MARKERS", 0, N_("On Selected Markers"), N_("Propagate pose to all keyframes occurring on frames with Scene Markers after the current frame")}, + {POSE_PROPAGATE_SMART_HOLDS, "WHILE_HELD", 0, "While Held", "Propagate pose to all keyframes after current frame that don't change (Default behaviour)"}, + {POSE_PROPAGATE_NEXT_KEY, "NEXT_KEY", 0, "To Next Keyframe", "Propagate pose to first keyframe following the current frame only"}, + {POSE_PROPAGATE_LAST_KEY, "LAST_KEY", 0, "To Last Keyframe", "Propagate pose to the last keyframe only (i.e. making action cyclic)"}, + {POSE_PROPAGATE_BEFORE_FRAME, "BEFORE_FRAME", 0, "Before Frame", "Propagate pose to all keyframes between current frame and 'Frame' property"}, + {POSE_PROPAGATE_BEFORE_END, "BEFORE_END", 0, "Before Last Keyframe", "Propagate pose to all keyframes from current frame until no more are found"}, + {POSE_PROPAGATE_SELECTED_MARKERS, "SELECTED_MARKERS", 0, "On Selected Markers", "Propagate pose to all keyframes occurring on frames with Scene Markers after the current frame"}, {0, NULL, 0, NULL, NULL}}; /* identifiers */ - ot->name= _("Propagate Pose"); + ot->name= "Propagate Pose"; ot->idname= "POSE_OT_propagate"; - ot->description= _("Copy selected aspects of the current pose to subsequent poses already keyframed"); + ot->description= "Copy selected aspects of the current pose to subsequent poses already keyframed"; /* callbacks */ ot->exec= pose_propagate_exec; @@ -1255,8 +1253,8 @@ void POSE_OT_propagate (wmOperatorType *ot) /* properties */ // TODO: add "fade out" control for tapering off amount of propagation as time goes by? - ot->prop= RNA_def_enum(ot->srna, "mode", RNA_enum_items_gettexted(terminate_items), POSE_PROPAGATE_SMART_HOLDS, _("Terminate Mode"), _("Method used to determine when to stop propagating pose to keyframes")); - RNA_def_float(ot->srna, "end_frame", 250.0, FLT_MIN, FLT_MAX, _("End Frame"), _("Frame to stop propagating frames to (for 'Before Frame' mode)"), 1.0, 250.0); + ot->prop= RNA_def_enum(ot->srna, "mode", terminate_items, POSE_PROPAGATE_SMART_HOLDS, "Terminate Mode", "Method used to determine when to stop propagating pose to keyframes"); + RNA_def_float(ot->srna, "end_frame", 250.0, FLT_MIN, FLT_MAX, "End Frame", "Frame to stop propagating frames to (for 'Before Frame' mode)", 1.0, 250.0); } /* **************************************************** */ diff --git a/source/blender/editors/armature/poselib.c b/source/blender/editors/armature/poselib.c index 61435602446..81da047df36 100644 --- a/source/blender/editors/armature/poselib.c +++ b/source/blender/editors/armature/poselib.c @@ -234,9 +234,9 @@ static int poselib_new_exec (bContext *C, wmOperator *UNUSED(op)) void POSELIB_OT_new (wmOperatorType *ot) { /* identifiers */ - ot->name = _("New Pose Library"); + ot->name = "New Pose Library"; ot->idname = "POSELIB_OT_new"; - ot->description = _("Add New Pose Library to active Object"); + ot->description = "Add New Pose Library to active Object"; /* callbacks */ ot->exec = poselib_new_exec; @@ -269,9 +269,9 @@ static int poselib_unlink_exec (bContext *C, wmOperator *UNUSED(op)) void POSELIB_OT_unlink (wmOperatorType *ot) { /* identifiers */ - ot->name = _("Unlink Pose Library"); + ot->name = "Unlink Pose Library"; ot->idname = "POSELIB_OT_unlink"; - ot->description = _("Remove Pose Library from active Object"); + ot->description = "Remove Pose Library from active Object"; /* callbacks */ ot->exec = poselib_unlink_exec; @@ -355,9 +355,9 @@ static int poselib_sanitise_exec (bContext *C, wmOperator *op) void POSELIB_OT_action_sanitise (wmOperatorType *ot) { /* identifiers */ - ot->name = _("Sanitise Pose Library Action"); + ot->name = "Sanitise Pose Library Action"; ot->idname = "POSELIB_OT_action_sanitise"; - ot->description = _("Make action suitable for use as a Pose Library"); + ot->description = "Make action suitable for use as a Pose Library"; /* callbacks */ ot->exec = poselib_sanitise_exec; @@ -481,9 +481,9 @@ static int poselib_add_exec (bContext *C, wmOperator *op) void POSELIB_OT_pose_add (wmOperatorType *ot) { /* identifiers */ - ot->name= _("PoseLib Add Pose"); + ot->name= "PoseLib Add Pose"; ot->idname= "POSELIB_OT_pose_add"; - ot->description= _("Add the current Pose to the active Pose Library"); + ot->description= "Add the current Pose to the active Pose Library"; /* api callbacks */ ot->invoke= poselib_add_menu_invoke; @@ -494,8 +494,8 @@ void POSELIB_OT_pose_add (wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - RNA_def_int(ot->srna, "frame", 1, 0, INT_MAX, _("Frame"), _("Frame to store pose on"), 0, INT_MAX); - RNA_def_string(ot->srna, "name", "Pose", 64, _("Pose Name"), _("Name of newly added Pose")); + RNA_def_int(ot->srna, "frame", 1, 0, INT_MAX, "Frame", "Frame to store pose on", 0, INT_MAX); + RNA_def_string(ot->srna, "name", "Pose", 64, "Pose Name", "Name of newly added Pose"); } /* ----- */ @@ -587,9 +587,9 @@ void POSELIB_OT_pose_remove (wmOperatorType *ot) PropertyRNA *prop; /* identifiers */ - ot->name= _("PoseLib Remove Pose"); + ot->name= "PoseLib Remove Pose"; ot->idname= "POSELIB_OT_pose_remove"; - ot->description= _("Remove nth pose from the active Pose Library"); + ot->description= "Remove nth pose from the active Pose Library"; /* api callbacks */ ot->invoke= WM_menu_invoke; @@ -600,7 +600,7 @@ void POSELIB_OT_pose_remove (wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - prop= RNA_def_enum(ot->srna, "pose", DummyRNA_DEFAULT_items, 0, _("Pose"), _("The pose to remove")); + prop= RNA_def_enum(ot->srna, "pose", DummyRNA_DEFAULT_items, 0, "Pose", "The pose to remove"); RNA_def_enum_funcs(prop, poselib_stored_pose_itemf); ot->prop= prop; } @@ -677,9 +677,9 @@ void POSELIB_OT_pose_rename (wmOperatorType *ot) }; /* identifiers */ - ot->name= _("PoseLib Rename Pose"); + ot->name= "PoseLib Rename Pose"; ot->idname= "POSELIB_OT_pose_rename"; - ot->description= _("Rename specified pose from the active Pose Library"); + ot->description= "Rename specified pose from the active Pose Library"; /* api callbacks */ ot->invoke= poselib_rename_invoke; @@ -1604,9 +1604,9 @@ static int poselib_preview_exec (bContext *C, wmOperator *op) void POSELIB_OT_browse_interactive (wmOperatorType *ot) { /* identifiers */ - ot->name= _("PoseLib Browse Poses"); + ot->name= "PoseLib Browse Poses"; ot->idname= "POSELIB_OT_browse_interactive"; - ot->description= _("Interactively browse poses in 3D-View"); + ot->description= "Interactively browse poses in 3D-View"; /* callbacks */ ot->invoke= poselib_preview_invoke; @@ -1620,7 +1620,7 @@ void POSELIB_OT_browse_interactive (wmOperatorType *ot) /* properties */ // TODO: make the pose_index into a proper enum instead of a cryptic int... - ot->prop= RNA_def_int(ot->srna, "pose_index", -1, -2, INT_MAX, _("Pose"), _("Index of the pose to apply (-2 for no change to pose, -1 for poselib active pose)"), 0, INT_MAX); + ot->prop= RNA_def_int(ot->srna, "pose_index", -1, -2, INT_MAX, "Pose", "Index of the pose to apply (-2 for no change to pose, -1 for poselib active pose)", 0, INT_MAX); // XXX: percentage vs factor? /* not used yet */ @@ -1630,9 +1630,9 @@ void POSELIB_OT_browse_interactive (wmOperatorType *ot) void POSELIB_OT_apply_pose (wmOperatorType *ot) { /* identifiers */ - ot->name = _("Apply Pose Library Pose"); + ot->name = "Apply Pose Library Pose"; ot->idname = "POSELIB_OT_apply_pose"; - ot->description = _("Apply specified Pose Library pose to the rig"); + ot->description = "Apply specified Pose Library pose to the rig"; /* callbacks */ ot->exec= poselib_preview_exec; @@ -1643,5 +1643,5 @@ void POSELIB_OT_apply_pose (wmOperatorType *ot) /* properties */ // TODO: make the pose_index into a proper enum instead of a cryptic int... - ot->prop= RNA_def_int(ot->srna, "pose_index", -1, -2, INT_MAX, _("Pose"), _("Index of the pose to apply (-2 for no change to pose, -1 for poselib active pose)"), 0, INT_MAX); + ot->prop= RNA_def_int(ot->srna, "pose_index", -1, -2, INT_MAX, "Pose", "Index of the pose to apply (-2 for no change to pose, -1 for poselib active pose)", 0, INT_MAX); } diff --git a/source/blender/editors/armature/poseobject.c b/source/blender/editors/armature/poseobject.c index 1c4740a7c4d..83285d3634a 100644 --- a/source/blender/editors/armature/poseobject.c +++ b/source/blender/editors/armature/poseobject.c @@ -41,8 +41,6 @@ #include "BLI_dynstr.h" #include "BLI_utildefines.h" -#include "BLF_api.h" - #include "DNA_anim_types.h" #include "DNA_armature_types.h" #include "DNA_constraint_types.h" @@ -237,9 +235,9 @@ static int pose_calculate_paths_exec (bContext *C, wmOperator *UNUSED(op)) void POSE_OT_paths_calculate (wmOperatorType *ot) { /* identifiers */ - ot->name= _("Calculate Bone Paths"); + ot->name= "Calculate Bone Paths"; ot->idname= "POSE_OT_paths_calculate"; - ot->description= _("Calculate paths for the selected bones"); + ot->description= "Calculate paths for the selected bones"; /* api callbacks */ ot->exec= pose_calculate_paths_exec; @@ -305,9 +303,9 @@ static int pose_clear_paths_exec (bContext *C, wmOperator *UNUSED(op)) void POSE_OT_paths_clear (wmOperatorType *ot) { /* identifiers */ - ot->name= _("Clear Bone Paths"); + ot->name= "Clear Bone Paths"; ot->idname= "POSE_OT_paths_clear"; - ot->description= _("Clear path caches for selected bones"); + ot->description= "Clear path caches for selected bones"; /* api callbacks */ ot->exec= pose_clear_paths_exec; @@ -365,9 +363,9 @@ static int pose_select_constraint_target_exec(bContext *C, wmOperator *UNUSED(op void POSE_OT_select_constraint_target(wmOperatorType *ot) { /* identifiers */ - ot->name= _("Select Constraint Target"); + ot->name= "Select Constraint Target"; ot->idname= "POSE_OT_select_constraint_target"; - ot->description= _("Select bones used as targets for the currently selected bones"); + ot->description= "Select bones used as targets for the currently selected bones"; /* api callbacks */ ot->exec= pose_select_constraint_target_exec; @@ -436,15 +434,15 @@ static int pose_select_hierarchy_exec(bContext *C, wmOperator *op) void POSE_OT_select_hierarchy(wmOperatorType *ot) { static EnumPropertyItem direction_items[]= { - {BONE_SELECT_PARENT, "PARENT", 0, N_("Select Parent"), ""}, - {BONE_SELECT_CHILD, "CHILD", 0, N_("Select Child"), ""}, + {BONE_SELECT_PARENT, "PARENT", 0, "Select Parent", ""}, + {BONE_SELECT_CHILD, "CHILD", 0, "Select Child", ""}, {0, NULL, 0, NULL, NULL} }; /* identifiers */ - ot->name= _("Select Hierarchy"); + ot->name= "Select Hierarchy"; ot->idname= "POSE_OT_select_hierarchy"; - ot->description= _("Select immediate parent/children of selected bones"); + ot->description= "Select immediate parent/children of selected bones"; /* api callbacks */ ot->exec= pose_select_hierarchy_exec; @@ -454,8 +452,8 @@ void POSE_OT_select_hierarchy(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* props */ - ot->prop= RNA_def_enum(ot->srna, "direction", RNA_enum_items_gettexted(direction_items), BONE_SELECT_PARENT, _("Direction"), ""); - RNA_def_boolean(ot->srna, "extend", 0, _("Add to Selection"), ""); + ot->prop= RNA_def_enum(ot->srna, "direction", direction_items, BONE_SELECT_PARENT, "Direction", ""); + RNA_def_boolean(ot->srna, "extend", 0, "Add to Selection", ""); } @@ -655,15 +653,15 @@ static int pose_select_grouped_exec (bContext *C, wmOperator *op) void POSE_OT_select_grouped (wmOperatorType *ot) { static EnumPropertyItem prop_select_grouped_types[] = { - {0, "LAYER", 0, N_("Layer"), N_("Shared layers")}, - {1, "GROUP", 0, N_("Group"), N_("Shared group")}, - {2, "KEYINGSET", 0, N_("Keying Set"), N_("All bones affected by active Keying Set")}, + {0, "LAYER", 0, "Layer", "Shared layers"}, + {1, "GROUP", 0, "Group", "Shared group"}, + {2, "KEYINGSET", 0, "Keying Set", "All bones affected by active Keying Set"}, {0, NULL, 0, NULL, NULL} }; /* identifiers */ - ot->name= _("Select Grouped"); - ot->description = _("Select all visible bones grouped by similar properties"); + ot->name= "Select Grouped"; + ot->description = "Select all visible bones grouped by similar properties"; ot->idname= "POSE_OT_select_grouped"; /* api callbacks */ @@ -675,8 +673,8 @@ void POSE_OT_select_grouped (wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - RNA_def_boolean(ot->srna, "extend", FALSE, _("Extend"), _("Extend selection instead of deselecting everything first.")); - ot->prop= RNA_def_enum(ot->srna, "type", RNA_enum_items_gettexted(prop_select_grouped_types), 0, _("Type"), ""); + RNA_def_boolean(ot->srna, "extend", FALSE, "Extend", "Extend selection instead of deselecting everything first."); + ot->prop= RNA_def_enum(ot->srna, "type", prop_select_grouped_types, 0, "Type", ""); } @@ -722,9 +720,9 @@ static int pose_bone_flip_active_exec (bContext *C, wmOperator *UNUSED(op)) void POSE_OT_select_flip_active(wmOperatorType *ot) { /* identifiers */ - ot->name= _("Flip Selected Active Bone"); + ot->name= "Flip Selected Active Bone"; ot->idname= "POSE_OT_select_flip_active"; - ot->description= _("Activate the bone with a flipped name."); + ot->description= "Activate the bone with a flipped name."; /* api callbacks */ ot->exec= pose_bone_flip_active_exec; @@ -1130,9 +1128,9 @@ static int pose_copy_exec (bContext *C, wmOperator *op) void POSE_OT_copy (wmOperatorType *ot) { /* identifiers */ - ot->name= _("Copy Pose"); + ot->name= "Copy Pose"; ot->idname= "POSE_OT_copy"; - ot->description= _("Copies the current pose of the selected bones to copy/paste buffer"); + ot->description= "Copies the current pose of the selected bones to copy/paste buffer"; /* api callbacks */ ot->exec= pose_copy_exec; @@ -1217,9 +1215,9 @@ static int pose_paste_exec (bContext *C, wmOperator *op) void POSE_OT_paste (wmOperatorType *ot) { /* identifiers */ - ot->name= _("Paste Pose"); + ot->name= "Paste Pose"; ot->idname= "POSE_OT_paste"; - ot->description= _("Pastes the stored pose on to the current pose"); + ot->description= "Pastes the stored pose on to the current pose"; /* api callbacks */ ot->exec= pose_paste_exec; @@ -1229,8 +1227,8 @@ void POSE_OT_paste (wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - RNA_def_boolean(ot->srna, "flipped", 0, _("Flipped on X-Axis"), _("Paste the stored pose flipped on to current pose")); - RNA_def_boolean(ot->srna, "selected_mask", 1, _("On Selected Only"), _("Only paste the stored pose on to selected bones in the current pose")); + RNA_def_boolean(ot->srna, "flipped", 0, "Flipped on X-Axis", "Paste the stored pose flipped on to current pose"); + RNA_def_boolean(ot->srna, "selected_mask", 1, "On Selected Only", "Only paste the stored pose on to selected bones in the current pose"); } /* ********************************************** */ @@ -1263,9 +1261,9 @@ static int pose_group_add_exec (bContext *C, wmOperator *UNUSED(op)) void POSE_OT_group_add (wmOperatorType *ot) { /* identifiers */ - ot->name= _("Add Bone Group"); + ot->name= "Add Bone Group"; ot->idname= "POSE_OT_group_add"; - ot->description= _("Add a new bone group"); + ot->description= "Add a new bone group"; /* api callbacks */ ot->exec= pose_group_add_exec; @@ -1303,9 +1301,9 @@ static int pose_group_remove_exec (bContext *C, wmOperator *UNUSED(op)) void POSE_OT_group_remove (wmOperatorType *ot) { /* identifiers */ - ot->name= _("Remove Bone Group"); + ot->name= "Remove Bone Group"; ot->idname= "POSE_OT_group_remove"; - ot->description= _("Removes the active bone group"); + ot->description= "Removes the active bone group"; /* api callbacks */ ot->exec= pose_group_remove_exec; @@ -1418,9 +1416,9 @@ static int pose_group_assign_exec (bContext *C, wmOperator *op) void POSE_OT_group_assign (wmOperatorType *ot) { /* identifiers */ - ot->name= _("Add Selected to Bone Group"); + ot->name= "Add Selected to Bone Group"; ot->idname= "POSE_OT_group_assign"; - ot->description= _("Add selected bones to the chosen bone group"); + ot->description= "Add selected bones to the chosen bone group"; /* api callbacks */ ot->invoke= pose_groups_menu_invoke; @@ -1431,7 +1429,7 @@ void POSE_OT_group_assign (wmOperatorType *ot) ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - RNA_def_int(ot->srna, "type", 0, 0, 10, _("Bone Group Index"), "", 0, INT_MAX); + RNA_def_int(ot->srna, "type", 0, 0, 10, "Bone Group Index", "", 0, INT_MAX); } @@ -1474,9 +1472,9 @@ static int pose_group_unassign_exec (bContext *C, wmOperator *UNUSED(op)) void POSE_OT_group_unassign (wmOperatorType *ot) { /* identifiers */ - ot->name= _("Remove Selected from Bone Groups"); + ot->name= "Remove Selected from Bone Groups"; ot->idname= "POSE_OT_group_unassign"; - ot->description= _("Remove selected bones from all bone groups"); + ot->description= "Remove selected bones from all bone groups"; /* api callbacks */ ot->exec= pose_group_unassign_exec; @@ -1697,9 +1695,9 @@ static int pose_group_select_exec (bContext *C, wmOperator *UNUSED(op)) void POSE_OT_group_select (wmOperatorType *ot) { /* identifiers */ - ot->name= _("Select Bones of Bone Group"); + ot->name= "Select Bones of Bone Group"; ot->idname= "POSE_OT_group_select"; - ot->description= _("Select bones in active Bone Group"); + ot->description= "Select bones in active Bone Group"; /* api callbacks */ ot->exec= pose_group_select_exec; @@ -1735,9 +1733,9 @@ static int pose_group_deselect_exec (bContext *C, wmOperator *UNUSED(op)) void POSE_OT_group_deselect (wmOperatorType *ot) { /* identifiers */ - ot->name= _("Deselect Bone Group"); + ot->name= "Deselect Bone Group"; ot->idname= "POSE_OT_group_deselect"; - ot->description= _("Deselect bones of active Bone Group"); + ot->description= "Deselect bones of active Bone Group"; /* api callbacks */ ot->exec= pose_group_deselect_exec; @@ -1780,9 +1778,9 @@ static int pose_flip_names_exec (bContext *C, wmOperator *UNUSED(op)) void POSE_OT_flip_names (wmOperatorType *ot) { /* identifiers */ - ot->name= _("Flip Names"); + ot->name= "Flip Names"; ot->idname= "POSE_OT_flip_names"; - ot->description= _("Flips (and corrects) the axis suffixes of the the names of selected bones"); + ot->description= "Flips (and corrects) the axis suffixes of the the names of selected bones"; /* api callbacks */ ot->exec= pose_flip_names_exec; @@ -1827,15 +1825,15 @@ static int pose_autoside_names_exec (bContext *C, wmOperator *op) void POSE_OT_autoside_names (wmOperatorType *ot) { static EnumPropertyItem axis_items[]= { - {0, "XAXIS", 0, N_("X-Axis"), N_("Left/Right")}, - {1, "YAXIS", 0, N_("Y-Axis"), N_("Front/Back")}, - {2, "ZAXIS", 0, N_("Z-Axis"), N_("Top/Bottom")}, + {0, "XAXIS", 0, "X-Axis", "Left/Right"}, + {1, "YAXIS", 0, "Y-Axis", "Front/Back"}, + {2, "ZAXIS", 0, "Z-Axis", "Top/Bottom"}, {0, NULL, 0, NULL, NULL}}; /* identifiers */ - ot->name= _("AutoName by Axis"); + ot->name= "AutoName by Axis"; ot->idname= "POSE_OT_autoside_names"; - ot->description= _("Automatically renames the selected bones according to which side of the target axis they fall on"); + ot->description= "Automatically renames the selected bones according to which side of the target axis they fall on"; /* api callbacks */ ot->invoke= WM_menu_invoke; @@ -1846,7 +1844,7 @@ void POSE_OT_autoside_names (wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* settings */ - ot->prop= RNA_def_enum(ot->srna, "axis", RNA_enum_items_gettexted(axis_items), 0, _("Axis"), _("Axis tag names with.")); + ot->prop= RNA_def_enum(ot->srna, "axis", axis_items, 0, "Axis", "Axis tag names with."); } /* ********************************************** */ @@ -1932,9 +1930,9 @@ static int pose_armature_layers_showall_exec (bContext *C, wmOperator *op) void ARMATURE_OT_layers_show_all (wmOperatorType *ot) { /* identifiers */ - ot->name= _("Show All Layers"); + ot->name= "Show All Layers"; ot->idname= "ARMATURE_OT_layers_show_all"; - ot->description= _("Make all armature layers visible"); + ot->description= "Make all armature layers visible"; /* callbacks */ ot->exec= pose_armature_layers_showall_exec; @@ -1944,7 +1942,7 @@ void ARMATURE_OT_layers_show_all (wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - ot->prop = RNA_def_boolean(ot->srna, "all", 1, _("All Layers"), _("Enable all layers or just the first 16 (top row)")); + ot->prop = RNA_def_boolean(ot->srna, "all", 1, "All Layers", "Enable all layers or just the first 16 (top row)"); } /* ------------------- */ @@ -1998,9 +1996,9 @@ static int pose_armature_layers_exec (bContext *C, wmOperator *op) void POSE_OT_armature_layers (wmOperatorType *ot) { /* identifiers */ - ot->name= _("Change Armature Layers"); + ot->name= "Change Armature Layers"; ot->idname= "POSE_OT_armature_layers"; - ot->description= _("Change the visible armature layers"); + ot->description= "Change the visible armature layers"; /* callbacks */ ot->invoke= pose_armature_layers_invoke; @@ -2011,15 +2009,15 @@ void POSE_OT_armature_layers (wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - RNA_def_boolean_layer_member(ot->srna, "layers", 32, NULL, _("Layer"), _("Armature layers to make visible")); + RNA_def_boolean_layer_member(ot->srna, "layers", 32, NULL, "Layer", "Armature layers to make visible"); } void ARMATURE_OT_armature_layers (wmOperatorType *ot) { /* identifiers */ - ot->name= _("Change Armature Layers"); + ot->name= "Change Armature Layers"; ot->idname= "ARMATURE_OT_armature_layers"; - ot->description= _("Change the visible armature layers"); + ot->description= "Change the visible armature layers"; /* callbacks */ ot->invoke= pose_armature_layers_invoke; @@ -2030,7 +2028,7 @@ void ARMATURE_OT_armature_layers (wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - RNA_def_boolean_layer_member(ot->srna, "layers", 32, NULL, _("Layer"), _("Armature layers to make visible")); + RNA_def_boolean_layer_member(ot->srna, "layers", 32, NULL, "Layer", "Armature layers to make visible"); } /* ------------------- */ @@ -2092,9 +2090,9 @@ static int pose_bone_layers_exec (bContext *C, wmOperator *op) void POSE_OT_bone_layers (wmOperatorType *ot) { /* identifiers */ - ot->name= _("Change Bone Layers"); + ot->name= "Change Bone Layers"; ot->idname= "POSE_OT_bone_layers"; - ot->description= _("Change the layers that the selected bones belong to"); + ot->description= "Change the layers that the selected bones belong to"; /* callbacks */ ot->invoke= pose_bone_layers_invoke; @@ -2105,7 +2103,7 @@ void POSE_OT_bone_layers (wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - RNA_def_boolean_layer_member(ot->srna, "layers", 32, NULL, _("Layer"), _("Armature layers that bone belongs to")); + RNA_def_boolean_layer_member(ot->srna, "layers", 32, NULL, "Layer", "Armature layers that bone belongs to"); } /* ------------------- */ @@ -2164,9 +2162,9 @@ static int armature_bone_layers_exec (bContext *C, wmOperator *op) void ARMATURE_OT_bone_layers (wmOperatorType *ot) { /* identifiers */ - ot->name= _("Change Bone Layers"); + ot->name= "Change Bone Layers"; ot->idname= "ARMATURE_OT_bone_layers"; - ot->description= _("Change the layers that the selected bones belong to"); + ot->description= "Change the layers that the selected bones belong to"; /* callbacks */ ot->invoke= armature_bone_layers_invoke; @@ -2177,7 +2175,7 @@ void ARMATURE_OT_bone_layers (wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - RNA_def_boolean_layer_member(ot->srna, "layers", 32, NULL, _("Layer"), _("Armature layers that bone belongs to")); + RNA_def_boolean_layer_member(ot->srna, "layers", 32, NULL, "Layer", "Armature layers that bone belongs to"); } /* ********************************************** */ @@ -2233,9 +2231,9 @@ static int pose_flip_quats_exec (bContext *C, wmOperator *UNUSED(op)) void POSE_OT_quaternions_flip (wmOperatorType *ot) { /* identifiers */ - ot->name = _("Flip Quats"); + ot->name = "Flip Quats"; ot->idname= "POSE_OT_quaternions_flip"; - ot->description= _("Flip quaternion values to achieve desired rotations, while maintaining the same orientations"); + ot->description= "Flip quaternion values to achieve desired rotations, while maintaining the same orientations"; /* callbacks */ ot->exec= pose_flip_quats_exec; |