From f6655ab06ccd1592837e83a6f246e8601694afcb Mon Sep 17 00:00:00 2001
From: Falk David <falk@blender.org>
Date: Wed, 8 Nov 2023 14:59:22 +0100
Subject: [PATCH] Fix #114453: Grease Pencil shows up as "Grease Pencil
 (legacy)" in some places

In Blender 4.0 Grease Pencil was showing up as "Grease Pencil (legacy)" in the UI in some places.
Since the current Grease Pencil is not replaced yet, it shouldn't be named this way in 4.0.

Pull Request: https://projects.blender.org/blender/blender/pulls/114531
---
 .../editors/interface/interface_templates.cc   |  4 ++--
 source/blender/editors/object/object_add.cc    | 18 +++++-------------
 source/blender/makesrna/intern/rna_ID.cc       |  4 ++--
 source/blender/makesrna/intern/rna_main.cc     |  9 ++-------
 source/blender/makesrna/intern/rna_object.cc   |  4 ++--
 5 files changed, 13 insertions(+), 26 deletions(-)

diff --git a/source/blender/editors/interface/interface_templates.cc b/source/blender/editors/interface/interface_templates.cc
index 5d6ffcc54a2..77254906eb7 100644
--- a/source/blender/editors/interface/interface_templates.cc
+++ b/source/blender/editors/interface/interface_templates.cc
@@ -1108,7 +1108,7 @@ static const char *template_id_browse_tip(const StructRNA *type)
       case ID_PA:
         return N_("Browse Particle Settings to be linked");
       case ID_GD_LEGACY:
-        return N_("Browse Grease Pencil (legacy) Data to be linked");
+        return N_("Browse Grease Pencil Data to be linked");
       case ID_MC:
         return N_("Browse Movie Clip to be linked");
       case ID_MSK:
@@ -1130,7 +1130,7 @@ static const char *template_id_browse_tip(const StructRNA *type)
       case ID_VO:
         return N_("Browse Volume Data to be linked");
       case ID_GP:
-        return N_("Browse Grease Pencil Data to be linked");
+        return N_("Browse Grease Pencil v3 Data to be linked");
 
       /* Use generic text. */
       case ID_LI:
