Commit Graph

125407 Commits

Author SHA1 Message Date
Germano Cavalcante
f1fa2ecbf5 Fix 'Set Snap Base' not working with 'Face Project' or 'Face Nearest' 2023-06-22 22:54:47 -03:00
Hans Goudey
eeecc24014 Cleanup: BLI: Deduplicate bounds merging
Also declare variables and arguments consta
2023-06-22 21:24:48 -04:00
Campbell Barton
fa9a513bc2 BLI_bpath: don't change paths when making absolute/relative fails
Technically this is a foundational change, although from a user
level it's not expected behavior that failing to make a path
absolute/relative would perform some other change to it.
2023-06-23 10:09:03 +10:00
Campbell Barton
1a04a231ec Fix buffer overflow in BKE_bpath_foreach_path_fixed_process
It was assumed destination buffers were at least 1024 bytes which could
overflow by 256 bytes for sequencer directories. Resolve by passing the
destination buffer size to BKE_bpath_foreach_path_fixed_process.

Also remove strcpy use in foreach_path_clean_cb.
2023-06-23 10:09:01 +10:00
Campbell Barton
06cb4ca376 Fix potential buffer overflow in text to object conversion
BLI_strlen_utf8_ex was used to calculate the array size
while strlen was used to fill it which could exceed the utf8 size
if invalid utf8 sequences exist in the text.
2023-06-23 10:09:00 +10:00
Campbell Barton
b06afe575e UI: resolve inconsistency with modifier labels while assigning shortcuts
Reuse WM_keymap_item_to_string to ensure labels match
(would show Cmd on Linux, then refresh to OS once set).
2023-06-23 10:08:58 +10:00
Hans Goudey
dc5b99fa49 Merge branch 'blender-v3.6-release' 2023-06-22 17:29:51 -04:00
Clément Foucault
8d2d2d4620 GPU: Math: Add safe_rcp and safe_normalize to math libs 2023-06-22 22:51:23 +02:00
Hans Goudey
fa1121765d Fix: Mistakenly duplicated code in previous split edges fix 2023-06-22 16:19:16 -04:00
Julian Eisel
b1f7c87b99 Cleanup: Use const for UI coordinate conversion functions 2023-06-22 20:30:46 +02:00
Harley Acheson
e1d227c5fc Refactor: Simplify vfontdata_freetype.c
Simplification of the functions related to the conversion of FreeType
font glyph outlines into curves.

Pull Request: https://projects.blender.org/blender/blender/pulls/109224
2023-06-22 20:29:14 +02:00
Richard Antalik
c1e7c02f14 Fix #109213: Retime tool value slider crash blender
Crash caused by reading beyond boundary of allocated memory.
2023-06-22 19:19:34 +02:00
Harley Acheson
080a00bda2 UI: Fix Scrollbar overlaps sidebar on zoom
When zooming an area with panel category tabs, ensure that the vertical
scroll bar is repositioned to not overlap the tabs.

Pull Request: https://projects.blender.org/blender/blender/pulls/108295
2023-06-22 18:56:29 +02:00
Weizhen Huang
37d3daaea6 Cycles: remove clamping of area lights at small spread angles
there is still artifacts at extremely small angles, but should be
unnoticeable due to improved accuracy.
2023-06-22 17:52:41 +02:00
Bastien Montagne
486348e4cd Merge branch 'blender-v3.6-release' 2023-06-22 17:37:43 +02:00
Bastien Montagne
dd24af2265 I18n: Updated translation files for svn trunk (r6590). 2023-06-22 17:36:35 +02:00
Weizhen Huang
9aaf28954b Cleanup: avoid division in #spot_light_attenuation 2023-06-22 17:19:01 +02:00
Julian Eisel
9e8bc1d579 Fix unused variable warning 2023-06-22 15:20:54 +02:00
Almaz Shinbay
888cfd29c3 Outliner: Port object elements to new tree-element code design
No user visible changes expected.

Part of #96713, continuation of work started in 249e4df110 and 2e221de4ce.
Refer to these for a motivation and design overview.

Adds a new tree-element class for object IDs.

