Age | Commit message (Collapse) | Author |
|
Regression in 80cbbd2843c2358879b1a710d81a3b41e1468327.
Unfortunately keeping selection picking behavior as well as
supporting finding the nearest face within a radius requires an
inconsistency between x-ray and back-buffer selection that
doesn't work well using the current arguments.
Resolve by adding an argument that causes the input distance
to be ignored for back-buffer selection.
This is used by selection picking but not the knife tool.
This changes behavior for path-selection in face mode,
which now uses a margin for back-buffer selection.
From my own testing this doesn't seem to be a problem like it could be
for regular selection picking.
|
|
Respect the distance argument to EDBM_face_find_nearest,
when zero, sample a single pixel, otherwise sample a region.
Knife uses the selection-buffer to pick a face when the ray-cast failed.
This was meant to allow snapping to nearby faces however as the margin
was ignored, it was only used in edge cases where the ray-cast missed
but the pixel didn't.
Now the face-picking threshold is working as expected.
Note that other callers to EDBM_face_find_nearest have been updated
so set their distance argument to zero so this only impacts the knife.
Regular selection and path select could be modified separately if users
prefer this behavior.
|
|
Resolve logical error in edbm_shortest_path_pick_invoke
where any discrepancy between EDBM_unified_findnearest and
edbm_elem_find_nearest caused the active-object to be cleared.
While it's not a problem at the moment, using a larger threshold
for path picking exposes the error.
|
|
Following the most widely used convention for including todo's in
the code, that is: `TODO(name):`, `FIXME(name)` ... etc.
|
|
This addresses warnings from Clang-Tidy's `readability-else-after-return`
rule in the `source/blender/editors/mesh` module.
No functional changes.
|
|
|
|
This avoids a list lookup in Main (recently added), passing in a mesh
instead of an edit-mesh, since the mesh links to the edit-mesh.
|
|
With these changes, successive selections result in an even pattern.
|
|
|
|
This was a very specific option to display in global tool settings.
Now this is exposed in the operator when edge-select mode is enabled.
|
|
Prepare for enabling ReflowComments.
|
|
|
|
Apply clang format as proposed in T53211.
For details on usage and instructions for migrating branches
without conflicts, see:
https://wiki.blender.org/wiki/Tools/ClangFormat
|
|
While \file doesn't need an argument, it can't have another doxy
command after it.
|
|
When bmesh was in a branch we had both edit_mesh and edit_btmesh,
now there is no reason to use this odd name.
|
|
Move \ingroup onto same line to be more compact and
make it clear the file is in the group.
|
|
BF-admins agree to remove header information that isn't useful,
to reduce noise.
- BEGIN/END license blocks
Developers should add non license comments as separate comment blocks.
No need for separator text.
- Contributors
This is often invalid, outdated or misleading
especially when splitting files.
It's more useful to git-blame to find out who has developed the code.
See P901 for script to perform these edits.
|
|
Prevents clang-format wrapping text before comments.
|
|
|
|
Bring back per-viewport localview. This is based on Blender 2.79.
We have a limit of 16 different local view viewports.
We are using both the numpad /, as well as the regular /.
Missing features:
* Hack to make sure lights are always visible.
* Make rendered mode with external engines to support this as well
(probably just need to support this in the RNA iterators).
* Support over 16 viewports by taking existing viewports out of local view.
The code can use a cleanup pass in the future to unify the test to see
if an object is visible (or we can use TESTBASE in more places).
|
|
This makes the Edit Mesh display settings common to all objects. They can
also be set differently per viewport.
Modifying extra data (seams, sharp edges etc...) will no longer set them
automaticaly visible.
Bumping version because we need to force set all extra draw options for
older files.
|
|
|
|
In some cases we need to use this array afterwards,
so this gives control over which objects are used for picking.
Also use an index argument as return argument
so callers that need to know the index in the array
don't need to calculate it afterwards.
|
|
|
|
Select a vertex/edge/face if there was nothing previously selected
(if the click hit something, of course).
|
|
This fully works as "expected", however it seems strange when
there is no selected vertex in the non-active object.
In 2.7x if you join two monkeys, select a vertex in one of them and
try to use this operator in the other it will select the lonely newly
selected vertex.
If you split both monkeys and do this in 2.8 while multi-editing them
you won't get nothing when trying to ctrl+RMB any vertex in the monkey
object that has nothing selected yet.
I propose to have this addressed in an upcoming patch where we always
select a vertex if no vertex was previously selected.
|
|
|
|
|
|
To get consistent, user-expected results here, we need to 'fake'
starting immediately after a 'skip' block (such that we start with a
full block of selected elements).
Same issue affected vertices and edges selection of course, did not
check the other usages of WM_operator_properties_checker_interval_test()
though.
|
|
Note from revisor: Edit the error message to match the original one.
Maniphest Tasks: T54643
Differential Revision: https://developer.blender.org/D3351
|
|
The depsgraph was always created within a fixed evaluation context. Passing
both risks the depsgraph and evaluation context not matching, and it
complicates the Python API where we'd have to expose both which is not so
easy to understand.
This also removes the global evaluation context in main, which assumed there
to be a single active scene and view layer.
Differential Revision: https://developer.blender.org/D3152
|
|
|
|
|
|
Add ED_screen_window_find, BKE_workspace_edit_object
|
|
|
|
|
|
2.8x branch added bContext arg in many places,
pass eval-context instead since its not simple to reason about what
what nested functions do when they can access and change almost anything.
Also use const to prevent unexpected modifications.
This fixes crash loading files with shadows,
since off-screen buffers use a NULL context for rendering.
|
|
Note that some little parts of code have been dissabled because eval_ctx
was not available there. This should be resolved once DerivedMesh is
replaced.
|
|
From user perspective, last selected face is the same as the active face,
use this as a fallback.
|
|
Rewrote to work with ngons and and more complex topology, now uses separate function.
Fixes T48009.
|
|
This option selects all paths between source/destination which are no longer than the path found.
Handy for selecting meshes with a grid-topology.
|
|
|
|
User request, this matches 2.6x behavior more closely.
|
|
|
|
Supports diagonal paths for verts and faces,
Selects edge-rings with edges.
|
|
Allows to quickly select alternate elems in a path (matching checker-deselect options).
- adds redo support to MESH_OT_shortest_path_pick, allowing for other options.
- de-duplicates code between 2x path select operators.
- expose 'Topology Distance' property for path picking.
- remove unused 'extend' property.
|
|
When mixing vert/edge/face with select-visible,
face selection could fail when not close enough to the center.
This also fixes a bug where the bias for verts over edges would
prefer faces over edges too, making edges harder to pick.
Mixing edge with other selection modes works more predictably now.
|
|
|
|
|
|
|