From cb8ee111ef580282631045eb4ab6f485807c461c Mon Sep 17 00:00:00 2001 From: Damien Picard Date: Thu, 23 Mar 2023 22:23:17 +0100 Subject: [PATCH 1/2] UI: replace "copy/paste buffer" with "internal clipboard" To refer to a temporary buffer used to store data to recall later, Blender still uses the term "[copy/paste] buffer]. But a buffer is a technical term, most often referred to using the metaphor of a "clipboard" in applications. Changes from "[copy/paste] buffer" to "clipboard" was already started in some previous commits da6d6f99a88eb, 14b60c3a1caf. This commit should tackle the remaining occurrences. However, the "clipboard" is usually the system clipboard, used to carry data across applications. To avoid confusion, this replaces "clipboard" with "internal clipboard". This commit affects mostly animation (poses, keyframes) but it also involves one change for Freestyle line styles, and one for the mesh normals in modeling. Review: https://projects.blender.org/blender/blender/pulls/106060 --- source/blender/editors/armature/pose_transform.c | 10 +++++----- source/blender/editors/mesh/editmesh_tools.cc | 10 +++++++--- source/blender/editors/render/render_shading.cc | 4 ++-- source/blender/editors/space_action/action_edit.cc | 13 +++++++------ source/blender/editors/space_graph/graph_edit.c | 9 +++++---- 5 files changed, 26 insertions(+), 20 deletions(-) diff --git a/source/blender/editors/armature/pose_transform.c b/source/blender/editors/armature/pose_transform.c index 7f384c36af0..6466ecc6dac 100644 --- a/source/blender/editors/armature/pose_transform.c +++ b/source/blender/editors/armature/pose_transform.c @@ -798,7 +798,7 @@ static int pose_copy_exec(bContext *C, wmOperator *op) BLI_listbase_clear(&temp_bmain->armatures); BKE_main_free(temp_bmain); /* We are all done! */ - BKE_report(op->reports, RPT_INFO, "Copied pose to buffer"); + BKE_report(op->reports, RPT_INFO, "Copied pose to internal clipboard"); return OPERATOR_FINISHED; } @@ -807,7 +807,7 @@ void POSE_OT_copy(wmOperatorType *ot) /* identifiers */ 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 = "Copy the current pose of the selected bones to the internal clipboard"; /* api callbacks */ ot->exec = pose_copy_exec; @@ -846,13 +846,13 @@ static int pose_paste_exec(bContext *C, wmOperator *op) BLI_path_join(str, sizeof(str), BKE_tempdir_base(), "copybuffer_pose.blend"); if (!BKE_copybuffer_read(tmp_bmain, str, op->reports, FILTER_ID_OB)) { - BKE_report(op->reports, RPT_ERROR, "Copy buffer is empty"); + BKE_report(op->reports, RPT_ERROR, "Internal clipboard is empty"); BKE_main_free(tmp_bmain); return OPERATOR_CANCELLED; } /* Make sure data from this file is usable for pose paste. */ if (BLI_listbase_count_at_most(&tmp_bmain->objects, 2) != 1) { - BKE_report(op->reports, RPT_ERROR, "Copy buffer is not from pose mode"); + BKE_report(op->reports, RPT_ERROR, "Internal clipboard is not from pose mode"); BKE_main_free(tmp_bmain); return OPERATOR_CANCELLED; } @@ -860,7 +860,7 @@ static int pose_paste_exec(bContext *C, wmOperator *op) Object *object_from = tmp_bmain->objects.first; bPose *pose_from = object_from->pose; if (pose_from == NULL) { - BKE_report(op->reports, RPT_ERROR, "Copy buffer has no pose"); + BKE_report(op->reports, RPT_ERROR, "Internal clipboard has no pose"); BKE_main_free(tmp_bmain); return OPERATOR_CANCELLED; } diff --git a/source/blender/editors/mesh/editmesh_tools.cc b/source/blender/editors/mesh/editmesh_tools.cc index e17c5db1278..6c0316ccc7c 100644 --- a/source/blender/editors/mesh/editmesh_tools.cc +++ b/source/blender/editors/mesh/editmesh_tools.cc @@ -9370,8 +9370,12 @@ enum { }; static EnumPropertyItem normal_vector_tool_items[] = { - {EDBM_CLNOR_TOOLS_COPY, "COPY", 0, "Copy Normal", "Copy normal to buffer"}, - {EDBM_CLNOR_TOOLS_PASTE, "PASTE", 0, "Paste Normal", "Paste normal from buffer"}, + {EDBM_CLNOR_TOOLS_COPY, "COPY", 0, "Copy Normal", "Copy normal to the internal clipboard"}, + {EDBM_CLNOR_TOOLS_PASTE, + "PASTE", + 0, + "Paste Normal", + "Paste normal from the internal clipboard"}, {EDBM_CLNOR_TOOLS_ADD, "ADD", 0, "Add Normal", "Add normal vector with selection"}, {EDBM_CLNOR_TOOLS_MULTIPLY, "MULTIPLY", @@ -9382,7 +9386,7 @@ static EnumPropertyItem normal_vector_tool_items[] = { "RESET", 0, "Reset Normal", - "Reset buffer and/or normal of selected element"}, + "Reset internal clipboard and/or normal of selected element"}, {0, nullptr, 0, nullptr, nullptr}, }; diff --git a/source/blender/editors/render/render_shading.cc b/source/blender/editors/render/render_shading.cc index 452b6228e50..d26fceb9814 100644 --- a/source/blender/editors/render/render_shading.cc +++ b/source/blender/editors/render/render_shading.cc @@ -1829,7 +1829,7 @@ void SCENE_OT_freestyle_lineset_copy(wmOperatorType *ot) /* identifiers */ ot->name = "Copy Line Set"; ot->idname = "SCENE_OT_freestyle_lineset_copy"; - ot->description = "Copy the active line set to a buffer"; + ot->description = "Copy the active line set to the internal clipboard"; /* api callbacks */ ot->exec = freestyle_lineset_copy_exec; @@ -1863,7 +1863,7 @@ void SCENE_OT_freestyle_lineset_paste(wmOperatorType *ot) /* identifiers */ ot->name = "Paste Line Set"; ot->idname = "SCENE_OT_freestyle_lineset_paste"; - ot->description = "Paste the buffer content to the active line set"; + ot->description = "Paste the internal clipboard content to the active line set"; /* api callbacks */ ot->exec = freestyle_lineset_paste_exec; diff --git a/source/blender/editors/space_action/action_edit.cc b/source/blender/editors/space_action/action_edit.cc index d805f3cce5e..a4fc80094fb 100644 --- a/source/blender/editors/space_action/action_edit.cc +++ b/source/blender/editors/space_action/action_edit.cc @@ -576,7 +576,7 @@ static int actkeys_copy_exec(bContext *C, wmOperator *op) if (ac.datatype == ANIMCONT_GPENCIL) { if (ED_gpencil_anim_copybuf_copy(&ac) == false) { /* check if anything ended up in the buffer */ - BKE_report(op->reports, RPT_ERROR, "No keyframes copied to keyframes copy/paste buffer"); + BKE_report(op->reports, RPT_ERROR, "No keyframes copied to the internal clipboard"); return OPERATOR_CANCELLED; } } @@ -591,7 +591,7 @@ static int actkeys_copy_exec(bContext *C, wmOperator *op) const bool gpf_ok = ED_gpencil_anim_copybuf_copy(&ac); if (kf_empty && !gpf_ok) { - BKE_report(op->reports, RPT_ERROR, "No keyframes copied to keyframes copy/paste buffer"); + BKE_report(op->reports, RPT_ERROR, "No keyframes copied to the internal clipboard"); return OPERATOR_CANCELLED; } } @@ -604,7 +604,7 @@ void ACTION_OT_copy(wmOperatorType *ot) /* identifiers */ ot->name = "Copy Keyframes"; ot->idname = "ACTION_OT_copy"; - ot->description = "Copy selected keyframes to the copy/paste buffer"; + ot->description = "Copy selected keyframes to the internal clipboard"; /* api callbacks */ ot->exec = actkeys_copy_exec; @@ -635,7 +635,7 @@ static int actkeys_paste_exec(bContext *C, wmOperator *op) /* paste keyframes */ if (ac.datatype == ANIMCONT_GPENCIL) { if (ED_gpencil_anim_copybuf_paste(&ac, offset_mode) == false) { - BKE_report(op->reports, RPT_ERROR, "No data in buffer to paste"); + BKE_report(op->reports, RPT_ERROR, "No data in the internal clipboard to paste"); return OPERATOR_CANCELLED; } } @@ -664,7 +664,7 @@ static int actkeys_paste_exec(bContext *C, wmOperator *op) return OPERATOR_CANCELLED; case KEYFRAME_PASTE_NOTHING_TO_PASTE: - BKE_report(op->reports, RPT_ERROR, "No data in buffer to paste"); + BKE_report(op->reports, RPT_ERROR, "No data in the internal clipboard to paste"); return OPERATOR_CANCELLED; } } @@ -698,7 +698,8 @@ void ACTION_OT_paste(wmOperatorType *ot) ot->name = "Paste Keyframes"; ot->idname = "ACTION_OT_paste"; ot->description = - "Paste keyframes from copy/paste buffer for the selected channels, starting on the current " + "Paste keyframes from the internal clipboard for the selected channels, starting on the " + "current " "frame"; /* api callbacks */ diff --git a/source/blender/editors/space_graph/graph_edit.c b/source/blender/editors/space_graph/graph_edit.c index 0efc653c81b..941e211c3ad 100644 --- a/source/blender/editors/space_graph/graph_edit.c +++ b/source/blender/editors/space_graph/graph_edit.c @@ -523,7 +523,7 @@ static int graphkeys_copy_exec(bContext *C, wmOperator *op) /* Copy keyframes. */ if (copy_graph_keys(&ac)) { - BKE_report(op->reports, RPT_ERROR, "No keyframes copied to keyframes copy/paste buffer"); + BKE_report(op->reports, RPT_ERROR, "No keyframes copied to the internal clipboard"); return OPERATOR_CANCELLED; } @@ -536,7 +536,7 @@ void GRAPH_OT_copy(wmOperatorType *ot) /* Identifiers */ 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 internal clipboard"; /* API callbacks */ ot->exec = graphkeys_copy_exec; @@ -574,7 +574,7 @@ static int graphkeys_paste_exec(bContext *C, wmOperator *op) return OPERATOR_CANCELLED; case KEYFRAME_PASTE_NOTHING_TO_PASTE: - BKE_report(op->reports, RPT_ERROR, "No data in buffer to paste"); + BKE_report(op->reports, RPT_ERROR, "No data in the internal clipboard to paste"); return OPERATOR_CANCELLED; } @@ -605,7 +605,8 @@ void GRAPH_OT_paste(wmOperatorType *ot) 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 " + "Paste keyframes from the internal clipboard for the selected channels, starting on the " + "current " "frame"; /* API callbacks */ -- 2.30.2 From 6d8256ecdbe329a87964a1097d2cf2d5e2bde2ac Mon Sep 17 00:00:00 2001 From: Damien Picard Date: Thu, 6 Apr 2023 21:47:00 +0200 Subject: [PATCH 2/2] UI: replace "clipboard" with "internal clipboard" when relevant Following up the previous commit which replaces "[copy/paste] buffer" with the newly-introduced "internal clipboard", this commit adds "internal" before existing occurrences of "clipboard", when not dealing with the system clipboard. This distinction is useful so that the user will not expect something copied to the clipboard (say a node or object) to be pastable to another application. I took the opportunity to slightly rephrase some descriptions closer to the human interface guidelines, like using the imperative and articles. Review: https://projects.blender.org/blender/blender/pulls/106060 --- source/blender/editors/animation/drivers.c | 4 ++-- source/blender/editors/interface/interface_ops.cc | 4 ++-- source/blender/editors/mask/mask_ops.c | 4 ++-- source/blender/editors/mesh/editmesh_tools.cc | 2 +- source/blender/editors/space_clip/tracking_ops.cc | 4 ++-- source/blender/editors/space_node/clipboard.cc | 6 +++--- source/blender/editors/space_outliner/outliner_edit.cc | 4 ++-- source/blender/editors/space_sequencer/sequencer_edit.c | 4 ++-- source/blender/editors/space_view3d/view3d_ops.c | 4 ++-- source/blender/makesrna/intern/rna_brush.c | 2 +- 10 files changed, 19 insertions(+), 19 deletions(-) diff --git a/source/blender/editors/animation/drivers.c b/source/blender/editors/animation/drivers.c index 3dfcd076f17..cbc8e1d5105 100644 --- a/source/blender/editors/animation/drivers.c +++ b/source/blender/editors/animation/drivers.c @@ -741,7 +741,7 @@ bool ANIM_driver_vars_paste(ReportList *reports, FCurve *fcu, bool replace) /* sanity checks */ if (BLI_listbase_is_empty(&driver_vars_copybuf)) { - BKE_report(reports, RPT_ERROR, "No driver variables in clipboard to paste"); + BKE_report(reports, RPT_ERROR, "No driver variables in the internal clipboard to paste"); return false; } @@ -1257,7 +1257,7 @@ void ANIM_OT_paste_driver_button(wmOperatorType *ot) /* identifiers */ ot->name = "Paste Driver"; ot->idname = "ANIM_OT_paste_driver_button"; - ot->description = "Paste the driver in the clipboard to the highlighted button"; + ot->description = "Paste the driver in the internal clipboard to the highlighted button"; /* callbacks */ ot->exec = paste_driver_button_exec; diff --git a/source/blender/editors/interface/interface_ops.cc b/source/blender/editors/interface/interface_ops.cc index 0d52993a47a..e133e54fea7 100644 --- a/source/blender/editors/interface/interface_ops.cc +++ b/source/blender/editors/interface/interface_ops.cc @@ -245,8 +245,8 @@ static void UI_OT_copy_as_driver_button(wmOperatorType *ot) ot->idname = "UI_OT_copy_as_driver_button"; ot->description = "Create a new driver with this property as input, and copy it to the " - "clipboard. Use Paste Driver to add it to the target property, or Paste " - "Driver Variables to extend an existing driver"; + "internal clipboard. Use Paste Driver to add it to the target property, " + "or Paste Driver Variables to extend an existing driver"; /* callbacks */ ot->exec = copy_as_driver_button_exec; diff --git a/source/blender/editors/mask/mask_ops.c b/source/blender/editors/mask/mask_ops.c index fcabc1bc1ec..58b3b07e1be 100644 --- a/source/blender/editors/mask/mask_ops.c +++ b/source/blender/editors/mask/mask_ops.c @@ -2069,7 +2069,7 @@ void MASK_OT_copy_splines(wmOperatorType *ot) { /* identifiers */ ot->name = "Copy Splines"; - ot->description = "Copy selected splines to clipboard"; + ot->description = "Copy the selected splines to the internal clipboard"; ot->idname = "MASK_OT_copy_splines"; /* api callbacks */ @@ -2113,7 +2113,7 @@ void MASK_OT_paste_splines(wmOperatorType *ot) { /* identifiers */ ot->name = "Paste Splines"; - ot->description = "Paste splines from clipboard"; + ot->description = "Paste splines from the internal clipboard"; ot->idname = "MASK_OT_paste_splines"; /* api callbacks */ diff --git a/source/blender/editors/mesh/editmesh_tools.cc b/source/blender/editors/mesh/editmesh_tools.cc index 6c0316ccc7c..7411bd4a4f8 100644 --- a/source/blender/editors/mesh/editmesh_tools.cc +++ b/source/blender/editors/mesh/editmesh_tools.cc @@ -9386,7 +9386,7 @@ static EnumPropertyItem normal_vector_tool_items[] = { "RESET", 0, "Reset Normal", - "Reset internal clipboard and/or normal of selected element"}, + "Reset the internal clipboard and/or normal of selected element"}, {0, nullptr, 0, nullptr, nullptr}, }; diff --git a/source/blender/editors/space_clip/tracking_ops.cc b/source/blender/editors/space_clip/tracking_ops.cc index ae59cf672a1..48782a51145 100644 --- a/source/blender/editors/space_clip/tracking_ops.cc +++ b/source/blender/editors/space_clip/tracking_ops.cc @@ -1874,7 +1874,7 @@ void CLIP_OT_copy_tracks(wmOperatorType *ot) { /* identifiers */ ot->name = "Copy Tracks"; - ot->description = "Copy selected tracks to clipboard"; + ot->description = "Copy the selected tracks to the internal clipboard"; ot->idname = "CLIP_OT_copy_tracks"; /* api callbacks */ @@ -1919,7 +1919,7 @@ void CLIP_OT_paste_tracks(wmOperatorType *ot) { /* identifiers */ ot->name = "Paste Tracks"; - ot->description = "Paste tracks from clipboard"; + ot->description = "Paste tracks from the internal clipboard"; ot->idname = "CLIP_OT_paste_tracks"; /* api callbacks */ diff --git a/source/blender/editors/space_node/clipboard.cc b/source/blender/editors/space_node/clipboard.cc index df11489f757..a0bab859025 100644 --- a/source/blender/editors/space_node/clipboard.cc +++ b/source/blender/editors/space_node/clipboard.cc @@ -167,7 +167,7 @@ static int node_clipboard_copy_exec(bContext *C, wmOperator * /*op*/) void NODE_OT_clipboard_copy(wmOperatorType *ot) { ot->name = "Copy to Clipboard"; - ot->description = "Copies selected nodes to the clipboard"; + ot->description = "Copy the selected nodes to the internal clipboard"; ot->idname = "NODE_OT_clipboard_copy"; ot->exec = node_clipboard_copy_exec; @@ -191,7 +191,7 @@ static int node_clipboard_paste_exec(bContext *C, wmOperator *op) const bool is_valid = clipboard.validate(); if (clipboard.nodes.is_empty()) { - BKE_report(op->reports, RPT_ERROR, "Clipboard is empty"); + BKE_report(op->reports, RPT_ERROR, "The internal clipboard is empty"); return OPERATOR_CANCELLED; } @@ -311,7 +311,7 @@ static int node_clipboard_paste_invoke(bContext *C, wmOperator *op, const wmEven void NODE_OT_clipboard_paste(wmOperatorType *ot) { ot->name = "Paste from Clipboard"; - ot->description = "Pastes nodes from the clipboard to the active node tree"; + ot->description = "Paste nodes from the internal clipboard to the active node tree"; ot->idname = "NODE_OT_clipboard_paste"; ot->invoke = node_clipboard_paste_invoke; diff --git a/source/blender/editors/space_outliner/outliner_edit.cc b/source/blender/editors/space_outliner/outliner_edit.cc index 62f851d4c6e..4ea83f4720c 100644 --- a/source/blender/editors/space_outliner/outliner_edit.cc +++ b/source/blender/editors/space_outliner/outliner_edit.cc @@ -822,7 +822,7 @@ void OUTLINER_OT_id_copy(wmOperatorType *ot) /* identifiers */ ot->name = "Outliner ID Data Copy"; ot->idname = "OUTLINER_OT_id_copy"; - ot->description = "Selected data-blocks are copied to the clipboard"; + ot->description = "Copy the selected data-blocks to the internal clipboard"; /* callbacks */ ot->exec = outliner_id_copy_exec; @@ -863,7 +863,7 @@ void OUTLINER_OT_id_paste(wmOperatorType *ot) /* identifiers */ ot->name = "Outliner ID Data Paste"; ot->idname = "OUTLINER_OT_id_paste"; - ot->description = "Data-blocks from the clipboard are pasted"; + ot->description = "Paste data-blocks from the internal clipboard"; /* callbacks */ ot->exec = outliner_id_paste_exec; diff --git a/source/blender/editors/space_sequencer/sequencer_edit.c b/source/blender/editors/space_sequencer/sequencer_edit.c index f6a9ae8dc60..ba5e770f81c 100644 --- a/source/blender/editors/space_sequencer/sequencer_edit.c +++ b/source/blender/editors/space_sequencer/sequencer_edit.c @@ -2483,7 +2483,7 @@ void SEQUENCER_OT_copy(wmOperatorType *ot) /* Identifiers. */ ot->name = "Copy"; ot->idname = "SEQUENCER_OT_copy"; - ot->description = "Copy selected strips to clipboard"; + ot->description = "Copy the selected strips to the internal clipboard"; /* Api callbacks. */ ot->exec = sequencer_copy_exec; @@ -2630,7 +2630,7 @@ void SEQUENCER_OT_paste(wmOperatorType *ot) /* Identifiers. */ ot->name = "Paste"; ot->idname = "SEQUENCER_OT_paste"; - ot->description = "Paste strips from clipboard"; + ot->description = "Paste strips from the internal clipboard"; /* Api callbacks. */ ot->exec = sequencer_paste_exec; diff --git a/source/blender/editors/space_view3d/view3d_ops.c b/source/blender/editors/space_view3d/view3d_ops.c index 0274ff603c6..c808d810680 100644 --- a/source/blender/editors/space_view3d/view3d_ops.c +++ b/source/blender/editors/space_view3d/view3d_ops.c @@ -72,7 +72,7 @@ static void VIEW3D_OT_copybuffer(wmOperatorType *ot) /* identifiers */ ot->name = "Copy Objects"; ot->idname = "VIEW3D_OT_copybuffer"; - ot->description = "Selected objects are copied to the clipboard"; + ot->description = "Copy the selected objects to the internal clipboard"; /* api callbacks */ ot->exec = view3d_copybuffer_exec; @@ -113,7 +113,7 @@ static void VIEW3D_OT_pastebuffer(wmOperatorType *ot) /* identifiers */ ot->name = "Paste Objects"; ot->idname = "VIEW3D_OT_pastebuffer"; - ot->description = "Objects from the clipboard are pasted"; + ot->description = "Paste objects from the internal clipboard"; /* api callbacks */ ot->exec = view3d_pastebuffer_exec; diff --git a/source/blender/makesrna/intern/rna_brush.c b/source/blender/makesrna/intern/rna_brush.c index d145e7c9f5b..6acb87174ba 100644 --- a/source/blender/makesrna/intern/rna_brush.c +++ b/source/blender/makesrna/intern/rna_brush.c @@ -248,7 +248,7 @@ const EnumPropertyItem rna_enum_brush_gpencil_sculpt_types_items[] = { "CLONE", ICON_GPBRUSH_CLONE, "Clone", - "Paste copies of the strokes stored on the clipboard"}, + "Paste copies of the strokes stored on the internal clipboard"}, {0, NULL, 0, NULL, NULL}}; const EnumPropertyItem rna_enum_brush_gpencil_weight_types_items[] = { -- 2.30.2