Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXiao Xiangquan <xiaoxiangquan@gmail.com>2011-07-02 07:17:09 +0400
committerXiao Xiangquan <xiaoxiangquan@gmail.com>2011-07-02 07:17:09 +0400
commit9b8538c69c14aaf9b991ae23e5faa6429c701c37 (patch)
treef4e1bcddf227dba241779a866d5028a8541dcc93 /source/blender/editors/space_graph
parent79c129647e2a8c5d5efd2fc1226e3980f356e663 (diff)
3D view, graph editor, etc. done
Diffstat (limited to 'source/blender/editors/space_graph')
-rw-r--r--source/blender/editors/space_graph/graph_buttons.c6
-rw-r--r--source/blender/editors/space_graph/graph_edit.c170
-rw-r--r--source/blender/editors/space_graph/graph_ops.c10
-rw-r--r--source/blender/editors/space_graph/graph_select.c50
4 files changed, 119 insertions, 117 deletions
diff --git a/source/blender/editors/space_graph/graph_buttons.c b/source/blender/editors/space_graph/graph_buttons.c
index fb1144b4fa8..f11f530be9e 100644
--- a/source/blender/editors/space_graph/graph_buttons.c
+++ b/source/blender/editors/space_graph/graph_buttons.c
@@ -48,6 +48,8 @@
#include "BLI_rand.h"
#include "BLI_utildefines.h"
+#include "BLF_api.h"
+
#include "BKE_context.h"
#include "BKE_depsgraph.h"
#include "BKE_fcurve.h"
@@ -760,9 +762,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 4acb80cb8cc..6deeb92b459 100644
--- a/source/blender/editors/space_graph/graph_edit.c
+++ b/source/blender/editors/space_graph/graph_edit.c
@@ -184,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;
@@ -246,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;
@@ -261,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;
@@ -376,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;
@@ -419,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;
@@ -438,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, "All Channels", ""},
- {2, "SEL", 0, "Only Selected Channels", ""},
+ {1, "ALL", 0, N_("All Channels"), ""},
+ {2, "SEL", 0, N_("Only Selected Channels"), ""},
{0, NULL, 0, NULL, NULL}
};
@@ -514,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;
@@ -527,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", prop_graphkeys_insertkey_types, 0, "Type", "");
+ ot->prop= RNA_def_enum(ot->srna, "type", RNA_enum_items_gettexted(prop_graphkeys_insertkey_types), 0, "Type", "");
}
/* ******************** Click-Insert Keyframes Operator ************************* */
@@ -621,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;
@@ -634,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 ************************* */
@@ -704,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;
@@ -750,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
@@ -762,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 ************************* */
@@ -819,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;
@@ -832,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 ************************* */
@@ -889,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;
@@ -951,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!
@@ -964,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 *********************** */
@@ -1034,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...
@@ -1165,9 +1165,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;
@@ -1239,9 +1239,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;
@@ -1259,8 +1259,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, "Constant Extrapolation", ""},
- {FCURVE_EXTRAPOLATE_LINEAR, "LINEAR", 0, "Linear Extrapolation", ""},
+ {FCURVE_EXTRAPOLATE_CONSTANT, "CONSTANT", 0, N_("Constant Extrapolation"), ""},
+ {FCURVE_EXTRAPOLATE_LINEAR, "LINEAR", 0, N_("Linear Extrapolation"), ""},
{0, NULL, 0, NULL, NULL}
};
@@ -1314,9 +1314,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;
@@ -1327,7 +1327,7 @@ void GRAPH_OT_extrapolation_type (wmOperatorType *ot)
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
/* id-props */
- ot->prop= RNA_def_enum(ot->srna, "type", prop_graphkeys_expo_types, 0, "Type", "");
+ ot->prop= RNA_def_enum(ot->srna, "type", RNA_enum_items_gettexted(prop_graphkeys_expo_types), 0, _("Type"), "");
}
/* ******************** Set Interpolation-Type Operator *********************** */
@@ -1383,9 +1383,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;
@@ -1396,7 +1396,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 *********************** */
@@ -1469,17 +1469,17 @@ static int graphkeys_handletype_exec(bContext *C, wmOperator *op)
{
/* sync with editcurve_handle_type_items */
static EnumPropertyItem graphkeys_handle_type_items[] = {
- {HD_AUTO, "AUTO", 0, "Automatic", "Handles that are automatically adjusted upon moving the keyframe. Whole curve"},
- {HD_VECT, "VECTOR", 0, "Vector", ""},
- {HD_ALIGN, "ALIGNED", 0, "Aligned", ""},
- {HD_FREE, "FREE_ALIGN", 0, "Free", ""},
- {HD_AUTO_ANIM, "ANIM_CLAMPED", 0, "Auto Clamped", "Auto handles clamped to not overshoot. Whole curve"},
+ {HD_AUTO, "AUTO", 0, N_("Automatic"), N_("Handles that are automatically adjusted upon moving the keyframe. Whole curve")},
+ {HD_VECT, "VECTOR", 0, N_("Vector"), ""},
+ {HD_ALIGN, "ALIGNED", 0, N_("Aligned"), ""},
+ {HD_FREE, "FREE_ALIGN", 0, N_("Free"), ""},
+ {HD_AUTO_ANIM, "ANIM_CLAMPED", 0, N_("Auto Clamped"), N_("Auto handles clamped to not overshoot. Whole curve")},
{0, NULL, 0, NULL, NULL}};
/* 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;
@@ -1490,7 +1490,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", graphkeys_handle_type_items, 0, "Type", "");
+ ot->prop= RNA_def_enum(ot->srna, "type", RNA_enum_items_gettexted(graphkeys_handle_type_items), 0, _("Type"), "");
}
/* ************************************************************************** */
@@ -1671,9 +1671,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;
@@ -1745,9 +1745,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;
@@ -1761,12 +1761,12 @@ void GRAPH_OT_frame_jump (wmOperatorType *ot)
/* defines for snap keyframes tool */
static EnumPropertyItem prop_graphkeys_snap_types[] = {
- {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", ""},
+ {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"), ""},
{0, NULL, 0, NULL, NULL}
};
@@ -1849,9 +1849,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;
@@ -1862,18 +1862,18 @@ void GRAPH_OT_snap (wmOperatorType *ot)
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
/* id-props */
- ot->prop= RNA_def_enum(ot->srna, "type", prop_graphkeys_snap_types, 0, "Type", "");
+ ot->prop= RNA_def_enum(ot->srna, "type", RNA_enum_items_gettexted(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, "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", ""},
+ {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"), ""},
{0, NULL, 0, NULL, NULL}
};
@@ -1967,9 +1967,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;
@@ -1980,7 +1980,7 @@ void GRAPH_OT_mirror (wmOperatorType *ot)
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
/* id-props */
- ot->prop= RNA_def_enum(ot->srna, "type", prop_graphkeys_mirror_types, 0, "Type", "");
+ ot->prop= RNA_def_enum(ot->srna, "type", RNA_enum_items_gettexted(prop_graphkeys_mirror_types), 0, _("Type"), "");
}
/* ******************** Smooth Keyframes Operator *********************** */
@@ -2022,9 +2022,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;
@@ -2124,9 +2124,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;
@@ -2137,7 +2137,7 @@ void GRAPH_OT_fmodifier_add (wmOperatorType *ot)
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
/* id-props */
- ot->prop= RNA_def_enum(ot->srna, "type", fmodifier_type_items, 0, "Type", "");
+ 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."));
}
@@ -2182,9 +2182,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;
@@ -2244,9 +2244,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 a79f1761499..4a5bebb6b91 100644
--- a/source/blender/editors/space_graph/graph_ops.c
+++ b/source/blender/editors/space_graph/graph_ops.c
@@ -165,9 +165,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;
@@ -205,9 +205,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;
@@ -274,7 +274,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 7557aeb24fa..df1932ecf69 100644
--- a/source/blender/editors/space_graph/graph_select.c
+++ b/source/blender/editors/space_graph/graph_select.c
@@ -169,9 +169,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;
@@ -338,9 +338,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;
@@ -370,10 +370,10 @@ void GRAPH_OT_select_border(wmOperatorType *ot)
/* defines for column-select mode */
static EnumPropertyItem prop_column_select_types[] = {
- {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", ""},
+ {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"), ""},
{0, NULL, 0, NULL, NULL}
};
@@ -527,9 +527,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 +539,7 @@ void GRAPH_OT_select_column (wmOperatorType *ot)
ot->flag= OPTYPE_REGISTER/*|OPTYPE_UNDO*/;
/* props */
- ot->prop= RNA_def_enum(ot->srna, "mode", prop_column_select_types, 0, "Mode", "");
+ ot->prop= RNA_def_enum(ot->srna, "mode", RNA_enum_items_gettexted(prop_column_select_types), 0, _("Mode"), "");
}
/* ******************** Select Linked Operator *********************** */
@@ -585,9 +585,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 +663,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 +697,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 +714,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, "Check if Select Left or Right", ""},
- {GRAPHKEYS_LRSEL_LEFT, "LEFT", 0, "Before current frame", ""},
- {GRAPHKEYS_LRSEL_RIGHT, "RIGHT", 0, "After current frame", ""},
+ {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"), ""},
{0, NULL, 0, NULL, NULL}
};
@@ -837,9 +837,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,7 +850,7 @@ void GRAPH_OT_select_leftright (wmOperatorType *ot)
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
/* id-props */
- ot->prop= RNA_def_enum(ot->srna, "mode", prop_graphkeys_leftright_select_types, GRAPHKEYS_LRSEL_TEST, "Mode", "");
+ 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"), "");
}
@@ -1330,9 +1330,9 @@ 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;