UI: replace "copy/paste buffer" by "internal clipboard" #106060

Merged
Sybren A. Stüvel merged 2 commits from pioverfour/blender:dp_rename_copy_buffer into main 2023-04-14 12:12:44 +02:00
14 changed files with 44 additions and 38 deletions

View File

@ -741,7 +741,7 @@ bool ANIM_driver_vars_paste(ReportList *reports, FCurve *fcu, bool replace)
/* sanity checks */ /* sanity checks */
if (BLI_listbase_is_empty(&driver_vars_copybuf)) { 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; return false;
} }
@ -1257,7 +1257,7 @@ void ANIM_OT_paste_driver_button(wmOperatorType *ot)
/* identifiers */ /* identifiers */
ot->name = "Paste Driver"; ot->name = "Paste Driver";
ot->idname = "ANIM_OT_paste_driver_button"; 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 */ /* callbacks */
ot->exec = paste_driver_button_exec; ot->exec = paste_driver_button_exec;

View File

@ -798,7 +798,7 @@ static int pose_copy_exec(bContext *C, wmOperator *op)
BLI_listbase_clear(&temp_bmain->armatures); BLI_listbase_clear(&temp_bmain->armatures);
BKE_main_free(temp_bmain); BKE_main_free(temp_bmain);
/* We are all done! */ /* 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; return OPERATOR_FINISHED;
} }
@ -807,7 +807,7 @@ void POSE_OT_copy(wmOperatorType *ot)
/* identifiers */ /* identifiers */
ot->name = "Copy Pose"; ot->name = "Copy Pose";
ot->idname = "POSE_OT_copy"; 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 */ /* api callbacks */
ot->exec = pose_copy_exec; 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"); BLI_path_join(str, sizeof(str), BKE_tempdir_base(), "copybuffer_pose.blend");
if (!BKE_copybuffer_read(tmp_bmain, str, op->reports, FILTER_ID_OB)) { 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); BKE_main_free(tmp_bmain);
return OPERATOR_CANCELLED; return OPERATOR_CANCELLED;
} }
/* Make sure data from this file is usable for pose paste. */ /* Make sure data from this file is usable for pose paste. */
if (BLI_listbase_count_at_most(&tmp_bmain->objects, 2) != 1) { 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); BKE_main_free(tmp_bmain);
return OPERATOR_CANCELLED; return OPERATOR_CANCELLED;
} }
@ -860,7 +860,7 @@ static int pose_paste_exec(bContext *C, wmOperator *op)
Object *object_from = tmp_bmain->objects.first; Object *object_from = tmp_bmain->objects.first;
bPose *pose_from = object_from->pose; bPose *pose_from = object_from->pose;
if (pose_from == NULL) { 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); BKE_main_free(tmp_bmain);
return OPERATOR_CANCELLED; return OPERATOR_CANCELLED;
} }

View File

@ -245,8 +245,8 @@ static void UI_OT_copy_as_driver_button(wmOperatorType *ot)
ot->idname = "UI_OT_copy_as_driver_button"; ot->idname = "UI_OT_copy_as_driver_button";
ot->description = ot->description =
"Create a new driver with this property as input, and copy it to the " "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 " "internal clipboard. Use Paste Driver to add it to the target property, "
"Driver Variables to extend an existing driver"; "or Paste Driver Variables to extend an existing driver";
/* callbacks */ /* callbacks */
ot->exec = copy_as_driver_button_exec; ot->exec = copy_as_driver_button_exec;

View File