diff --git a/source/blender/editors/object/object_add.cc b/source/blender/editors/object/object_add.cc
index 5d17eff772d..97fb046f08f 100644
--- a/source/blender/editors/object/object_add.cc
+++ b/source/blender/editors/object/object_add.cc
@@ -1535,9 +1535,9 @@ static EnumPropertyItem rna_enum_gpencil_add_stroke_depth_order_items[] = {
 
 void OBJECT_OT_gpencil_add(wmOperatorType *ot)
 {
-  /* identifiers */
-  ot->name = "Add Grease Pencil (legacy)";
-  ot->description = "Add a Grease Pencil (legacy) object to the scene";
+/* identifiers */
+  ot->name = "Add Grease Pencil";
+  ot->description = "Add a Grease Pencil object to the scene";
   ot->idname = "OBJECT_OT_gpencil_add";
 
   /* api callbacks */
@@ -2913,16 +2913,8 @@ static const EnumPropertyItem convert_target_items[] = {
     {OB_GPENCIL_LEGACY,
      "GPENCIL",
      ICON_OUTLINER_OB_GREASEPENCIL,
-#ifdef WITH_GREASE_PENCIL_V3
-     "Grease Pencil (legacy)",
-#else
      "Grease Pencil",
-#endif
-#ifdef WITH_GREASE_PENCIL_V3
-     "Grease Pencil (legacy) from Curve or Mesh objects"},
-#else
      "Grease Pencil from Curve or Mesh objects"},
-#endif
 #ifdef WITH_POINT_CLOUD
     {OB_POINTCLOUD,
      "POINTCLOUD",
@@ -2935,8 +2927,8 @@ static const EnumPropertyItem convert_target_items[] = {
     {OB_GREASE_PENCIL,
      "GREASEPENCIL",
      ICON_OUTLINER_OB_GREASEPENCIL,
-     "Grease Pencil",
-     "Grease Pencil from Grease Pencil (legacy)"},
+     "Grease Pencil v3",
+     "Grease Pencil v3 from Grease Pencil"},
 #endif
     {0, nullptr, 0, nullptr, nullptr},
 };
diff --git a/source/blender/makesrna/intern/rna_ID.cc b/source/blender/makesrna/intern/rna_ID.cc
index 7e1f0720093..462f4c4b525 100644
--- a/source/blender/makesrna/intern/rna_ID.cc
+++ b/source/blender/makesrna/intern/rna_ID.cc
@@ -42,8 +42,8 @@ const EnumPropertyItem rna_enum_id_type_items[] = {
     {ID_CU_LEGACY, "CURVE", ICON_CURVE_DATA, "Curve", ""},
     {ID_CV, "CURVES", ICON_CURVES_DATA, "Curves", ""},
     {ID_VF, "FONT", ICON_FONT_DATA, "Font", ""},
-    {ID_GD_LEGACY, "GREASEPENCIL", ICON_GREASEPENCIL, "Grease Pencil (legacy)", ""},
-    {ID_GP, "GREASEPENCIL_V3", ICON_GREASEPENCIL, "Grease Pencil", ""},
+    {ID_GD_LEGACY, "GREASEPENCIL", ICON_GREASEPENCIL, "Grease Pencil", ""},
+    {ID_GP, "GREASEPENCIL_V3", ICON_GREASEPENCIL, "Grease Pencil v3", ""},
     {ID_IM, "IMAGE", ICON_IMAGE_DATA, "Image", ""},
     {ID_KE, "KEY", ICON_SHAPEKEY_DATA, "Key", ""},
     {ID_LT, "LATTICE", ICON_LATTICE_DATA, "Lattice", ""},
diff --git a/source/blender/makesrna/intern/rna_main.cc b/source/blender/makesrna/intern/rna_main.cc
index 7373b308f45..ff1e42a691a 100644
--- a/source/blender/makesrna/intern/rna_main.cc
+++ b/source/blender/makesrna/intern/rna_main.cc
@@ -334,20 +334,15 @@ void RNA_def_main(BlenderRNA *brna)
       {"grease_pencils",
        "GreasePencil",
        "rna_Main_gpencils_begin",
-#  ifdef WITH_GREASE_PENCIL_V3
-       "Grease Pencil (legacy)",
-       "Grease Pencil (legacy) data-blocks",
-#  else
        "Grease Pencil",
        "Grease Pencil data-blocks",
-#  endif
        RNA_def_main_gpencil_legacy},
 #  ifdef WITH_GREASE_PENCIL_V3
       {"grease_pencils_v3",
        "GreasePencilv3",
        "rna_Main_grease_pencils_begin",
-       "Grease Pencil",
-       "Grease Pencil data-blocks",
+       "Grease Pencil v3",
+       "Grease Pencil v3 data-blocks",
        RNA_def_main_grease_pencil},
 #  endif
       {"movieclips",
diff --git a/source/blender/makesrna/intern/rna_object.cc b/source/blender/makesrna/intern/rna_object.cc
index fcc2bae398d..5be10275994 100644
--- a/source/blender/makesrna/intern/rna_object.cc
+++ b/source/blender/makesrna/intern/rna_object.cc
@@ -262,8 +262,8 @@ const EnumPropertyItem rna_enum_object_type_items[] = {
     {OB_CURVES, "CURVES", ICON_OUTLINER_OB_CURVES, "Hair Curves", ""},
     {OB_POINTCLOUD, "POINTCLOUD", ICON_OUTLINER_OB_POINTCLOUD, "Point Cloud", ""},
     {OB_VOLUME, "VOLUME", ICON_OUTLINER_OB_VOLUME, "Volume", ""},
-    {OB_GPENCIL_LEGACY, "GPENCIL", ICON_OUTLINER_OB_GREASEPENCIL, "Grease Pencil (legacy)", ""},
-    {OB_GREASE_PENCIL, "GREASEPENCIL", ICON_OUTLINER_OB_GREASEPENCIL, "Grease Pencil", ""},
+    {OB_GPENCIL_LEGACY, "GPENCIL", ICON_OUTLINER_OB_GREASEPENCIL, "Grease Pencil", ""},
+    {OB_GREASE_PENCIL, "GREASEPENCIL", ICON_OUTLINER_OB_GREASEPENCIL, "Grease Pencil v3", ""},
     RNA_ENUM_ITEM_SEPR,
     {OB_ARMATURE, "ARMATURE", ICON_OUTLINER_OB_ARMATURE, "Armature", ""},
     {OB_LATTICE, "LATTICE", ICON_OUTLINER_OB_LATTICE, "Lattice", ""},
-- 
GitLab