realize-depth #5

Merged
Arye Ramaty merged 43 commits from David-Haver/blender:realize-depth into WIP-realize-depth 2024-03-31 17:22:49 +02:00
3 changed files with 13 additions and 9 deletions
Showing only changes of commit f66cb1e635 - Show all commits

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);