@ -2069,7 +2069,7 @@ void MASK_OT_copy_splines(wmOperatorType *ot)
{ {
/* identifiers */ /* identifiers */
ot->name = "Copy Splines"; 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"; ot->idname = "MASK_OT_copy_splines";
/* api callbacks */ /* api callbacks */
@ -2113,7 +2113,7 @@ void MASK_OT_paste_splines(wmOperatorType *ot)
{ {
/* identifiers */ /* identifiers */
ot->name = "Paste Splines"; ot->name = "Paste Splines";
ot->description = "Paste splines from clipboard"; ot->description = "Paste splines from the internal clipboard";
ot->idname = "MASK_OT_paste_splines"; ot->idname = "MASK_OT_paste_splines";
/* api callbacks */ /* api callbacks */

View File

@ -9370,8 +9370,12 @@ enum {
}; };
static EnumPropertyItem normal_vector_tool_items[] = { static EnumPropertyItem normal_vector_tool_items[] = {
{EDBM_CLNOR_TOOLS_COPY, "COPY", 0, "Copy Normal", "Copy normal to 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 buffer"}, {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_ADD, "ADD", 0, "Add Normal", "Add normal vector with selection"},
{EDBM_CLNOR_TOOLS_MULTIPLY, {EDBM_CLNOR_TOOLS_MULTIPLY,
"MULTIPLY", "MULTIPLY",
@ -9382,7 +9386,7 @@ static EnumPropertyItem normal_vector_tool_items[] = {
"RESET", "RESET",
0, 0,
"Reset Normal", "Reset Normal",
"Reset buffer and/or normal of selected element"}, "Reset the internal clipboard and/or normal of selected element"},
{0, nullptr, 0, nullptr, nullptr}, {0, nullptr, 0, nullptr, nullptr},
}; };

View File

@ -1829,7 +1829,7 @@ void SCENE_OT_freestyle_lineset_copy(wmOperatorType *ot)
/* identifiers */ /* identifiers */
ot->name = "Copy Line Set"; ot->name = "Copy Line Set";
ot->idname = "SCENE_OT_freestyle_lineset_copy"; 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 */ /* api callbacks */
ot->exec = freestyle_lineset_copy_exec; ot->exec = freestyle_lineset_copy_exec;
@ -1863,7 +1863,7 @@ void SCENE_OT_freestyle_lineset_paste(wmOperatorType *ot)
/* identifiers */ /* identifiers */
ot->name = "Paste Line Set"; ot->name = "Paste Line Set";
ot->idname = "SCENE_OT_freestyle_lineset_paste"; 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 */ /* api callbacks */
ot->exec = freestyle_lineset_paste_exec; ot->exec = freestyle_lineset_paste_exec;

View File

@ -576,7 +576,7 @@ static int actkeys_copy_exec(bContext *C, wmOperator *op)
if (ac.datatype == ANIMCONT_GPENCIL) { if (ac.datatype == ANIMCONT_GPENCIL) {
if (ED_gpencil_anim_copybuf_copy(&ac) == false) { if (ED_gpencil_anim_copybuf_copy(&ac) == false) {
/* check if anything ended up in the buffer */ /* 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; 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); const bool gpf_ok = ED_gpencil_anim_copybuf_copy(&ac);
if (kf_empty && !gpf_ok) { 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; return OPERATOR_CANCELLED;
} }
} }
@ -604,7 +604,7 @@ void ACTION_OT_copy(wmOperatorType *ot)
/* identifiers */ /* identifiers */
ot->name = "Copy Keyframes"; ot->name = "Copy Keyframes";
ot->idname = "ACTION_OT_copy"; 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 */ /* api callbacks */
ot->exec = actkeys_copy_exec; ot->exec = actkeys_copy_exec;
@ -635,7 +635,7 @@ static int actkeys_paste_exec(bContext *C, wmOperator *op)
/* paste keyframes */ /* paste keyframes */
if (ac.datatype == ANIMCONT_GPENCIL) { if (ac.datatype == ANIMCONT_GPENCIL) {
if (ED_gpencil_anim_copybuf_paste(&ac, offset_mode) == false) { 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; return OPERATOR_CANCELLED;
} }
} }
@ -664,7 +664,7 @@ static int actkeys_paste_exec(bContext *C, wmOperator *op)
return OPERATOR_CANCELLED; return OPERATOR_CANCELLED;
case KEYFRAME_PASTE_NOTHING_TO_PASTE: 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; return OPERATOR_CANCELLED;
} }
} }
@ -698,7 +698,8 @@ void ACTION_OT_paste(wmOperatorType *ot)
ot->name = "Paste Keyframes"; ot->name = "Paste Keyframes";
ot->idname = "ACTION_OT_paste"; ot->idname = "ACTION_OT_paste";
ot->description = 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"; "frame";
/* api callbacks */ /* api callbacks */

View File

@ -1874,7 +1874,7 @@ void CLIP_OT_copy_tracks(wmOperatorType *ot)
{ {
/* identifiers */ /* identifiers */
ot->name = "Copy Tracks"; 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"; ot->idname = "CLIP_OT_copy_tracks";
/* api callbacks */ /* api callbacks */
@ -1919,7 +1919,7 @@ void CLIP_OT_paste_tracks(wmOperatorType *ot)
{ {
/* identifiers */ /* identifiers */
ot->name = "Paste Tracks"; ot->name = "Paste Tracks";
ot->description = "Paste tracks from clipboard"; ot->description = "Paste tracks from the internal clipboard";
ot->idname = "CLIP_OT_paste_tracks"; ot->idname = "CLIP_OT_paste_tracks";
/* api callbacks */ /* api callbacks */

View File

@ -523,7 +523,7 @@ static int graphkeys_copy_exec(bContext *C, wmOperator *op)
/* Copy keyframes. */ /* Copy keyframes. */
if (copy_graph_keys(&ac)) { 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; return OPERATOR_CANCELLED;
} }
@ -536,7 +536,7 @@ void GRAPH_OT_copy(wmOperatorType *ot)
/* Identifiers */ /* Identifiers */
ot->name = "Copy Keyframes"; ot->name = "Copy Keyframes";
ot->idname = "GRAPH_OT_copy"; 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 */ /* API callbacks */
ot->exec = graphkeys_copy_exec; ot->exec = graphkeys_copy_exec;
@ -574,7 +574,7 @@ static int graphkeys_paste_exec(bContext *C, wmOperator *op)
return OPERATOR_CANCELLED; return OPERATOR_CANCELLED;
case KEYFRAME_PASTE_NOTHING_TO_PASTE: 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; return OPERATOR_CANCELLED;
} }
@ -605,7 +605,8 @@ void GRAPH_OT_paste(wmOperatorType *ot)
ot->name = "Paste Keyframes"; ot->name = "Paste Keyframes";
ot->idname = "GRAPH_OT_paste"; ot->idname = "GRAPH_OT_paste";
ot->description = 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"; "frame";
/* API callbacks */ /* API callbacks */

View File

@ -167,7 +167,7 @@ static int node_clipboard_copy_exec(bContext *C, wmOperator * /*op*/)
void NODE_OT_clipboard_copy(wmOperatorType *ot) void NODE_OT_clipboard_copy(wmOperatorType *ot)
{ {
ot->name = "Copy to Clipboard"; 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->idname = "NODE_OT_clipboard_copy";
ot->exec = node_clipboard_copy_exec; 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(); const bool is_valid = clipboard.validate();
if (clipboard.nodes.is_empty()) { 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; 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) void NODE_OT_clipboard_paste(wmOperatorType *ot)
{ {
ot->name = "Paste from Clipboard"; 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->idname = "NODE_OT_clipboard_paste";
ot->invoke = node_clipboard_paste_invoke; ot->invoke = node_clipboard_paste_invoke;

View File

@ -822,7 +822,7 @@ void OUTLINER_OT_id_copy(wmOperatorType *ot)
/* identifiers */ /* identifiers */
ot->name = "Outliner ID Data Copy"; ot->name = "Outliner ID Data Copy";
ot->idname = "OUTLINER_OT_id_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 */ /* callbacks */
ot->exec = outliner_id_copy_exec; ot->exec = outliner_id_copy_exec;
@ -863,7 +863,7 @@ void OUTLINER_OT_id_paste(wmOperatorType *ot)
/* identifiers */ /* identifiers */
ot->name = "Outliner ID Data Paste"; ot->name = "Outliner ID Data Paste";
ot->idname = "OUTLINER_OT_id_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 */ /* callbacks */
ot->exec = outliner_id_paste_exec; ot->exec = outliner_id_paste_exec;

View File

@ -2483,7 +2483,7 @@ void SEQUENCER_OT_copy(wmOperatorType *ot)
/* Identifiers. */ /* Identifiers. */
ot->name = "Copy"; ot->name = "Copy";
ot->idname = "SEQUENCER_OT_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. */ /* Api callbacks. */
ot->exec = sequencer_copy_exec; ot->exec = sequencer_copy_exec;
@ -2630,7 +2630,7 @@ void SEQUENCER_OT_paste(wmOperatorType *ot)
/* Identifiers. */ /* Identifiers. */
ot->name = "Paste"; ot->name = "Paste";
ot->idname = "SEQUENCER_OT_paste"; ot->idname = "SEQUENCER_OT_paste";
ot->description = "Paste strips from clipboard"; ot->description = "Paste strips from the internal clipboard";
/* Api callbacks. */ /* Api callbacks. */
ot->exec = sequencer_paste_exec; ot->exec = sequencer_paste_exec;

View File

@ -72,7 +72,7 @@ static void VIEW3D_OT_copybuffer(wmOperatorType *ot)
/* identifiers */ /* identifiers */
ot->name = "Copy Objects"; ot->name = "Copy Objects";
ot->idname = "VIEW3D_OT_copybuffer"; 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 */ /* api callbacks */
ot->exec = view3d_copybuffer_exec; ot->exec = view3d_copybuffer_exec;
@ -113,7 +113,7 @@ static void VIEW3D_OT_pastebuffer(wmOperatorType *ot)
/* identifiers */ /* identifiers */
ot->name = "Paste Objects"; ot->name = "Paste Objects";
ot->idname = "VIEW3D_OT_pastebuffer"; ot->idname = "VIEW3D_OT_pastebuffer";
ot->description = "Objects from the clipboard are pasted"; ot->description = "Paste objects from the internal clipboard";
/* api callbacks */ /* api callbacks */
ot->exec = view3d_pastebuffer_exec; ot->exec = view3d_pastebuffer_exec;

View File

@ -248,7 +248,7 @@ const EnumPropertyItem rna_enum_brush_gpencil_sculpt_types_items[] = {
"CLONE", "CLONE",
ICON_GPBRUSH_CLONE, ICON_GPBRUSH_CLONE,
"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}}; {0, NULL, 0, NULL, NULL}};
const EnumPropertyItem rna_enum_brush_gpencil_weight_types_items[] = { const EnumPropertyItem rna_enum_brush_gpencil_weight_types_items[] = {