WIP: 351 Custom Build #108367

Closed
Lukas Sneyd wants to merge 4 commits from lcas:351 into blender-v3.5-release

When changing the target branch, be careful to rebase the branch in your fork to match. See documentation.
First-time contributor

I've made some improvements to Blender. The idea is to keep things the way they are, while giving you more options for:

Box, Circle, and Lasso Select
X-Ray
Drag Direction
Facedots
Selection Radius
Mouse Cursor
Header Highlights
Header Buttons
Camera Zoom
Frame Selected
Repeat Last

Drag Select Edges and Faces
Preferences->Keymap->3d View->Mesh->(Box / Circle / Lasso) Select

Theres a dropdown for edge select with up to 3 options:
Default will do what blender does, and Circle doesn't have this option
Touch will select anything the selection area touches
Enclose will select edges that have both ends inside the selection area

All these tools have 4 options for selecting faces:
Default does what blender does
Touch will select anything the selection area touches
Enclose will select a face if all their verts are inside
Center will select a face if you touch their center

Facedots
Blender doesn't let you hide faceodts in xray shading, but with my build you can. Found in the overlay popover is an operator that toggles facedots for either solid or xray

X-Ray
Blender doesn't select unseen mesh. You select what you can see. If you want to select something on the other side of your mesh, you'd either turn on xray or move the camera until it's visible. With objects you always select through, and can't turn it off. Not anymore. In the header you'll find a popover next to the xray button. I moved the xray settings here from the shading popover. They have new names so it's more clear that wireframe and solid have separate xray properties.

If you want to select unseen mesh without xray, try Select Through. You can decide which tools and modes will use it. If you don't want to change how xray affects selection, try Automatic X-Ray. When you start to drag select with box, circle, or lasso it will turn xray on, and when you're done it will turn it off. The settings work the same as Select Through.

I included some operators. You can show any combination of them in the header. If you have everything necessary for the tool and mode you're in, the button will be lit up. It's modular, so there are many ways to setup your shortcuts. The icons for auto xray and select through were made by Alexey Adamitsky.

Viewport Facing Select
Blender does select unseen mesh, and not in a good way like select through. If you can see some verts of an edge or face, they're selectable regardless of their visibility. If it isn't truly random which unseen edges and faces this happens to, it may as well be. The 3 drag selection tools select the same wrong things, but if you move or rotate the viewport, this will usually mean that new unseen edges and faces are now selectable.

You can use Viewport-Facing Select to deal with this. It's in Toolsettings, at the bottom of Options. It works in near select, xray, or both. When you drag select, it compares mesh normals to the viewport. If they aren't facing each other within the threshold, they won't be selected. Greater or equal to 0 means the mesh normal is pointed in the direction you have it set to. The higher you set the threshold, the more your mesh needs to be facing in that direction. A value of 1 should mean the viewport and mesh are aligned, but was only working from the front perspective (numpad 1) and from nowhere else regardless of ortho. New max threshold is 0.999. Negative values can select unseen mesh.

I use the All Verts setting. It's saves performance without compromise, because Blender doesn't select unseen verts. They're dimensionless, and since there's only one position for them to be drawn in, they shoudln't be in the selection bitmap unless they're visible.

Front Verts will select verts based on their normals,. If you try this, you'll probably notice how some of the verts at the edge of your mesh are excluded. Verts of Front Face will fix that, it selects verts if they're part of a face with a viewport facing normal. There's also rear facing counterparts to these, they do the opposite where they'll select stuff pointed away from you. Not sure if they're useful but they are easy to include.

The settings for edges work the same as verts. Using edge normals will exclude things you probably want to select, and Edges of Front Face will correct that. Same goes for face settings, except Front Faces are what you want for accurate selection. Faces of Front Vert will select faces that have at least one vert with a viewport facing normal. This means it can select unseen faces, which is what I'm trying to avoid, but maybe it's useful for something.

Sometimes you can see a face even though it has a rear-facing normal, and VFS won't select it. Usually this is because you're dealing with two triangles that have no business sharing the same quad, but that's going to happen from time to time, and you'll need a way to select them. Besides turning this feature off, triangulating or otherwise fixing your mesh, single-clicking, or rotating your camera, you can drop your threshold into the negative. How negative you go depends on what you're willing to live with, and it gets worse the lower you go. I keep it at zero, because at least you have a chance of noticing things you didn't select. Hard to keep track of random selections that you can't see. It's not perfect, but it's predicable, and should work with most geometry.

Object Origin
This feature is incomplete, but functional. Circle is forced to select objects by their origin, while box cannot do this. There's a checkbox called Select Object Origin in the keymap. The selection area for circle is larger than it appears. I couldn't get lasso working right, so I left it out. If you need more options for object select, there's an addon called X-ray selection tools that should work pretty good.