Pull Request: https://projects.blender.org/blender/blender/pulls/109162
2023-06-22 15:04:53 +02:00
Iliya Katueshenock
333e820ed7 Cleanup: Remove unused variable from recent commit
Pull Request: https://projects.blender.org/blender/blender/pulls/109242
2023-06-22 14:37:10 +02:00
Falk David
a4ef0ac05a GPv3: Add hide and lock buttons to layer UI
This adds two buttons to the items for hiding and locking the layer.
2023-06-22 14:12:08 +02:00
Iliya Katueshenock
a711c5004c Geometry Nodes: Simplify code in duplicate elements face mode
This node splits all faces to duplicate each time. Corner edges and
vertices are just ordered sequences of indices. Most likely, due to
historical reasons, this was overlooked and as a result the code became
so complex with potential simplicity. The problem was found in a
benchmark of #109174. The code in the lambda could not be optimized.

Timings improved by about 30%, from 154 to 120 ms.

Pull Request: https://projects.blender.org/blender/blender/pulls/109222
2023-06-22 13:45:43 +02:00
Falk David
dddc69d0be GPv3: Add layers RNA
This adds `layers` as a collection to the new grease pencil RNA.

Additionally, layers have 3 properties:
 - `name`
 - `hide`
 - `lock`

Pull Request: https://projects.blender.org/blender/blender/pulls/109235
2023-06-22 13:37:23 +02:00
Hans Goudey
c5fe62ac8e Cleanup: Quiet unused warnings in rna_mesh.cc
Pull Request: https://projects.blender.org/blender/blender/pulls/109165
2023-06-22 13:27:36 +02:00
Julian Eisel
d695619a55 Fix file/asset previews showing document icon on initial load
Since 4a3b6bfeac, there should be a loading/wait icon while the previews
are being loaded. However when initially loading the file list, the big
document icon we use when no preview was found showed up for a short
moment. This is because preview loading is only triggered after the file
list is fully loaded, and so the preview loading tag isn't set yet. But
we only checked for this tag. Now the waiting icon is displayed when
either the file list or the preview is still loading.
2023-06-22 13:09:40 +02:00
Julian Eisel
fcd1bb170c Cleanup: Use const for File Browser file list queries 2023-06-22 13:09:40 +02:00
Pratik Borhade
c1d6f8b567 Fix: change poll function for add and remove layer operators
Current poll functions allows to use these operator only in edit mode.
Correct function would be `active_grease_pencil_poll` (check for active grease
pencil object instead of the context mode)

Pull Request: https://projects.blender.org/blender/blender/pulls/109238
2023-06-22 13:04:47 +02:00
Omar Emara
d6cd3db13b Fix: Wrong reference count for shader operation
The reference count computation for shader operation outputs is wrong,
because it considers internal links as references to the result, which
is not the case.

This patch fixes that by only consider external links.
2023-06-22 13:57:31 +03:00
Campbell Barton
2ff522c23f CMake: show install hint for ninja as well as make
Use the absolute destination path in the message too as the path
relative to the CMAKE_INSTALL_PREFIX isn't so meaningful.
2023-06-22 20:28:03 +10:00
Falk David
16e187778b Fix compiler warnings 2023-06-22 11:11:55 +02:00
Falk David
b3f3b41d09 GPv3: Initial Layer Tree UI
Adds a new UI template to view the current layer tree of the active Grease Pencil object.

This UI tree view implements the following features (for now):
 - Displaying all the layers with their names and highlighting the active layer.
 - Changing the active layer by clicking on an item.
 - Adding new layers (using a new operator).
 - Removing the active layer (using a new operator).
 - Renaming a layer.

Pull Request: https://projects.blender.org/blender/blender/pulls/109197
2023-06-22 10:51:43 +02:00
Thomas Dinges
11fbf58a67 Merge branch 'blender-v3.6-release' 2023-06-22 09:23:01 +02:00
Thomas Dinges
a07063e6a4 Release: Blender 3.6 enters Bcon4, RC. 2023-06-22 09:21:13 +02:00
Thomas Dinges
80e518bdd4 Release: Update freedesktop file for 3.6. 2023-06-22 09:20:16 +02:00
Jeroen Bakker
48867f9798 Cleanup: make format 2023-06-22 08:22:21 +02:00
Germano Cavalcante
77b061f641 Transform Snap: Convert callbacks to virtual methods in subclasses
This commit converts existing callbacks into virtual methods and moves
their associated members from the base class to custom implementations
in subclasses.

