Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCian Jinks <cjinks99@gmail.com>2021-09-23 04:23:44 +0300
committerHoward Trickey <howard.trickey@gmail.com>2021-09-23 04:23:44 +0300
commit6e77afe6ec7b6a73f218f1fef264758abcbc778a (patch)
tree350b49ce287b8e32518ed099895588041bc48d93 /release/scripts/startup/bl_ui
parenta78d3c5261b55ba2a63d550aafada518a0f88fbe (diff)
Applying patch D12600, GSOC Knife Tools branch
This adds constrained angle mode improvements, snapping to global and local orientation, visible distance and angle measurements, undo capability, x-ray mode, multi-object edit mode. See https://developer.blender.org/D12600 for more details. Note: this project moved some of the default keymappings around a bit, as discussed with users in the thread https://devtalk.blender.org/t/gsoc-2021-knife-tool-improvements-feedback/19047 We'll change the manual documentation in the next couple of days.
Diffstat (limited to 'release/scripts/startup/bl_ui')
-rw-r--r--release/scripts/startup/bl_ui/space_toolsystem_toolbar.py26
1 files changed, 22 insertions, 4 deletions
diff --git a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py
index 77a6ff79598..a4a51cb9910 100644
--- a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py
+++ b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py
@@ -1087,11 +1087,29 @@ class _defs_edit_mesh:
@ToolDef.from_fn
def knife():
- def draw_settings(_context, layout, tool):
+ def draw_settings(_context, layout, tool, *, extra=False):
+ show_extra = False
props = tool.operator_properties("mesh.knife_tool")
- layout.prop(props, "use_occlude_geometry")
- layout.prop(props, "only_selected")
-
+ if not extra:
+ row = layout.row()
+ layout.prop(props, "use_occlude_geometry")
+ row = layout.row()
+ layout.prop(props, "only_selected")
+ row = layout.row()
+ layout.prop(props, "xray")
+ region_is_header = bpy.context.region.type == 'TOOL_HEADER'
+ if region_is_header:
+ show_extra = True
+ else:
+ extra = True
+ if extra:
+ layout.use_property_split = True
+ layout.prop(props, "visible_measurements")
+ layout.prop(props, "angle_snapping")
+ layout.label(text="Angle Snapping Increment")
+ layout.row().prop(props, "angle_snapping_increment", text="", expand=True)
+ if show_extra:
+ layout.popover("TOPBAR_PT_tool_settings_extra", text="...")
return dict(
idname="builtin.knife",
label="Knife",