Mesh Select Issues
Intersect doesn't work with touch or enclose face in xray and select through. It will do a center select instead. I figured it's better to do something close to what you'd expect rather than nothing.

Enclose face works in near select, but it's hard to use if you can't see all the verts of a face. Like if you have a visible face but some of it's verts that would otherwise be on screen are behind something else, the selection bitmap thinks they don't exist. This means that it also thinks that part of these faces are outside the selection area, even though they aren't, and they get excluded from selection. One thing you could try is avoiding the selection bitmap entirely. Turn on Select Through, and set Viewport Facing Select to work in xray, verts of front face, edges of front face, and front faces. Threshold at zero is best in my opinion. Now you get a decent result, but you have to deal with the baggage that comes with Select Through and VFS. You don't always get everything you can see, at least when you have some weird faces that have triangles pointing in very different directions. Also, you're going to select like xray, so if you have something that is facing the viewport, but don't have line of sight, you're going to select it without actually seeing it.

Drag Direction
Blender let's you assign a direction to click-drag in the keymap. There are 8 of them, which is nice, but it's confusing and inaccurate if all you need are 2.

Preferences->Input, at the top of mouse. Keymap Drag Direction has 3 options. Eight, which is what blender does, Left Right, and Up down. The tradeoff for mine is that they're exclusive. If you use Left Right, the only keymap items blender will match with are Any, Left, and Right. Unless something has been manually set to a direction, there shouldn't be anything besides View Axis, the ones where you hold alt and middlemouse while dragging.

With Blender's way, try to set box select to Extend when dragging left aka West, and Subtract when dragging right aka East. If you don't initiate the mouse drag within 45 degrees of left or right, you get a tweak event instead of what you expected. There's a way to make this work better. You set Extend to Any, and Subtract to East, Northeast, and Southeast. The keymap item set to Any needs to be after the other 3 or they'll be undetectable. Not intuitive, didn't figure out this was possible until after making this feature.

With my way there's 3 operators that will set your direction. If your keymap is undetectable, it will warn you about it. Nothing bad will happen, it's just telling you that this keymap item won't do anything because Blender can't see it anymore.

Drag detection has some perpindicular bias. If you're using Left Right, and you drag up or down far enough before moving to the right, you're going to get the left keymap item instead of the right keymap item that you expected. If you're on Up Down, and you move horizontally before going up, you would get the down keymap. With Blender's 8way, assuming you set it up like I described, the dominant keymap item is the one you set to the Any direction. Whatever is perpindicular to the direction you have things set for, move in that direction before the expected one and there's decent chance you don't get what you wanted. The Left Right and Up down options are a lot more precise so it's hard for this to happen. The 8way calculation rounds to the nearest int, so it treats every mouse drag within 45 degrees of a cardinal direction like it went straight vertical or horizontal. You can work around this by increasing your drag threshold in userprefs.

Single-Click Mesh Radius
Single click an edge, vertex, or facedot and there's a pretty big area you can grab it from. Faces have zero radius, you have to be right on top of them. I made this adjustable and consistent.

Preferences->editing->miscellaneous-> Adjustable Click Select.

Faces act the same, and you can change the size of the selection radius. Blender gives unselected mesh a slight bias, this can be turned off.

Mouse Cursor
I don't like the edit crosshair, so I made a replacement. Then I decided to just make this available to most of the cursors and have a few options to choose from.

Preferences->Editing at the bottom of miscellaneous. You'll need to move your cursor in and out of whatever area they're from to see the change take effect.

Header Highlights
The top of the active window gets brighter. If you want to change that, go to Preferences->Interface->Editors->Header Highlight.

Header Buttons
I don't need buttons for xray or shading, so I combined them into one thing to save space. Top of the shading popover, Shrink Header. The xray button replacess the shading buttons, and changes icon to reflect what shading mode you're in.

Camera Zoom
You can make the camera zoom faster or slower. If you want multiple zoom mappings you need to manually set the speed for the existing zoom keymap or the speed of the new one you make will be used for both.

Frame Selected
You can set a camera offset for frame selected. Like camera zoom, if you want more than one for different distances, you need to manually set the existing one or it won't work right.

Invoke Last
A new operator that works the same as repeat last, except instead of executing everything the same, it just invokes the last operation. You'll need to add a new keymap entry for view3d.invoke_last. Undo makes it lose memory the same as repeat last.

Defaults
Everything has defaults that will preserve what blender does, but if you already have a startup file for the same blender version as this build, it won't know what these new defaults are.

