[Bf-blender-cvs] [7d08bf4a66f] greasepencil-object: Rename "Copy" color operator to "Rename"

Antonio Vazquez noreply at git.blender.org
Mon Sep 25 11:14:19 CEST 2017


Commit: 7d08bf4a66f33032b3c2f1cffee4a8361556ff80
Author: Antonio Vazquez
Date:   Mon Sep 25 11:14:05 2017 +0200
Branches: greasepencil-object
https://developer.blender.org/rB7d08bf4a66f33032b3c2f1cffee4a8361556ff80

Rename "Copy" color operator to "Rename"

===================================================================

M	release/scripts/startup/bl_ui/properties_grease_pencil_common.py
M	source/blender/editors/sculpt_paint/paint_ops.c

===================================================================

diff --git a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
index aa30818a140..bca4c033c78 100644
--- a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
+++ b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
@@ -991,13 +991,13 @@ class GPENCIL_MT_brush_specials(Menu):
         layout.operator("gpencil.brush_presets_create", icon='HELP', text="Create a Set of Predefined Brushes")
 
 
-class GPENCIL_MT_palettecolor_copy(Menu):
+class GPENCIL_MT_palettecolor_duplicate(Menu):
     bl_label = "Layer"
 
     def draw(self, context):
         layout = self.layout
 
-        layout.operator_enum("palette.palettecolor_copy", "type")
+        layout.operator_enum("palette.palettecolor_duplicate", "type")
 
 class GPENCIL_MT_palettecolor_specials(Menu):
     bl_label = "Layer"
@@ -1014,7 +1014,7 @@ class GPENCIL_MT_palettecolor_specials(Menu):
         layout.operator("palette.palettecolor_unlock_all", icon='UNLOCKED', text="UnLock All")
 
         layout.separator()
-        layout.menu("GPENCIL_MT_palettecolor_copy", icon='PASTEDOWN', text="Copy")
+        layout.menu("GPENCIL_MT_palettecolor_duplicate", icon='PASTEDOWN', text="Duplicate")
 
         layout.separator()
 
@@ -1776,7 +1776,7 @@ classes = (
     GPENCIL_MT_layer_specials,
     GPENCIL_MT_brush_specials,
     GPENCIL_MT_palettecolor_specials,
-    GPENCIL_MT_palettecolor_copy,
+    GPENCIL_MT_palettecolor_duplicate,
     GPENCIL_UL_vgroups
 )
 
diff --git a/source/blender/editors/sculpt_paint/paint_ops.c b/source/blender/editors/sculpt_paint/paint_ops.c
index 3e89b29e97f..cadc258a36e 100644
--- a/source/blender/editors/sculpt_paint/paint_ops.c
+++ b/source/blender/editors/sculpt_paint/paint_ops.c
@@ -725,8 +725,8 @@ static void PALETTE_OT_palettecolor_select(wmOperatorType *ot)
 	ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
 }
 
-/* ***************** Copy Palette color ************************ */
-static int palettecolor_copy_exec(bContext *C, wmOperator *op)
+/* ***************** Duplicate Palette color ************************ */
+static int palettecolor_duplicate_exec(bContext *C, wmOperator *op)
 {
 	Palette *palette = BKE_palette_get_active_from_context(C);
 	PaletteColor *palcolor = BKE_palette_color_get_active(palette);
@@ -762,31 +762,31 @@ static int palettecolor_copy_exec(bContext *C, wmOperator *op)
 	return OPERATOR_FINISHED;
 }
 
-static void PALETTE_OT_palettecolor_copy(wmOperatorType *ot)
+static void PALETTE_OT_palettecolor_duplicate(wmOperatorType *ot)
 {
-	static EnumPropertyItem prop_palettecolor_copy_types[] = {
-		{ 0, "COPY", ICON_PASTEDOWN, "Copy Color", "Copy current palette color" },
-		{ 1, "COPY10", ICON_PASTEDOWN, "Copy Color 10%", "Copy an attenuate version of the selected color" },
-		{ 2, "COPY25", ICON_PASTEDOWN, "Copy Color 25%", "Copy an attenuate version of the selected color" },
-		{ 3, "COPY50", ICON_PASTEDOWN, "Copy Color 50%", "Copy an attenuate version of the selected color" },
-		{ 4, "COPY75", ICON_PASTEDOWN, "Copy Color 75%", "Copy an attenuate version of the selected color" },
+	static EnumPropertyItem prop_palettecolor_dup_types[] = {
+		{ 0, "DUP", ICON_PASTEDOWN, "Duplicate Color", "Duplicate current palette color" },
+		{ 1, "DUP10", ICON_PASTEDOWN, "Duplicate Attenuate 10%", "Duplicate an attenuate version of the selected color" },
+		{ 2, "DUP25", ICON_PASTEDOWN, "Duplicate Attenuate 25%", "Duplicate an attenuate version of the selected color" },
+		{ 3, "DUP50", ICON_PASTEDOWN, "Duplicate Attenuate 50%", "Duplicate an attenuate version of the selected color" },
+		{ 4, "DUP75", ICON_PASTEDOWN, "Duplicate Attenuate 75%", "Duplicate an attenuate version of the selected color" },
 		{ 0, NULL, 0, NULL, NULL }
 	};
 
 	/* identifiers */
-	ot->name = "Copy Color";
-	ot->idname = "PALETTE_OT_palettecolor_copy";
-	ot->description = "Copy current palette color";
+	ot->name = "Duplicate Color";
+	ot->idname = "PALETTE_OT_palettecolor_duplicate";
+	ot->description = "Duplicate current palette color";
 
 	/* callbacks */
-	ot->exec = palettecolor_copy_exec;
+	ot->exec = palettecolor_duplicate_exec;
 	ot->poll = palettecolor_active_poll;
 
 	/* flags */
 	ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
 
 	/* props */
-	ot->prop = RNA_def_enum(ot->srna, "type", prop_palettecolor_copy_types, 0, "Type", "Method used for copying colors");
+	ot->prop = RNA_def_enum(ot->srna, "type", prop_palettecolor_dup_types, 0, "Type", "Method used for duplicating colors");
 }
 
 
@@ -1830,7 +1830,7 @@ void ED_operatortypes_paint(void)
 	WM_operatortype_append(PALETTE_OT_palettecolor_unlock_all);
 	WM_operatortype_append(PALETTE_OT_palettecolor_move);
 	WM_operatortype_append(PALETTE_OT_palettecolor_select);
-	WM_operatortype_append(PALETTE_OT_palettecolor_copy);
+	WM_operatortype_append(PALETTE_OT_palettecolor_duplicate);
 
 	/* paint curve */
 	WM_operatortype_append(PAINTCURVE_OT_new);



More information about the Bf-blender-cvs mailing list