diff --git a/rigify/__init__.py b/rigify/__init__.py
index 10e90b4c423711d1b64692c6aacf6b9422cdb370..8a45ae05c591ef1f80d04ff51aa9bda7fdb5a928 100644
--- a/rigify/__init__.py
+++ b/rigify/__init__.py
@@ -550,14 +550,18 @@ def register():
         name="Widgets Collection",
         description="Defines which collection to place widget objects in. If unset, a new one will be created based on the name of the rig")
 
+    bpy.types.Armature.rigify_rig_basename = StringProperty(name="Rigify Rig Name",
+        description="Optional. If specified, this name will be used for the newly generated rig, widget collection and script. Otherwise, a name is generated based on the name of the metarig object by replacing 'metarig' with 'rig', 'META' with 'RIG', or prefixing with 'RIG-'. When updating an already generated rig its name is never changed",
+        default="")
+
     bpy.types.Armature.rigify_target_rig = PointerProperty(type=bpy.types.Object,
         name="Rigify Target Rig",
-        description="Defines which rig to overwrite. If unset, a new one called 'rig' will be created",
+        description="Defines which rig to overwrite. If unset, a new one will be created with name based on the Rig Name option or the name of the metarig",
         poll=lambda self, obj: obj.type == 'ARMATURE' and obj.data is not self)
 
     bpy.types.Armature.rigify_rig_ui = PointerProperty(type=bpy.types.Text,
         name="Rigify Target Rig UI",
-        description="Defines the UI to overwrite. If unset, 'rig_ui.py' will be used")
+        description="Defines the UI to overwrite. If unset, a new one will be created and named based on the name of the rig")
 
     bpy.types.Armature.rigify_finalize_script = PointerProperty(type=bpy.types.Text,
         name="Finalize Script",
diff --git a/rigify/generate.py b/rigify/generate.py
index d63399cc0e1e0193cff612be2a4453db3cd089c9..8a2aa942bacc8ff8c1d8f6bfb4dfa717682302b9 100644
--- a/rigify/generate.py
+++ b/rigify/generate.py
@@ -65,7 +65,9 @@ class Generator(base_generate.BaseGenerator):
 
         target_rig = meta_data.rigify_target_rig
         if not target_rig:
-            if "metarig" in self.metarig.name:
+            if meta_data.rigify_rig_basename:
+                rig_new_name = meta_data.rigify_rig_basename
+            elif "metarig" in self.metarig.name:
                 rig_new_name = self.metarig.name.replace("metarig", "rig")
             elif "META" in self.metarig.name:
                 rig_new_name = self.metarig.name.replace("META", "RIG")
diff --git a/rigify/rig_ui_template.py b/rigify/rig_ui_template.py
index b98907ee1d08f1f55d5cb332d8b325ba619b8690..d581805fae4327b0b65590b063d95c72e360e5a5 100644
--- a/rigify/rig_ui_template.py
+++ b/rigify/rig_ui_template.py
@@ -1159,7 +1159,8 @@ class ScriptGenerator(base_generate.GeneratorPlugin):
         if script:
             script.clear()
         else:
-            script = bpy.data.texts.new("rig_ui.py")
+            script_name = self.generator.obj.name + "_ui.py"
+            script = bpy.data.texts.new(script_name)
             metarig.data.rigify_rig_ui = script
 
         for s in OrderedDict.fromkeys(self.ui_imports):
diff --git a/rigify/ui.py b/rigify/ui.py
index 68cfd330ff4561887eee9b4183fd6027779ef347..3a7af54669935d5985f679729dacc83162c9fa82 100644
--- a/rigify/ui.py
+++ b/rigify/ui.py
@@ -137,10 +137,16 @@ class DATA_PT_rigify_advanced(bpy.types.Panel):
         armature_id_store = context.object.data
 
         col = layout.column()
+
+        row = col.row()
+        row.active = not armature_id_store.rigify_target_rig
+        row.prop(armature_id_store, "rigify_rig_basename", text="Rig Name")
+
+        col.separator()
         col.row().prop(armature_id_store, "rigify_target_rig", text="Target Rig")
         col.row().prop(armature_id_store, "rigify_rig_ui", text="Rig UI Script")
-        col.separator()
         col.row().prop(armature_id_store, "rigify_widgets_collection")
+        col.separator()
         col.row().prop(armature_id_store, "rigify_force_widget_update")
         col.row().prop(armature_id_store, "rigify_mirror_widgets")
         col.separator()