I've made some improvements to Blender. The idea is to keep things the way they are, while giving you more options for: Box, Circle, and Lasso Select X-Ray Drag Direction Facedots Selection Radius Mouse Cursor Header Highlights Header Buttons Camera Zoom Frame Selected Repeat Last **Drag Select Edges and Faces** Preferences->Keymap->3d View->Mesh->(Box / Circle / Lasso) Select Theres a dropdown for edge select with up to 3 options: Default will do what blender does, and Circle doesn't have this option Touch will select anything the selection area touches Enclose will select edges that have both ends inside the selection area All these tools have 4 options for selecting faces: Default does what blender does Touch will select anything the selection area touches Enclose will select a face if all their verts are inside Center will select a face if you touch their center **Facedots** Blender doesn't let you hide faceodts in xray shading, but with my build you can. Found in the overlay popover is an operator that toggles facedots for either solid or xray **X-Ray** Blender doesn't select unseen mesh. You select what you can see. If you want to select something on the other side of your mesh, you'd either turn on xray or move the camera until it's visible. With objects you always select through, and can't turn it off. Not anymore. In the header you'll find a popover next to the xray button. I moved the xray settings here from the shading popover. They have new names so it's more clear that wireframe and solid have separate xray properties. If you want to select unseen mesh without xray, try Select Through. You can decide which tools and modes will use it. If you don't want to change how xray affects selection, try Automatic X-Ray. When you start to drag select with box, circle, or lasso it will turn xray on, and when you're done it will turn it off. The settings work the same as Select Through. I included some operators. You can show any combination of them in the header. If you have everything necessary for the tool and mode you're in, the button will be lit up. It's modular, so there are many ways to setup your shortcuts. The icons for auto xray and select through were made by Alexey Adamitsky. **Viewport Facing Select** Blender *does* select unseen mesh, and not in a good way like select through. If you can see some verts of an edge or face, they're selectable regardless of their visibility. If it isn't truly random which unseen edges and faces this happens to, it may as well be. The 3 drag selection tools select the same wrong things, but if you move or rotate the viewport, this will usually mean that new unseen edges and faces are now selectable. You can use Viewport-Facing Select to deal with this. It's in Toolsettings, at the bottom of Options. It works in near select, xray, or both. When you drag select, it compares mesh normals to the viewport. If they aren't facing each other within the threshold, they won't be selected. Greater or equal to 0 means the mesh normal is pointed in the direction you have it set to. The higher you set the threshold, the more your mesh needs to be facing in that direction. A value of 1 should mean the viewport and mesh are aligned, but was only working from the front perspective (numpad 1) and from nowhere else regardless of ortho. New max threshold is 0.999. Negative values can select unseen mesh. I use the All Verts setting. It's saves performance without compromise, because Blender doesn't select unseen verts. They're dimensionless, and since there's only one position for them to be drawn in, they shoudln't be in the selection bitmap unless they're visible. Front Verts will select verts based on their normals,. If you try this, you'll probably notice how some of the verts at the edge of your mesh are excluded. Verts of Front Face will fix that, it selects verts if they're part of a face with a viewport facing normal. There's also rear facing counterparts to these, they do the opposite where they'll select stuff pointed away from you. Not sure if they're useful but they are easy to include. The settings for edges work the same as verts. Using edge normals will exclude things you probably want to select, and Edges of Front Face will correct that. Same goes for face settings, except Front Faces are what you want for accurate selection. Faces of Front Vert will select faces that have at least one vert with a viewport facing normal. This means it can select unseen faces, which is what I'm trying to avoid, but maybe it's useful for something. Sometimes you can see a face even though it has a rear-facing normal, and VFS won't select it. Usually this is because you're dealing with two triangles that have no business sharing the same quad, but that's going to happen from time to time, and you'll need a way to select them. Besides turning this feature off, triangulating or otherwise fixing your mesh, single-clicking, or rotating your camera, you can drop your threshold into the negative. How negative you go depends on what you're willing to live with, and it gets worse the lower you go. I keep it at zero, because at least you have a chance of noticing things you didn't select. Hard to keep track of random selections that you can't see. It's not perfect, but it's predicable, and should work with most geometry. **Object Origin** This feature is incomplete, but functional. Circle is forced to select objects by their origin, while box cannot do this. There's a checkbox called Select Object Origin in the keymap. The selection area for circle is larger than it appears. I couldn't get lasso working right, so I left it out. If you need more options for object select, there's an addon called X-ray selection tools that should work pretty good. **Mesh Select Issues** Intersect doesn't work with touch or enclose face in xray and select through. It will do a center select instead. I figured it's better to do something close to what you'd expect rather than nothing. Enclose face works in near select, but it's hard to use if you can't see all the verts of a face. Like if you have a visible face but some of it's verts that would otherwise be on screen are behind something else, the selection bitmap thinks they don't exist. This means that it also thinks that part of these faces are outside the selection area, even though they aren't, and they get excluded from selection. One thing you could try is avoiding the selection bitmap entirely. Turn on Select Through, and set Viewport Facing Select to work in xray, verts of front face, edges of front face, and front faces. Threshold at zero is best in my opinion. Now you get a decent result, but you have to deal with the baggage that comes with Select Through and VFS. You don't always get everything you can see, at least when you have some weird faces that have triangles pointing in very different directions. Also, you're going to select like xray, so if you have something that is facing the viewport, but don't have line of sight, you're going to select it without actually seeing it. **Drag Direction** Blender let's you assign a direction to click-drag in the keymap. There are 8 of them, which is nice, but it's confusing and inaccurate if all you need are 2. Preferences->Input, at the top of mouse. Keymap Drag Direction has 3 options. Eight, which is what blender does, Left Right, and Up down. The tradeoff for mine is that they're exclusive. If you use Left Right, the only keymap items blender will match with are Any, Left, and Right. Unless something has been manually set to a direction, there shouldn't be anything besides View Axis, the ones where you hold alt and middlemouse while dragging. With Blender's way, try to set box select to Extend when dragging left aka West, and Subtract when dragging right aka East. If you don't initiate the mouse drag within 45 degrees of left or right, you get a tweak event instead of what you expected. There's a way to make this work better. You set Extend to Any, and Subtract to East, Northeast, and Southeast. The keymap item set to Any needs to be after the other 3 or they'll be undetectable. Not intuitive, didn't figure out this was possible until after making this feature. With my way there's 3 operators that will set your direction. If your keymap is undetectable, it will warn you about it. Nothing bad will happen, it's just telling you that this keymap item won't do anything because Blender can't see it anymore. Drag detection has some perpindicular bias. If you're using Left Right, and you drag up or down far enough before moving to the right, you're going to get the left keymap item instead of the right keymap item that you expected. If you're on Up Down, and you move horizontally before going up, you would get the down keymap. With Blender's 8way, assuming you set it up like I described, the dominant keymap item is the one you set to the Any direction. Whatever is perpindicular to the direction you have things set for, move in that direction before the expected one and there's decent chance you don't get what you wanted. The Left Right and Up down options are a lot more precise so it's hard for this to happen. The 8way calculation rounds to the nearest int, so it treats every mouse drag within 45 degrees of a cardinal direction like it went straight vertical or horizontal. You can work around this by increasing your drag threshold in userprefs. **Single-Click Mesh Radius** Single click an edge, vertex, or facedot and there's a pretty big area you can grab it from. Faces have zero radius, you have to be right on top of them. I made this adjustable and consistent. Preferences->editing->miscellaneous-> Adjustable Click Select. Faces act the same, and you can change the size of the selection radius. Blender gives unselected mesh a slight bias, this can be turned off. **Mouse Cursor** I don't like the edit crosshair, so I made a replacement. Then I decided to just make this available to most of the cursors and have a few options to choose from. Preferences->Editing at the bottom of miscellaneous. You'll need to move your cursor in and out of whatever area they're from to see the change take effect. **Header Highlights** The top of the active window gets brighter. If you want to change that, go to Preferences->Interface->Editors->Header Highlight. **Header Buttons** I don't need buttons for xray or shading, so I combined them into one thing to save space. Top of the shading popover, Shrink Header. The xray button replacess the shading buttons, and changes icon to reflect what shading mode you're in. **Camera Zoom** You can make the camera zoom faster or slower. If you want multiple zoom mappings you need to manually set the speed for the existing zoom keymap or the speed of the new one you make will be used for both. **Frame Selected** You can set a camera offset for frame selected. Like camera zoom, if you want more than one for different distances, you need to manually set the existing one or it won't work right. **Invoke Last** A new operator that works the same as repeat last, except instead of executing everything the same, it just invokes the last operation. You'll need to add a new keymap entry for view3d.invoke_last. Undo makes it lose memory the same as repeat last. **Defaults** Everything has defaults that will preserve what blender does, but if you already have a startup file for the same blender version as this build, it won't know what these new defaults are.
Lukas Sneyd added 1 commit 2023-05-28 10:43:32 +02:00
Lukas Sneyd added 1 commit 2023-06-07 22:37:55 +02:00
Lukas Sneyd added 1 commit 2023-06-11 08:28:38 +02:00
Lukas Sneyd added 1 commit 2023-06-11 08:40:50 +02:00
Author
First-time contributor
This is old now, saving a copy of the diff here: https://www.dropbox.com/scl/fi/b7i4la0by2a0rmxs9tzgv/LCB35.diff?rlkey=uot82ifsr8cbtx8rzyt84molo&dl=0
Lukas Sneyd closed this pull request 2024-03-27 08:15:57 +01:00

Pull request closed

Sign in to join this conversation.
No reviewers
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#108367
No description provided.