UI: rename 'Snap With' and 'Snap To' to 'Snap Base' and 'Snap Target'

Since the `Set Snap Base` feature has been implemented, it would be
convenient to reflect the use of the term `Snap Base` in other areas in
the UI.

Pull Request: https://projects.blender.org/blender/blender/pulls/119723
This commit is contained in:
Germano Cavalcante
2024-03-25 13:35:52 +01:00
committed by Germano Cavalcante
parent b1c85fa78c
commit f66cb1e635
3 changed files with 13 additions and 9 deletions

View File

@@ -7534,14 +7534,14 @@ class VIEW3D_PT_snapping(Panel):
layout = self.layout
col = layout.column()
col.label(text="Snap With")
col.label(text="Snap Base")
row = col.row(align=True)
row.prop(tool_settings, "snap_target", expand=True)
col.label(text="Snap To")
col.label(text="Snap Target")
col.prop(tool_settings, "snap_elements_base", expand=True)
col.label(text="Snap Individual Elements To")
col.label(text="Snap Target for Individual Elements")
col.prop(tool_settings, "snap_elements_individual", expand=True)
col.separator()

View File

@@ -705,11 +705,15 @@ void Transform_Properties(wmOperatorType *ot, int flags)
RNA_def_boolean(ot->srna, "use_snap_project", false, "Project Individual Elements", "");
/* TODO(@gfxcoder): Rename `snap_target` to `snap_source` to avoid previous ambiguity of
* "target" (now, "source" is geometry to be moved and "target" is geometry to which moved
* geometry is snapped). Use "Source snap point" and "Point on source that will snap to
* target" for name and description, respectively. */
prop = RNA_def_enum(ot->srna, "snap_target", rna_enum_snap_source_items, 0, "Snap With", "");
/* TODO(@gfxcoder): Rename `snap_target` to `snap_base` to avoid previous ambiguity of
* "target" (now, "base" or "source" is geometry to be moved and "target" is geometry to
* which moved geometry is snapped). */
prop = RNA_def_enum(ot->srna,
"snap_target",
rna_enum_snap_source_items,
0,
"Snap Base",
"Point on source that will snap to target");
RNA_def_property_flag(prop, PROP_HIDDEN);
/* Target selection. */

View File

@@ -3574,7 +3574,7 @@ static void rna_def_tool_settings(BlenderRNA *brna)
prop, "rna_ToolSettings_snap_mode_get", "rna_ToolSettings_snap_mode_set", nullptr);
RNA_def_property_flag(prop, PROP_ENUM_FLAG);
RNA_def_property_ui_text(
prop, "Snap Element", "Type of element for the \"Snap With\" to snap to");
prop, "Snap Element", "Type of element for the \"Snap Base\" to snap to");
RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, nullptr); /* header redraw */
prop = RNA_def_property(srna, "snap_elements_individual", PROP_ENUM, PROP_NONE);