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/space_graph | |
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/space_graph')
-rw-r--r-- | source/blender/editors/space_graph/graph_buttons.c | 4 | ||||
-rw-r--r-- | source/blender/editors/space_graph/graph_edit.c | 182 | ||||
-rw-r--r-- | source/blender/editors/space_graph/graph_ops.c | 16 | ||||
-rw-r--r-- | source/blender/editors/space_graph/graph_select.c | 66 |
4 files changed, 131 insertions, 137 deletions
diff --git a/source/blender/editors/space_graph/graph_buttons.c b/source/blender/editors/space_graph/graph_buttons.c index 1397a5ada94..c7459e8c6b4 100644 --- a/source/blender/editors/space_graph/graph_buttons.c +++ b/source/blender/editors/space_graph/graph_buttons.c @@ -826,9 +826,9 @@ static int graph_properties(bContext *C, wmOperator *UNUSED(op)) void GRAPH_OT_properties(wmOperatorType *ot) { - ot->name= _("Properties"); + ot->name= "Properties"; ot->idname= "GRAPH_OT_properties"; - ot->description= _("Toggle display properties panel"); + ot->description= "Toggle display properties panel"; ot->exec= graph_properties; ot->poll= ED_operator_graphedit_active; diff --git a/source/blender/editors/space_graph/graph_edit.c b/source/blender/editors/space_graph/graph_edit.c index c3a0069a1a1..900aa6f6197 100644 --- a/source/blender/editors/space_graph/graph_edit.c +++ b/source/blender/editors/space_graph/graph_edit.c @@ -47,8 +47,6 @@ #include "BLI_math.h" #include "BLI_utildefines.h" -#include "BLF_api.h" - #include "DNA_anim_types.h" #include "DNA_object_types.h" #include "DNA_scene_types.h" @@ -186,9 +184,9 @@ static int graphkeys_previewrange_exec(bContext *C, wmOperator *UNUSED(op)) void GRAPH_OT_previewrange_set (wmOperatorType *ot) { /* identifiers */ - ot->name= _("Auto-Set Preview Range"); + ot->name= "Auto-Set Preview Range"; ot->idname= "GRAPH_OT_previewrange_set"; - ot->description= _("Automatically set Preview Range based on range of keyframes"); + ot->description= "Automatically set Preview Range based on range of keyframes"; /* api callbacks */ ot->exec= graphkeys_previewrange_exec; @@ -248,9 +246,9 @@ static int graphkeys_view_selected_exec(bContext *C, wmOperator *UNUSED(op)) void GRAPH_OT_view_all (wmOperatorType *ot) { /* identifiers */ - ot->name= _("View All"); + ot->name= "View All"; ot->idname= "GRAPH_OT_view_all"; - ot->description= _("Reset viewable area to show full keyframe range"); + ot->description= "Reset viewable area to show full keyframe range"; /* api callbacks */ ot->exec= graphkeys_viewall_exec; @@ -263,9 +261,9 @@ void GRAPH_OT_view_all (wmOperatorType *ot) void GRAPH_OT_view_selected (wmOperatorType *ot) { /* identifiers */ - ot->name= _("View Selected"); + ot->name= "View Selected"; ot->idname= "GRAPH_OT_view_selected"; - ot->description= _("Reset viewable area to show selected keyframe range"); + ot->description= "Reset viewable area to show selected keyframe range"; /* api callbacks */ ot->exec= graphkeys_view_selected_exec; @@ -378,9 +376,9 @@ static int graphkeys_create_ghostcurves_exec(bContext *C, wmOperator *UNUSED(op) void GRAPH_OT_ghost_curves_create (wmOperatorType *ot) { /* identifiers */ - ot->name= _("Create Ghost Curves"); + ot->name= "Create Ghost Curves"; ot->idname= "GRAPH_OT_ghost_curves_create"; - ot->description= _("Create snapshot (Ghosts) of selected F-Curves as background aid for active Graph Editor"); + ot->description= "Create snapshot (Ghosts) of selected F-Curves as background aid for active Graph Editor"; /* api callbacks */ ot->exec= graphkeys_create_ghostcurves_exec; @@ -421,9 +419,9 @@ static int graphkeys_clear_ghostcurves_exec(bContext *C, wmOperator *UNUSED(op)) void GRAPH_OT_ghost_curves_clear (wmOperatorType *ot) { /* identifiers */ - ot->name= _("Clear Ghost Curves"); + ot->name= "Clear Ghost Curves"; ot->idname= "GRAPH_OT_ghost_curves_clear"; - ot->description= _("Clear F-Curve snapshots (Ghosts) for active Graph Editor"); + ot->description= "Clear F-Curve snapshots (Ghosts) for active Graph Editor"; /* api callbacks */ ot->exec= graphkeys_clear_ghostcurves_exec; @@ -440,8 +438,8 @@ void GRAPH_OT_ghost_curves_clear (wmOperatorType *ot) /* defines for insert keyframes tool */ static EnumPropertyItem prop_graphkeys_insertkey_types[] = { - {1, "ALL", 0, N_("All Channels"), ""}, - {2, "SEL", 0, N_("Only Selected Channels"), ""}, + {1, "ALL", 0, "All Channels", ""}, + {2, "SEL", 0, "Only Selected Channels", ""}, {0, NULL, 0, NULL, NULL} }; @@ -516,9 +514,9 @@ static int graphkeys_insertkey_exec(bContext *C, wmOperator *op) void GRAPH_OT_keyframe_insert (wmOperatorType *ot) { /* identifiers */ - ot->name= _("Insert Keyframes"); + ot->name= "Insert Keyframes"; ot->idname= "GRAPH_OT_keyframe_insert"; - ot->description= _("Insert keyframes for the specified channels"); + ot->description= "Insert keyframes for the specified channels"; /* api callbacks */ ot->invoke= WM_menu_invoke; @@ -529,7 +527,7 @@ void GRAPH_OT_keyframe_insert (wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* id-props */ - ot->prop= RNA_def_enum(ot->srna, "type", RNA_enum_items_gettexted(prop_graphkeys_insertkey_types), 0, "Type", ""); + ot->prop= RNA_def_enum(ot->srna, "type", prop_graphkeys_insertkey_types, 0, "Type", ""); } /* ******************** Click-Insert Keyframes Operator ************************* */ @@ -623,9 +621,9 @@ static int graphkeys_click_insert_invoke (bContext *C, wmOperator *op, wmEvent * void GRAPH_OT_click_insert (wmOperatorType *ot) { /* identifiers */ - ot->name= _("Click-Insert Keyframes"); + ot->name= "Click-Insert Keyframes"; ot->idname= "GRAPH_OT_click_insert"; - ot->description= _("Insert new keyframe at the cursor position for the active F-Curve"); + ot->description= "Insert new keyframe at the cursor position for the active F-Curve"; /* api callbacks */ ot->invoke= graphkeys_click_insert_invoke; @@ -636,8 +634,8 @@ void GRAPH_OT_click_insert (wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - RNA_def_float(ot->srna, "frame", 1.0f, -FLT_MAX, FLT_MAX, _("Frame Number"), _("Frame to insert keyframe on"), 0, 100); - RNA_def_float(ot->srna, "value", 1.0f, -FLT_MAX, FLT_MAX, _("Value"), _("Value for keyframe on"), 0, 100); + RNA_def_float(ot->srna, "frame", 1.0f, -FLT_MAX, FLT_MAX, "Frame Number", "Frame to insert keyframe on", 0, 100); + RNA_def_float(ot->srna, "value", 1.0f, -FLT_MAX, FLT_MAX, "Value", "Value for keyframe on", 0, 100); } /* ******************** Copy/Paste Keyframes Operator ************************* */ @@ -706,9 +704,9 @@ static int graphkeys_copy_exec(bContext *C, wmOperator *op) void GRAPH_OT_copy (wmOperatorType *ot) { /* identifiers */ - ot->name= _("Copy Keyframes"); + ot->name= "Copy Keyframes"; ot->idname= "GRAPH_OT_copy"; - ot->description= _("Copy selected keyframes to the copy/paste buffer"); + ot->description= "Copy selected keyframes to the copy/paste buffer"; /* api callbacks */ ot->exec= graphkeys_copy_exec; @@ -752,9 +750,9 @@ static int graphkeys_paste_exec(bContext *C, wmOperator *op) void GRAPH_OT_paste (wmOperatorType *ot) { /* identifiers */ - ot->name= _("Paste Keyframes"); + ot->name= "Paste Keyframes"; ot->idname= "GRAPH_OT_paste"; - ot->description= _("Paste keyframes from copy/paste buffer for the selected channels, starting on the current frame"); + ot->description= "Paste keyframes from copy/paste buffer for the selected channels, starting on the current frame"; /* api callbacks */ // ot->invoke= WM_operator_props_popup; // better wait for graph redo panel @@ -764,8 +762,8 @@ void GRAPH_OT_paste (wmOperatorType *ot) /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; - RNA_def_enum(ot->srna, "offset", keyframe_paste_offset_items, KEYFRAME_PASTE_OFFSET_CFRA_START, _("Offset"), _("Paste time offset of keys")); - RNA_def_enum(ot->srna, "merge", keyframe_paste_merge_items, KEYFRAME_PASTE_MERGE_MIX, _("Type"), _("Method of merking pasted keys and existing")); + RNA_def_enum(ot->srna, "offset", keyframe_paste_offset_items, KEYFRAME_PASTE_OFFSET_CFRA_START, "Offset", "Paste time offset of keys"); + RNA_def_enum(ot->srna, "merge", keyframe_paste_merge_items, KEYFRAME_PASTE_MERGE_MIX, "Type", "Method of merking pasted keys and existing"); } /* ******************** Duplicate Keyframes Operator ************************* */ @@ -821,9 +819,9 @@ static int graphkeys_duplicate_invoke(bContext *C, wmOperator *op, wmEvent *UNUS void GRAPH_OT_duplicate (wmOperatorType *ot) { /* identifiers */ - ot->name= _("Duplicate Keyframes"); + ot->name= "Duplicate Keyframes"; ot->idname= "GRAPH_OT_duplicate"; - ot->description= _("Make a copy of all selected keyframes"); + ot->description= "Make a copy of all selected keyframes"; /* api callbacks */ ot->invoke= graphkeys_duplicate_invoke; @@ -834,7 +832,7 @@ void GRAPH_OT_duplicate (wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* to give to transform */ - RNA_def_enum(ot->srna, "mode", transform_mode_types, TFM_TRANSLATION, _("Mode"), ""); + RNA_def_enum(ot->srna, "mode", transform_mode_types, TFM_TRANSLATION, "Mode", ""); } /* ******************** Delete Keyframes Operator ************************* */ @@ -891,9 +889,9 @@ static int graphkeys_delete_exec(bContext *C, wmOperator *UNUSED(op)) void GRAPH_OT_delete (wmOperatorType *ot) { /* identifiers */ - ot->name= _("Delete Keyframes"); + ot->name= "Delete Keyframes"; ot->idname= "GRAPH_OT_delete"; - ot->description= _("Remove all selected keyframes"); + ot->description= "Remove all selected keyframes"; /* api callbacks */ ot->invoke= WM_operator_confirm; @@ -953,9 +951,9 @@ static int graphkeys_clean_exec(bContext *C, wmOperator *op) void GRAPH_OT_clean (wmOperatorType *ot) { /* identifiers */ - ot->name= _("Clean Keyframes"); + ot->name= "Clean Keyframes"; ot->idname= "GRAPH_OT_clean"; - ot->description= _("Simplify F-Curves by removing closely spaced keyframes"); + ot->description= "Simplify F-Curves by removing closely spaced keyframes"; /* api callbacks */ //ot->invoke= // XXX we need that number popup for this! @@ -966,7 +964,7 @@ void GRAPH_OT_clean (wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - ot->prop= RNA_def_float(ot->srna, "threshold", 0.001f, 0.0f, FLT_MAX, _("Threshold"), "", 0.0f, 1000.0f); + ot->prop= RNA_def_float(ot->srna, "threshold", 0.001f, 0.0f, FLT_MAX, "Threshold", "", 0.0f, 1000.0f); } /* ******************** Bake F-Curve Operator *********************** */ @@ -1036,9 +1034,9 @@ static int graphkeys_bake_exec(bContext *C, wmOperator *UNUSED(op)) void GRAPH_OT_bake (wmOperatorType *ot) { /* identifiers */ - ot->name= _("Bake Curve"); + ot->name= "Bake Curve"; ot->idname= "GRAPH_OT_bake"; - ot->description= _("Bake selected F-Curves to a set of sampled points defining a similar curve"); + ot->description= "Bake selected F-Curves to a set of sampled points defining a similar curve"; /* api callbacks */ ot->invoke= WM_operator_confirm; // FIXME... @@ -1179,9 +1177,9 @@ static int graphkeys_sound_bake_invoke (bContext *C, wmOperator *op, wmEvent *ev void GRAPH_OT_sound_bake (wmOperatorType *ot) { /* identifiers */ - ot->name= _("Bake Sound to F-Curves"); + ot->name= "Bake Sound to F-Curves"; ot->idname= "GRAPH_OT_sound_bake"; - ot->description= _("Bakes a sound wave to selected F-Curves"); + ot->description= "Bakes a sound wave to selected F-Curves"; /* api callbacks */ ot->invoke= graphkeys_sound_bake_invoke; @@ -1193,15 +1191,15 @@ void GRAPH_OT_sound_bake (wmOperatorType *ot) /* properties */ WM_operator_properties_filesel(ot, FOLDERFILE|SOUNDFILE|MOVIEFILE, FILE_SPECIAL, FILE_OPENFILE, WM_FILESEL_FILEPATH); - RNA_def_float(ot->srna, "low", 0.0f, 0.0, 100000.0, _("Lowest frequency"), "", 0.1, 1000.00); - RNA_def_float(ot->srna, "high", 100000.0, 0.0, 100000.0, _("Highest frequency"), "", 0.1, 1000.00); - RNA_def_float(ot->srna, "attack", 0.005, 0.0, 2.0, _("Attack time"), "", 0.01, 0.1); - RNA_def_float(ot->srna, "release", 0.2, 0.0, 5.0, _("Release time"), "", 0.01, 0.2); - RNA_def_float(ot->srna, "threshold", 0.0, 0.0, 1.0, _("Threshold"), "", 0.01, 0.1); - RNA_def_boolean(ot->srna, "accumulate", 0, _("Accumulate"), ""); - RNA_def_boolean(ot->srna, "use_additive", 0, _("Additive"), ""); - RNA_def_boolean(ot->srna, "square", 0, _("Square"), ""); - RNA_def_float(ot->srna, "sthreshold", 0.1, 0.0, 1.0, _("Square Threshold"), "", 0.01, 0.1); + RNA_def_float(ot->srna, "low", 0.0f, 0.0, 100000.0, "Lowest frequency", "", 0.1, 1000.00); + RNA_def_float(ot->srna, "high", 100000.0, 0.0, 100000.0, "Highest frequency", "", 0.1, 1000.00); + RNA_def_float(ot->srna, "attack", 0.005, 0.0, 2.0, "Attack time", "", 0.01, 0.1); + RNA_def_float(ot->srna, "release", 0.2, 0.0, 5.0, "Release time", "", 0.01, 0.2); + RNA_def_float(ot->srna, "threshold", 0.0, 0.0, 1.0, "Threshold", "", 0.01, 0.1); + RNA_def_boolean(ot->srna, "accumulate", 0, "Accumulate", ""); + RNA_def_boolean(ot->srna, "use_additive", 0, "Additive", ""); + RNA_def_boolean(ot->srna, "square", 0, "Square", ""); + RNA_def_float(ot->srna, "sthreshold", 0.1, 0.0, 1.0, "Square Threshold", "", 0.01, 0.1); } /* ******************** Sample Keyframes Operator *********************** */ @@ -1253,9 +1251,9 @@ static int graphkeys_sample_exec(bContext *C, wmOperator *UNUSED(op)) void GRAPH_OT_sample (wmOperatorType *ot) { /* identifiers */ - ot->name= _("Sample Keyframes"); + ot->name= "Sample Keyframes"; ot->idname= "GRAPH_OT_sample"; - ot->description= _("Add keyframes on every frame between the selected keyframes"); + ot->description= "Add keyframes on every frame between the selected keyframes"; /* api callbacks */ ot->exec= graphkeys_sample_exec; @@ -1277,8 +1275,8 @@ void GRAPH_OT_sample (wmOperatorType *ot) /* defines for set extrapolation-type for selected keyframes tool */ static EnumPropertyItem prop_graphkeys_expo_types[] = { - {FCURVE_EXTRAPOLATE_CONSTANT, "CONSTANT", 0, N_("Constant Extrapolation"), ""}, - {FCURVE_EXTRAPOLATE_LINEAR, "LINEAR", 0, N_("Linear Extrapolation"), ""}, + {FCURVE_EXTRAPOLATE_CONSTANT, "CONSTANT", 0, "Constant Extrapolation", ""}, + {FCURVE_EXTRAPOLATE_LINEAR, "LINEAR", 0, "Linear Extrapolation", ""}, {MAKE_CYCLIC_EXPO, "MAKE_CYCLIC", 0, "Make Cyclic (F-Modifier)", "Add Cycles F-Modifier if one doesn't exist already"}, {CLEAR_CYCLIC_EXPO, "CLEAR_CYCLIC", 0, "Clear Cyclic (F-Modifier)", "Remove Cycles F-Modifier if not needed anymore"}, @@ -1362,9 +1360,9 @@ static int graphkeys_expo_exec(bContext *C, wmOperator *op) void GRAPH_OT_extrapolation_type (wmOperatorType *ot) { /* identifiers */ - ot->name= _("Set Keyframe Extrapolation"); + ot->name= "Set Keyframe Extrapolation"; ot->idname= "GRAPH_OT_extrapolation_type"; - ot->description= _("Set extrapolation mode for selected F-Curves"); + ot->description= "Set extrapolation mode for selected F-Curves"; /* api callbacks */ ot->invoke= WM_menu_invoke; @@ -1375,7 +1373,7 @@ void GRAPH_OT_extrapolation_type (wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* id-props */ - ot->prop= RNA_def_enum(ot->srna, "type", RNA_enum_items_gettexted(prop_graphkeys_expo_types), 0, _("Type"), ""); + ot->prop= RNA_def_enum(ot->srna, "type", prop_graphkeys_expo_types, 0, "Type", ""); } /* ******************** Set Interpolation-Type Operator *********************** */ @@ -1431,9 +1429,9 @@ static int graphkeys_ipo_exec(bContext *C, wmOperator *op) void GRAPH_OT_interpolation_type (wmOperatorType *ot) { /* identifiers */ - ot->name= _("Set Keyframe Interpolation"); + ot->name= "Set Keyframe Interpolation"; ot->idname= "GRAPH_OT_interpolation_type"; - ot->description= _("Set interpolation mode for the F-Curve segments starting from the selected keyframes"); + ot->description= "Set interpolation mode for the F-Curve segments starting from the selected keyframes"; /* api callbacks */ ot->invoke= WM_menu_invoke; @@ -1444,7 +1442,7 @@ void GRAPH_OT_interpolation_type (wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* id-props */ - ot->prop= RNA_def_enum(ot->srna, "type", beztriple_interpolation_mode_items, 0, _("Type"), ""); + ot->prop= RNA_def_enum(ot->srna, "type", beztriple_interpolation_mode_items, 0, "Type", ""); } /* ******************** Set Handle-Type Operator *********************** */ @@ -1508,9 +1506,9 @@ static int graphkeys_handletype_exec(bContext *C, wmOperator *op) void GRAPH_OT_handle_type (wmOperatorType *ot) { /* identifiers */ - ot->name= _("Set Keyframe Handle Type"); + ot->name= "Set Keyframe Handle Type"; ot->idname= "GRAPH_OT_handle_type"; - ot->description= _("Set type of handle for selected keyframes"); + ot->description= "Set type of handle for selected keyframes"; /* api callbacks */ ot->invoke= WM_menu_invoke; @@ -1521,7 +1519,7 @@ static int graphkeys_handletype_exec(bContext *C, wmOperator *op) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* id-props */ - ot->prop= RNA_def_enum(ot->srna, "type", RNA_enum_items_gettexted(keyframe_handle_type_items), 0, _("Type"), ""); + ot->prop= RNA_def_enum(ot->srna, "type", keyframe_handle_type_items, 0, "Type", ""); } /* ************************************************************************** */ @@ -1702,9 +1700,9 @@ static int graphkeys_euler_filter_exec (bContext *C, wmOperator *op) void GRAPH_OT_euler_filter (wmOperatorType *ot) { /* identifiers */ - ot->name= _("Euler Discontinuity Filter"); + ot->name= "Euler Discontinuity Filter"; ot->idname= "GRAPH_OT_euler_filter"; - ot->description= _("Fixes the most common causes of gimbal lock in the selected Euler Rotation F-Curves"); + ot->description= "Fixes the most common causes of gimbal lock in the selected Euler Rotation F-Curves"; /* api callbacks */ ot->exec= graphkeys_euler_filter_exec; @@ -1776,9 +1774,9 @@ static int graphkeys_framejump_exec(bContext *C, wmOperator *UNUSED(op)) void GRAPH_OT_frame_jump (wmOperatorType *ot) { /* identifiers */ - ot->name= _("Jump to Frame"); + ot->name= "Jump to Frame"; ot->idname= "GRAPH_OT_frame_jump"; - ot->description= _("Set the current frame to the average frame of the selected keyframes"); + ot->description= "Set the current frame to the average frame of the selected keyframes"; /* api callbacks */ ot->exec= graphkeys_framejump_exec; @@ -1792,12 +1790,12 @@ void GRAPH_OT_frame_jump (wmOperatorType *ot) /* defines for snap keyframes tool */ static EnumPropertyItem prop_graphkeys_snap_types[] = { - {GRAPHKEYS_SNAP_CFRA, "CFRA", 0, N_("Current Frame"), ""}, - {GRAPHKEYS_SNAP_VALUE, "VALUE", 0, N_("Cursor Value"), ""}, - {GRAPHKEYS_SNAP_NEAREST_FRAME, "NEAREST_FRAME", 0, N_("Nearest Frame"), ""}, // XXX as single entry? - {GRAPHKEYS_SNAP_NEAREST_SECOND, "NEAREST_SECOND", 0, N_("Nearest Second"), ""}, // XXX as single entry? - {GRAPHKEYS_SNAP_NEAREST_MARKER, "NEAREST_MARKER", 0, N_("Nearest Marker"), ""}, - {GRAPHKEYS_SNAP_HORIZONTAL, "HORIZONTAL", 0, N_("Flatten Handles"), ""}, + {GRAPHKEYS_SNAP_CFRA, "CFRA", 0, "Current Frame", ""}, + {GRAPHKEYS_SNAP_VALUE, "VALUE", 0, "Cursor Value", ""}, + {GRAPHKEYS_SNAP_NEAREST_FRAME, "NEAREST_FRAME", 0, "Nearest Frame", ""}, // XXX as single entry? + {GRAPHKEYS_SNAP_NEAREST_SECOND, "NEAREST_SECOND", 0, "Nearest Second", ""}, // XXX as single entry? + {GRAPHKEYS_SNAP_NEAREST_MARKER, "NEAREST_MARKER", 0, "Nearest Marker", ""}, + {GRAPHKEYS_SNAP_HORIZONTAL, "HORIZONTAL", 0, "Flatten Handles", ""}, {0, NULL, 0, NULL, NULL} }; @@ -1880,9 +1878,9 @@ static int graphkeys_snap_exec(bContext *C, wmOperator *op) void GRAPH_OT_snap (wmOperatorType *ot) { /* identifiers */ - ot->name= _("Snap Keys"); + ot->name= "Snap Keys"; ot->idname= "GRAPH_OT_snap"; - ot->description= _("Snap selected keyframes to the chosen times/values"); + ot->description= "Snap selected keyframes to the chosen times/values"; /* api callbacks */ ot->invoke= WM_menu_invoke; @@ -1893,18 +1891,18 @@ void GRAPH_OT_snap (wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* id-props */ - ot->prop= RNA_def_enum(ot->srna, "type", RNA_enum_items_gettexted(prop_graphkeys_snap_types), 0, _("Type"), ""); + ot->prop= RNA_def_enum(ot->srna, "type", prop_graphkeys_snap_types, 0, "Type", ""); } /* ******************** Mirror Keyframes Operator *********************** */ /* defines for mirror keyframes tool */ static EnumPropertyItem prop_graphkeys_mirror_types[] = { - {GRAPHKEYS_MIRROR_CFRA, "CFRA", 0, N_("By Times over Current Frame"), ""}, - {GRAPHKEYS_MIRROR_VALUE, "VALUE", 0, N_("By Values over Cursor Value"), ""}, - {GRAPHKEYS_MIRROR_YAXIS, "YAXIS", 0, N_("By Times over Time=0"), ""}, - {GRAPHKEYS_MIRROR_XAXIS, "XAXIS", 0, N_("By Values over Value=0"), ""}, - {GRAPHKEYS_MIRROR_MARKER, "MARKER", 0, N_("By Times over First Selected Marker"), ""}, + {GRAPHKEYS_MIRROR_CFRA, "CFRA", 0, "By Times over Current Frame", ""}, + {GRAPHKEYS_MIRROR_VALUE, "VALUE", 0, "By Values over Cursor Value", ""}, + {GRAPHKEYS_MIRROR_YAXIS, "YAXIS", 0, "By Times over Time=0", ""}, + {GRAPHKEYS_MIRROR_XAXIS, "XAXIS", 0, "By Values over Value=0", ""}, + {GRAPHKEYS_MIRROR_MARKER, "MARKER", 0, "By Times over First Selected Marker", ""}, {0, NULL, 0, NULL, NULL} }; @@ -1998,9 +1996,9 @@ static int graphkeys_mirror_exec(bContext *C, wmOperator *op) void GRAPH_OT_mirror (wmOperatorType *ot) { /* identifiers */ - ot->name= _("Mirror Keys"); + ot->name= "Mirror Keys"; ot->idname= "GRAPH_OT_mirror"; - ot->description= _("Flip selected keyframes over the selected mirror line"); + ot->description= "Flip selected keyframes over the selected mirror line"; /* api callbacks */ ot->invoke= WM_menu_invoke; @@ -2011,7 +2009,7 @@ void GRAPH_OT_mirror (wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* id-props */ - ot->prop= RNA_def_enum(ot->srna, "type", RNA_enum_items_gettexted(prop_graphkeys_mirror_types), 0, _("Type"), ""); + ot->prop= RNA_def_enum(ot->srna, "type", prop_graphkeys_mirror_types, 0, "Type", ""); } /* ******************** Smooth Keyframes Operator *********************** */ @@ -2053,9 +2051,9 @@ static int graphkeys_smooth_exec(bContext *C, wmOperator *UNUSED(op)) void GRAPH_OT_smooth (wmOperatorType *ot) { /* identifiers */ - ot->name= _("Smooth Keys"); + ot->name= "Smooth Keys"; ot->idname= "GRAPH_OT_smooth"; - ot->description= _("Apply weighted moving means to make selected F-Curves less bumpy"); + ot->description= "Apply weighted moving means to make selected F-Curves less bumpy"; /* api callbacks */ ot->exec= graphkeys_smooth_exec; @@ -2155,9 +2153,9 @@ static int graph_fmodifier_add_exec(bContext *C, wmOperator *op) void GRAPH_OT_fmodifier_add (wmOperatorType *ot) { /* identifiers */ - ot->name= _("Add F-Curve Modifier"); + ot->name= "Add F-Curve Modifier"; ot->idname= "GRAPH_OT_fmodifier_add"; - ot->description= _("Add F-Modifiers to the selected F-Curves"); + ot->description= "Add F-Modifiers to the selected F-Curves"; /* api callbacks */ ot->invoke= graph_fmodifier_add_invoke; @@ -2168,8 +2166,8 @@ void GRAPH_OT_fmodifier_add (wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* id-props */ - ot->prop= RNA_def_enum(ot->srna, "type", RNA_enum_items_gettexted(fmodifier_type_items), 0, _("Type"), ""); - RNA_def_boolean(ot->srna, "only_active", 1, _("Only Active"), _("Only add F-Modifier to active F-Curve.")); + ot->prop= RNA_def_enum(ot->srna, "type", fmodifier_type_items, 0, "Type", ""); + RNA_def_boolean(ot->srna, "only_active", 1, "Only Active", "Only add F-Modifier to active F-Curve."); } /* ******************** Copy F-Modifiers Operator *********************** */ @@ -2213,9 +2211,9 @@ static int graph_fmodifier_copy_exec(bContext *C, wmOperator *op) void GRAPH_OT_fmodifier_copy (wmOperatorType *ot) { /* identifiers */ - ot->name= _("Copy F-Modifiers"); + ot->name= "Copy F-Modifiers"; ot->idname= "GRAPH_OT_fmodifier_copy"; - ot->description= _("Copy the F-Modifier(s) of the active F-Curve."); + ot->description= "Copy the F-Modifier(s) of the active F-Curve."; /* api callbacks */ ot->exec= graph_fmodifier_copy_exec; @@ -2275,9 +2273,9 @@ static int graph_fmodifier_paste_exec(bContext *C, wmOperator *op) void GRAPH_OT_fmodifier_paste (wmOperatorType *ot) { /* identifiers */ - ot->name= _("Paste F-Modifiers"); + ot->name= "Paste F-Modifiers"; ot->idname= "GRAPH_OT_fmodifier_paste"; - ot->description= _("Add copied F-Modifiers to the selected F-Curves"); + ot->description= "Add copied F-Modifiers to the selected F-Curves"; /* api callbacks */ ot->exec= graph_fmodifier_paste_exec; diff --git a/source/blender/editors/space_graph/graph_ops.c b/source/blender/editors/space_graph/graph_ops.c index 00b111f49aa..46918407447 100644 --- a/source/blender/editors/space_graph/graph_ops.c +++ b/source/blender/editors/space_graph/graph_ops.c @@ -40,8 +40,6 @@ #include "BLI_blenlib.h" #include "BLI_utildefines.h" -#include "BLF_api.h" - #include "BKE_context.h" #include "BKE_main.h" #include "BKE_sound.h" @@ -168,9 +166,9 @@ static int graphview_cursor_modal(bContext *C, wmOperator *op, wmEvent *event) static void GRAPH_OT_cursor_set(wmOperatorType *ot) { /* identifiers */ - ot->name= _("Set Cursor"); + ot->name= "Set Cursor"; ot->idname= "GRAPH_OT_cursor_set"; - ot->description= _("Interactively set the current frame number and value cursor"); + ot->description= "Interactively set the current frame number and value cursor"; /* api callbacks */ ot->exec= graphview_cursor_exec; @@ -182,8 +180,8 @@ static void GRAPH_OT_cursor_set(wmOperatorType *ot) ot->flag= OPTYPE_BLOCKING|OPTYPE_UNDO; /* rna */ - RNA_def_int(ot->srna, "frame", 0, MINAFRAME, MAXFRAME, _("Frame"), "", MINAFRAME, MAXFRAME); - RNA_def_float(ot->srna, "value", 0, FLT_MIN, FLT_MAX, _("Value"), "", -100.0f, 100.0f); + RNA_def_int(ot->srna, "frame", 0, MINAFRAME, MAXFRAME, "Frame", "", MINAFRAME, MAXFRAME); + RNA_def_float(ot->srna, "value", 0, FLT_MIN, FLT_MAX, "Value", "", -100.0f, 100.0f); } /* Toggle Handles ----------------------------------------------------------------- */ @@ -208,9 +206,9 @@ static int view_toggle_handles_exec (bContext *C, wmOperator *UNUSED(op)) static void GRAPH_OT_view_togglehandles (wmOperatorType *ot) { /* identification */ - ot->name= _("Show/Hide All Handles"); + ot->name= "Show/Hide All Handles"; ot->idname= "GRAPH_OT_handles_view_toggle"; - ot->description= _("Toggle whether handles are drawn on all keyframes that need them"); + ot->description= "Toggle whether handles are drawn on all keyframes that need them"; /* callbacks */ ot->exec= view_toggle_handles_exec; @@ -277,7 +275,7 @@ void ED_operatormacros_graph(void) wmOperatorType *ot; wmOperatorTypeMacro *otmacro; - ot= WM_operatortype_append_macro("GRAPH_OT_duplicate_move", _("Duplicate"), OPTYPE_UNDO|OPTYPE_REGISTER); + ot= WM_operatortype_append_macro("GRAPH_OT_duplicate_move", "Duplicate", OPTYPE_UNDO|OPTYPE_REGISTER); if (ot) { WM_operatortype_macro_define(ot, "GRAPH_OT_duplicate"); otmacro= WM_operatortype_macro_define(ot, "TRANSFORM_OT_transform"); diff --git a/source/blender/editors/space_graph/graph_select.c b/source/blender/editors/space_graph/graph_select.c index 5e256e77c0d..b8c5d79df18 100644 --- a/source/blender/editors/space_graph/graph_select.c +++ b/source/blender/editors/space_graph/graph_select.c @@ -40,8 +40,6 @@ #include "BLI_math.h" #include "BLI_utildefines.h" -#include "BLF_api.h" - #include "DNA_anim_types.h" #include "DNA_object_types.h" #include "DNA_screen_types.h" @@ -169,9 +167,9 @@ static int graphkeys_deselectall_exec(bContext *C, wmOperator *op) void GRAPH_OT_select_all_toggle (wmOperatorType *ot) { /* identifiers */ - ot->name= _("Select All"); + ot->name= "Select All"; ot->idname= "GRAPH_OT_select_all_toggle"; - ot->description= _("Toggle selection of all keyframes"); + ot->description= "Toggle selection of all keyframes"; /* api callbacks */ ot->exec= graphkeys_deselectall_exec; @@ -181,7 +179,7 @@ void GRAPH_OT_select_all_toggle (wmOperatorType *ot) ot->flag= OPTYPE_REGISTER/*|OPTYPE_UNDO*/; /* props */ - ot->prop= RNA_def_boolean(ot->srna, "invert", 0, _("Invert"), ""); + ot->prop= RNA_def_boolean(ot->srna, "invert", 0, "Invert", ""); } /* ******************** Border Select Operator **************************** */ @@ -338,9 +336,9 @@ static int graphkeys_borderselect_exec(bContext *C, wmOperator *op) void GRAPH_OT_select_border(wmOperatorType *ot) { /* identifiers */ - ot->name= _("Border Select"); + ot->name= "Border Select"; ot->idname= "GRAPH_OT_select_border"; - ot->description= _("Select all keyframes within the specified region"); + ot->description= "Select all keyframes within the specified region"; /* api callbacks */ ot->invoke= WM_border_select_invoke; @@ -356,8 +354,8 @@ void GRAPH_OT_select_border(wmOperatorType *ot) /* rna */ WM_operator_properties_gesture_border(ot, FALSE); - ot->prop= RNA_def_boolean(ot->srna, "axis_range", 0, _("Axis Range"), ""); - RNA_def_boolean(ot->srna, "include_handles", 0, _("Include Handles"), _("Are handles tested individually against the selection criteria")); + ot->prop= RNA_def_boolean(ot->srna, "axis_range", 0, "Axis Range", ""); + RNA_def_boolean(ot->srna, "include_handles", 0, "Include Handles", "Are handles tested individually against the selection criteria"); } /* ******************** Column Select Operator **************************** */ @@ -370,10 +368,10 @@ void GRAPH_OT_select_border(wmOperatorType *ot) /* defines for column-select mode */ static EnumPropertyItem prop_column_select_types[] = { - {GRAPHKEYS_COLUMNSEL_KEYS, "KEYS", 0, N_("On Selected Keyframes"), ""}, - {GRAPHKEYS_COLUMNSEL_CFRA, "CFRA", 0, N_("On Current Frame"), ""}, - {GRAPHKEYS_COLUMNSEL_MARKERS_COLUMN, "MARKERS_COLUMN", 0, N_("On Selected Markers"), ""}, - {GRAPHKEYS_COLUMNSEL_MARKERS_BETWEEN, "MARKERS_BETWEEN", 0, N_("Between Min/Max Selected Markers"), ""}, + {GRAPHKEYS_COLUMNSEL_KEYS, "KEYS", 0, "On Selected Keyframes", ""}, + {GRAPHKEYS_COLUMNSEL_CFRA, "CFRA", 0, "On Current Frame", ""}, + {GRAPHKEYS_COLUMNSEL_MARKERS_COLUMN, "MARKERS_COLUMN", 0, "On Selected Markers", ""}, + {GRAPHKEYS_COLUMNSEL_MARKERS_BETWEEN, "MARKERS_BETWEEN", 0, "Between Min/Max Selected Markers", ""}, {0, NULL, 0, NULL, NULL} }; @@ -527,9 +525,9 @@ static int graphkeys_columnselect_exec(bContext *C, wmOperator *op) void GRAPH_OT_select_column (wmOperatorType *ot) { /* identifiers */ - ot->name= _("Select All"); + ot->name= "Select All"; ot->idname= "GRAPH_OT_select_column"; - ot->description= _("Select all keyframes on the specified frame(s)"); + ot->description= "Select all keyframes on the specified frame(s)"; /* api callbacks */ ot->exec= graphkeys_columnselect_exec; @@ -539,7 +537,7 @@ void GRAPH_OT_select_column (wmOperatorType *ot) ot->flag= OPTYPE_REGISTER/*|OPTYPE_UNDO*/; /* props */ - ot->prop= RNA_def_enum(ot->srna, "mode", RNA_enum_items_gettexted(prop_column_select_types), 0, _("Mode"), ""); + ot->prop= RNA_def_enum(ot->srna, "mode", prop_column_select_types, 0, "Mode", ""); } /* ******************** Select Linked Operator *********************** */ @@ -585,9 +583,9 @@ static int graphkeys_select_linked_exec (bContext *C, wmOperator *UNUSED(op)) void GRAPH_OT_select_linked (wmOperatorType *ot) { /* identifiers */ - ot->name = _("Select Linked"); + ot->name = "Select Linked"; ot->idname= "GRAPH_OT_select_linked"; - ot->description = _("Select keyframes occurring the same F-Curves as selected ones"); + ot->description = "Select keyframes occurring the same F-Curves as selected ones"; /* api callbacks */ ot->exec= graphkeys_select_linked_exec; @@ -663,9 +661,9 @@ static int graphkeys_select_more_exec (bContext *C, wmOperator *UNUSED(op)) void GRAPH_OT_select_more (wmOperatorType *ot) { /* identifiers */ - ot->name = _("Select More"); + ot->name = "Select More"; ot->idname= "GRAPH_OT_select_more"; - ot->description = _("Select keyframes beside already selected ones"); + ot->description = "Select keyframes beside already selected ones"; /* api callbacks */ ot->exec= graphkeys_select_more_exec; @@ -697,9 +695,9 @@ static int graphkeys_select_less_exec (bContext *C, wmOperator *UNUSED(op)) void GRAPH_OT_select_less (wmOperatorType *ot) { /* identifiers */ - ot->name = _("Select Less"); + ot->name = "Select Less"; ot->idname= "GRAPH_OT_select_less"; - ot->description = _("Deselect keyframes on ends of selection islands"); + ot->description = "Deselect keyframes on ends of selection islands"; /* api callbacks */ ot->exec= graphkeys_select_less_exec; @@ -714,9 +712,9 @@ void GRAPH_OT_select_less (wmOperatorType *ot) /* defines for left-right select tool */ static EnumPropertyItem prop_graphkeys_leftright_select_types[] = { - {GRAPHKEYS_LRSEL_TEST, "CHECK", 0, N_("Check if Select Left or Right"), ""}, - {GRAPHKEYS_LRSEL_LEFT, "LEFT", 0, N_("Before current frame"), ""}, - {GRAPHKEYS_LRSEL_RIGHT, "RIGHT", 0, N_("After current frame"), ""}, + {GRAPHKEYS_LRSEL_TEST, "CHECK", 0, "Check if Select Left or Right", ""}, + {GRAPHKEYS_LRSEL_LEFT, "LEFT", 0, "Before current frame", ""}, + {GRAPHKEYS_LRSEL_RIGHT, "RIGHT", 0, "After current frame", ""}, {0, NULL, 0, NULL, NULL} }; @@ -837,9 +835,9 @@ static int graphkeys_select_leftright_invoke (bContext *C, wmOperator *op, wmEve void GRAPH_OT_select_leftright (wmOperatorType *ot) { /* identifiers */ - ot->name= _("Select Left/Right"); + ot->name= "Select Left/Right"; ot->idname= "GRAPH_OT_select_leftright"; - ot->description= _("Select keyframes to the left or the right of the current frame"); + ot->description= "Select keyframes to the left or the right of the current frame"; /* api callbacks */ ot->invoke= graphkeys_select_leftright_invoke; @@ -850,8 +848,8 @@ void GRAPH_OT_select_leftright (wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* id-props */ - ot->prop= RNA_def_enum(ot->srna, "mode", RNA_enum_items_gettexted(prop_graphkeys_leftright_select_types), GRAPHKEYS_LRSEL_TEST, _("Mode"), ""); - RNA_def_boolean(ot->srna, "extend", 0, _("Extend Select"), ""); + ot->prop= RNA_def_enum(ot->srna, "mode", prop_graphkeys_leftright_select_types, GRAPHKEYS_LRSEL_TEST, "Mode", ""); + RNA_def_boolean(ot->srna, "extend", 0, "Extend Select", ""); } /* ******************** Mouse-Click Select Operator *********************** */ @@ -1330,18 +1328,18 @@ static int graphkeys_clickselect_invoke(bContext *C, wmOperator *op, wmEvent *ev void GRAPH_OT_clickselect (wmOperatorType *ot) { /* identifiers */ - ot->name= _("Mouse Select Keys"); + ot->name= "Mouse Select Keys"; ot->idname= "GRAPH_OT_clickselect"; - ot->description= _("Select keyframes by clicking on them"); + ot->description= "Select keyframes by clicking on them"; /* api callbacks */ ot->invoke= graphkeys_clickselect_invoke; ot->poll= graphop_visible_keyframes_poll; /* id-props */ - RNA_def_boolean(ot->srna, "extend", 0, _("Extend Select"), ""); // SHIFTKEY - RNA_def_boolean(ot->srna, "column", 0, _("Column Select"), _("Select all keyframes that occur on the same frame as the one under the mouse")); // ALTKEY - RNA_def_boolean(ot->srna, "curves", 0, _("Only Curves"), _("Select all the keyframes in the curve")); // CTRLKEY + ALTKEY + RNA_def_boolean(ot->srna, "extend", 0, "Extend Select", ""); // SHIFTKEY + RNA_def_boolean(ot->srna, "column", 0, "Column Select", "Select all keyframes that occur on the same frame as the one under the mouse"); // ALTKEY + RNA_def_boolean(ot->srna, "curves", 0, "Only Curves", "Select all the keyframes in the curve"); // CTRLKEY + ALTKEY } /* ************************************************************************** */ |