Age | Commit message (Collapse) | Author |
|
|
|
Spatial & topology mirror table each used a single function
taking a char as an identifier.
Split these into begin/end/lookup functions.
|
|
The old convention was easy to confuse with ScrArea.
Part of https://developer.blender.org/T74432.
This is mostly a batch rename with some manual fixing. Only single word
variable names are changed, no prefixed/suffixed names.
Brecht van Lommel and Campbell Barton both gave me a green light for
this convention change.
Also ran clan clang format on affected files.
|
|
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.
|
|
|
|
|
|
|
|
|
|
Previously, compared to `Auto Merge` without `Split Edges & Faces`,
`Auto Merge` with this option ignored duplicates between selected
vertices. It only considered duplicates between selected vertices and
unselected vertices.
This is a regress and not a progress.
This commit implements this behavior, so this option matches the other
`Auto Merge`.
|
|
Currently the islands are created depending only on the visible UVs.
This can be confusing because compared to Edit Meshes, islands are created based on the selected elements.
T68284 shows a case where this confusion is observed.
Differential Revision: https://developer.blender.org/D6502
|
|
This was an old bug which could be caused by saving after separating.
Changes from 79b703bb635e made this fail reliably.
Update shape key indices when they may be used again later.
|
|
As a followup to rB6f4e595e9ba9 and as per @campbellbarton suggestion,
this adds EDBM_selectmode_disable_multi, similar to
EDBM_mesh_deselect_all_multi & EDBM_mesh_deselect_all, so other similar
uses don't need to be done in a loop.
Also, selected_objects isn't a reliable way to handle this case - since
objects can be in edit-mode & not selected, use
BKE_view_layer_array_from_bases_in_edit_mode_unique_data instead
Differential Revision: https://developer.blender.org/D6317
|
|
These existed for verts & edges, add for API completeness.
Also add ED_mesh_geometry_clear,
needed to reduce memory for edit-mesh separate.
|
|
Remove unused OBJECT_OT_mode_set_or_submode, add
OBJECT_OT_mode_set_with_submode which can switch to edit mode as well
as a sub-mode - currently only mesh select mode is supported
(others may be added later).
|
|
Error introduced when removing the automerge bmesh operator.
|
|
This isn't closely related to selection & this file was over 5k lines.
|
|
This commit changes the functionality of the Poly build tool to make it more suitable for retopology tasks:
- Click and drag from a boundary edge extrudes a new quad
- Click and drag on vertices tweaks the position
- Ctrl + click adds geometry. There is a geometry preview in the gizmo. It also can automatically convert triangles to quads.
- Shift + click deletes mesh elements (faces or vertices)
- Updated preselection code. Different mesh elements take priority depending on the selected action.
Reviewed By: campbellbarton
Differential Revision: https://developer.blender.org/D5573
|
|
Now all wire edges linked to the merged vertex are used for split faces.
Reviewers: campbellbarton
Differential Revision: https://developer.blender.org/D5603
|
|
Ref T66423
Differential revision: https://developer.blender.org/D5562
|
|
|
|
Use consistent terminology.
|
|
|
|
This calculated tessfaces, not loop-triangles.
Remove this since they aren't accessible from RNA anymore.
|
|
This change ensures that operators which needs access to evaluated data
first makes sure there is a dependency graph.
Other accesses to the dependency graph made it more explicit about
whether they just need a valid dependency graph pointer or whether they
expect the graph to be already evaluated.
This replaces OPTYPE_USE_EVAL_DATA which is now removed.
Some general rules about usage of accessors:
- Drawing is expected to happen from a fully evaluated dependency graph.
There is now a function to access it, which will in the future control
that dependency graph is actually evaluated.
This check is not yet done because there are some things to be taken
care about first: for example, post-update hooks might leave scene in
a state where something is still tagged for update.
- All operators which needs to access evaluated state must use
CTX_data_ensure_evaluated_depsgraph().
This function replaces OPTYPE_USE_EVAL_DATA.
The call is generally to be done in the very beginning of the
operator, prior other logic (unless this is some comprehensive
operator which might or might not need access to an evaluated state).
This call is never to be used from a loop.
If some utility function requires evaluated state of dependency graph
the graph is to be passed as an explicit argument. This way it is
clear that no evaluation happens in a loop or something like this.
- All cases which needs to know dependency graph pointer, but which
doesn't want to actually evaluate it can use old-style function
CTX_data_depsgraph_pointer(), assuming that underlying code will
ensure dependency graph is evaluated prior to accessing it.
- The new functions are replacing OPTYPE_USE_EVAL_DATA, so now it is
explicit and local about where dependency graph is being ensured.
This commit also contains some fixes of wrong usage of evaluation
functions on original objects. Ideally should be split out, but in
reality with all the APIs being renamed is quite tricky.
Fixes T67454: Blender crash on rapid undo and select
Speculation here is that sometimes undo and selection operators are
sometimes handled in the same event loop iteration, which leaves
non-evaluated dependency graph.
Fixes T67973: Crash on Fix Deforms operator
Fixes T67902: Crash when undo a loop cut
Reviewers: brecht
Reviewed By: brecht
Subscribers: lichtwerk
Maniphest Tasks: T67454
Differential Revision: https://developer.blender.org/D5343
|
|
When a mesh is pinned in the properties panel, Blender crashes when you
click the "Add Custom Split Normals Data".
The code calls `ob = ED_object_context(C)` which returns NULL when the
mesh is pinned in the properties panel, causing a segfault when trying
to get the mesh via `ob->data`.
A new function `ED_mesh_context(C)` avoids this by first checking
whether a mesh was pinned in the context. If not, it checks the pinned
object's data. If that's not there, or it's not a mesh, it returns the
active object's mesh. Finally it returns NULL if there is no active
object, or if the active object is not a mesh object.
Reviewed By: brecht, mont29
Differential Revision: https://developer.blender.org/D5223
|
|
This patch does not bring functional changes, but it is a good change if we want to use these utilities in areas other than those using BMesh (eg painting editors).
This is also a step to replace `ED_view3d_select_id_validate`. That function erroneously checks `V3D_INVALID_BACKBUF` which causes it to update unnecessarily.
Reviewers: campbellbarton
Differential Revision: https://developer.blender.org/D5072
|
|
|
|
Removes EDBM_backbuf use.
|
|
The previous fix 8a6414ed46f66, resolved selection picking but didn't
work for box/circle/lasso select.
- Add ED_select_buffer_utils.h for general select-buffer operations
unrelated to edit-mesh.
- Circle select still needs to cache select-id's for each update.
|
|
This patch does not bring any functional change, but it does expose
some utilities that can be very useful to correct occlusion and
performance problems of Circle Select and similar.
Creating a selection context still makes it easier to track issues.
|
|
|
|
|
|
|
|
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
|
|
This removes `VIEW3D_OT_select_or_deselect_all`, adding a
deselect_all option to the `VIEW3D_OT_select` operator.
- Add utility functions to simplify de-selecting all.
- Return true from selection functions when they change the selection
to avoid redundant updates.
- Use arrays of bases when passing objects between selection utility
functions since some users require bases.
- Fix logical error in box selection that updated all objects after
the first hit.
|
|
|
|
|
|
The shaders are: `GPU_SHADER_3D_FLAT_SELECT_ID` and `GPU_SHADER_3D_UNIFORM_SELECT_ID`.
This commit allows the drawing of the mesh select ids to be done on a 32UI format texture.
This simplifies the shader that previously acted on the backbuffer and had to do an uint to rgba conversion.
Differential Revision: https://developer.blender.org/D4350
|
|
`ED_mesh_uv_texture_add()`/`ED_mesh_color_add()` would always either
copy data from current active one, or (for UVs), generate default
'valid' UVs for every face.
This commit adds an option to not do that, just keeping default values
from raw CDLayer creation. It is only used/exposed from RNA API
currently.
This is especially useful for importer add-ons, since some formats
support multiple layers of those kind, as well as 'partial' dataset not
explicitely defining values for all mesh items.
Preliminary step to fix T62224.
|
|
While \file doesn't need an argument, it can't have another doxy
command after it.
|
|
Also skip mesh recalculation when no hide/reveal is performed.
|
|
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.
|
|
Done using:
source/tools/utils_maintenance/c_sort_blocks.py
|
|
|
|
Fix the old code that propagates selection changes to the
evaluated mesh directly without rebuilding, and avoid tagging
DEG_TAG_COPY_ON_WRITE if it succeeds.
|
|
|
|
|
|
|
|
Differential Revision: https://developer.blender.org/D3736
|