Age | Commit message (Collapse) | Author |
|
Using flags makes checking multiple modifiers at once more convenient
and avoids macros/functions such as IS_EVENT_MOD & WM_event_modifier_flag
which have been removed. It also simplifies checking if modifier keys
have changed.
|
|
Having this setting stored in the image space caused low level selection
logic to have to pass around the image space (which could be NULL
in some cases). Use the tool-settings instead since there doesn't seem
to be much/any advantage in having this setting per-space.
|
|
Use a shorter/simpler license convention, stops the header taking so
much space.
Follow the SPDX license specification: https://spdx.org/licenses
- C/C++/objc/objc++
- Python
- Shell Scripts
- CMake, GNUmakefile
While most of the source tree has been included
- `./extern/` was left out.
- `./intern/cycles` & `./intern/atomic` are also excluded because they
use different header conventions.
doc/license/SPDX-license-identifiers.txt has been added to list SPDX all
used identifiers.
See P2788 for the script that automated these edits.
Reviewed By: brecht, mont29, sergey
Ref D14069
|
|
Previously, macros were ifdefed using the cmake option `WITH_INTERNATIONAL`
However, the is unnecessary as withen the functions themselves have checks for building without internationalization.
This also means that many `add_definitions(-DWITH_INTERNATIONAL)` are also unnecessary.
Reviewed By: mont29, LazyDodo
Differential Revision: https://developer.blender.org/D13929
|
|
MSVC used to warn about const mismatch for arguments passed by value.
Remove these as newer versions of MSVC no longer show this warning.
|
|
Goals of this refactor:
* More unified approach to updating everything that needs to be updated
after a change in a node tree.
* The updates should happen in the correct order and quadratic or worse
algorithms should be avoided.
* Improve detection of changes to the output to avoid tagging the depsgraph
when it's not necessary.
* Move towards a more declarative style of defining nodes by having a
more centralized update procedure.
The refactor consists of two main parts:
* Node tree tagging and update refactor.
* Generally, when changes are done to a node tree, it is tagged dirty
until a global update function is called that updates everything in
the correct order.
* The tagging is more fine-grained compared to before, to allow for more
precise depsgraph update tagging.
* Depsgraph changes.
* The shading specific depsgraph node for node trees as been removed.
* Instead, there is a new `NTREE_OUTPUT` depsgrap node, which is only
tagged when the output of the node tree changed (e.g. the Group Output
or Material Output node).
* The copy-on-write relation from node trees to the data block they are
embedded in is now non-flushing. This avoids e.g. triggering a material
update after the shader node tree changed in unrelated ways. Instead
the material has a flushing relation to the new `NTREE_OUTPUT` node now.
* The depsgraph no longer reports data block changes through to cycles
through `Depsgraph.updates` when only the node tree changed in ways
that do not affect the output.
Avoiding unnecessary updates seems to work well for geometry nodes and cycles.
The situation is a bit worse when there are drivers on the node tree, but that
could potentially be improved separately in the future.
Avoiding updates in eevee and the compositor is more tricky, but also less urgent.
* Eevee updates are triggered by calling `DRW_notify_view_update` in
`ED_render_view3d_update` indirectly from `DEG_editors_update`.
* Compositor updates are triggered by `ED_node_composite_job` in `node_area_refresh`.
This is triggered by calling `ED_area_tag_refresh` in `node_area_listener`.
Removing updates always has the risk of breaking some dependency that no
one was aware of. It's not unlikely that this will happen here as well. Adding
back missing updates should be quite a bit easier than getting rid of
unnecessary updates though.
Differential Revision: https://developer.blender.org/D13246
|
|
Also add groups in some files.
|
|
Ref T92709
|
|
When adding certain customdata layers (namely UVs, vertex colors and
sculpt vertex colors), the user does not get notified the specific limit
has been hit (blender just silently does nothing).
Now inform the user [decided to not do this in poll() since it could get
messy once operators are extended to operate on all selected objects, so
left this as a visible error in execute() -- or from python].
Maniphest Tasks: T92318
Differential Revision: https://developer.blender.org/D13147
|
|
This margin was inconsistently calculated: only taking the
visible region and interface scale into account in some cases.
|
|
|
|
Passing multiple UDIM arguments into the packing function
is awkward especially since the caller may not be using UDIM.
Use an argument to store UDIM packing parameters which can be NULL,
which operates without any UDIM support.
Add a function that extracts these parameters out of the image space
allowing for multiple functions to take UDIM parameters in the future.
|
|
|
|
Implements T78397
Extends the functionality of pack islands operator to allow packing UVs
to either the closest or active UDIM tile.
This provides 2 new options for packing UVs :
* Closest UDIM: Selected UVs will be packed to the UDIM tile they were
placed on. If not present on a valid UDIM tile, the UVs will be packed
to the closest UDIM in UV space
* Active UDIM: Selected UVs will be packed to the active UDIM image tile
In case, no image is present in the UV editor, then UVs will be packed
to the tile on the UDIM grid where the 2D cursor is located.
Reviewed By: campbellbarton
Maniphest Tasks: T78397
Ref D12680
|
|
Some selection operators return (PASS_THROUGH & FINISHED) so the tweak
event isn't suppressed from the PRESS event having been handled.
This is now restricted to events with a PRESS action.
Without this, using CLICK for selection was passing the event through
which could run other actions unintentionally.
|
|
- Bend (Transform).
- Extrude to Cursor.
- Lasso Select (related operators such as node-cut links, mask.. etc).
- Rip Mesh / UV's.
- Vertex/Edge Slide.
|
|
|
|
|
|
|
|
While this was already the case for the most part
some selection operators stored common settings for reuse such as
"toggle", "extend" & "deselect".
Disabling storing these settings for later execution
as it means failure to set these options in the key-map re-uses
the value of the shortcut that was last called.
Skip saving these settings since this is a case where reusing them
isn't helpful.
Resolves T90275.
|
|
|
|
|
|
|
|
Only DNA_customdata_types.h is needed for BMEditMesh.
|
|
|
|
Also use doxy style function reference `#` prefix chars when
referencing identifiers.
|
|
|
|
|
|
This patch fixes many minor spelling mistakes, all in comments or
console output. Mostly contractions like can't, won't, don't, its/it's,
etc.
Differential Revision: https://developer.blender.org/D11663
Reviewed by Harley Acheson
|
|
This patch ensures that selection mode flushing updates total selection
counts internally. This reduces recounting when we are sure that the
input total selection counts were up to date.
For example for circle selection the total selection counts were
correct. But during flushing the selection could have been changed and
therefore the selection was always recounted.
This increased the performance on selected system from 6.90 FPS to 8.25
FPS during circle selection operations.
Before: {F10179981}
After: {F10179982}
Reviewed By: mano-wii
Differential Revision: https://developer.blender.org/D11647
|
|
Rename function EDBM_update_generic to EDBM_update, use a parameters
argument for better readability.
Also add calc_normals argument, which will have benefits when
calculating normals and tessellation together is optimized.
|
|
Note that these changes are limited simple cases as these kinds of
changes could allow for errors when refactoring code when the known
state is not so obvious.
|
|
Oversight in {rB470f17f21c06}.
Hiding was only done for the first mesh, then the operator finished (in
case of UV_SYNC_SELECTION).
Now just continue to the next.
Maniphest Tasks: T88625
Differential Revision: https://developer.blender.org/D11413
|
|
Report an error when unwrapping can't solve some UV islands,
note that edge-seams may need to be set.
Address T86936
|
|
|
|
Also use doxygen comments for sculpt functions.
|
|
|
|
The triangle overlap test failed for exactly overlapping triangles.
When none of the segments intersect, testing a if a single corner
is inside the other triangle fails when the triangles share UV
coordinates.
Resolve by comparing the triangle centers.
|
|
|
|
|
|
|
|
This lead to wrong, stretched UVs regardless of the ON/OFF state of
"Correct Aspect" option (some code in the operator respected this
setting properly, whereas it was hardcoded in another part).
Before rB9296ba867462, `uvedit_pack_islands_multi` was always called
with `correct_aspect` = false for the UnwrapOptions.
After rB9296ba867462, `ED_uvedit_pack_islands_multi` was always called
with `correct_aspect` = true for the UVPackIsland_Params.
Both seem wrong [in that they do not take the operator setting into
account]. Now respect that setting [same as the following
`uv_map_clip_correct_multi` does as well btw.]
Now results match 2.90 [where this was still python] perfectly.
Maniphest Tasks: T85194
Differential Revision: https://developer.blender.org/D10246
|
|
Selecting inside an island no longer de-selects
when it's too far from an edge.
When edge select fails fall back to inside-face test.
This follows 908b383b7d2199c0c614d085ff65a03eb7852274
which made this change for face-select.
Apply to island selection since it doesn't make sense
for island select to behave differently.
|
|
|
|
When the mouse cursor is inside the UV face,
extend the selection threshold.
This means when zoomed in, a face can always be selected when the cursor
is inside it.
In the case of multiple overlapping faces - the face with the closest
center is used.
----
Prior to 246efd7286f6187e4dd4b3edcc79cccb1746bb1d, the UV selection
threshold was scaled by the zoom level, so selecting a face when zoomed
in close would often often select faces even when the on-screen center
was outside the intended threshold.
Having a zoom-independent threshold may require more precision than
users are used to.
This change addresses this.
|
|
Splitting assignments between functions complicates refactoring.
Also rename 'hit_final' to 'hit', since there are no longer a local
'hit' variable defined in these functions.
|
|
Regression in 6a10e69d270bc6866dd0000ffc0b81f6205ba2e9
(added when testing).
|
|
Caused by 850234c1b10a828678f1b91001f2731db807f7e2,
Flip the normal to avoid flipped projection.
|
|
Selecting vertices and faces first checked edge selection,
this was called to set vert1 & vert2 variables which have since been
removed.
These calls should have been removed in
51f04bf7b8ee03a7973c50e525ffa5c67dde5fb7.
|
|
Exposed by recent commit 246efd7286f6187e4dd4b3edcc79cccb1746bb1d
Although this was an existing logical error causing
`uv_find_nearest_face` to only work properly when the hit distance was
initialized to FLT_MAX, which wasn't the case in multi-object edit mode.
|