These callbacks, (previously used within the main struct), have been
replaced by pure virtual methods in the `Nearest2dUserData` class.

As a result, specific subclasses can now provide their own customized
implementations for these methods.
2023-06-22 01:11:08 -03:00
Campbell Barton
7d7ac591c8 Cleanup: minor changes to BKE_appdir_font_folder_default
- Ensure a trailing slash in BKE_blendfile_userdef_from_defaults
  instead of in-line platform specific checks.
- Take a buffer size argument for the directory.
- Use the documented size for SHGetSpecialFolderPathW wchar_t argument.
- Remove use of unsafe `wcscat` on WIN32
2023-06-22 13:42:27 +10:00
Campbell Barton
944663723a Fix the default directory for opening fonts
- By default on Linux the directory would be "/usr/share/" with
  "fonts" as the filename, now fonts is always treated as a directory.
- Correct the path for linked library fonts using a relative path.
2023-06-22 13:18:05 +10:00
Campbell Barton
39851db1fa Linux: remove historic bourne shell argument expansion workaround
This is a history workaround not needed for modern shells
(fixed with bourne shell SRV3, 1986).

This isn't used in other wrappers (snap package) for e.g.
2023-06-22 13:17:28 +10:00
Campbell Barton
8cd877641d check_licenses: minor improvements to output
Right align numbers and use thousands separator.
2023-06-22 12:35:51 +10:00
Campbell Barton
02b8bde4b3 Cleanup: use the term "props" for operator properties
Differentiate operators from their properties.
2023-06-22 12:35:49 +10:00
Campbell Barton
98b973294b Cleanup: spelling in comments 2023-06-22 12:35:48 +10:00
Germano Cavalcante
4d1593c4ad Transform Snap: Improve snap for bones
In order to better identify which is the normal of the point
(see #108711), it is interesting to identify which is the closest bone.

So, instead of testing the snap at each point and then each bone line,
test the bone lines first and after identifying the closest one, test
its points.

With the nearest bone identified, we can use its normal instead.
2023-06-21 21:22:30 -03:00
Germano Cavalcante
48ab99f54a Cleanup: Simplify transformation from normal to global space
Just multiply the original matrix without the translation
component.
2023-06-21 21:22:30 -03:00
Chris Blackbourn
e0e3650495 Fix #108811: Follow active quads doesn't respect uv selection
Added selection support to the Follow Active Quads operator.

Simplified code and added comments.

Also added new error codes:
 * STATUS_ERR_MISSING_UV_LAYER
 * STATUS_ERR_NO_FACES_SELECTED

Pull Request: https://projects.blender.org/blender/blender/pulls/109095
2023-06-22 01:02:32 +02:00
Germano Cavalcante
93e008dd8b Transform Snap: Support 'Align Rotation to Target' for bone points
Align with the bone that the point is part of.

Ref #108711
2023-06-21 19:59:16 -03:00
Germano Cavalcante
dea93845af Fix #108711: Snap with Align Rotation to Target do not align rotation for Empties or Bone
For now it only supports the body of the bone.

Head and tail will be supported later.
2023-06-21 19:37:02 -03:00
Germano Cavalcante
4585c8b28d Transform Snap: Remove parameter and use a more descriptive name
`sctx` can be accessed internally.

And `clip_planes_enable` makes it clearer what this method does.

Also note that this function had been accidentally removed for Cameras.
2023-06-21 18:41:08 -03:00
Germano Cavalcante
9ec127bb70 Transform Snap: Deduplicate code that register the result
The `Nearest2dUserData` object is called in all cases, so move the
registration to its destructor.
2023-06-21 18:24:15 -03:00
Germano Cavalcante
3bbd99e1cb Transform Snap: Remove unnecessary member 2023-06-21 18:23:59 -03:00