Commit Graph

100687 Commits

Author SHA1 Message Date
Miguel Pozo
ff2f16db6d Draw: Fix RenderDoc and Nvidia compatibility
Disable deferred shader compilation for RenderDoc sessions on Nvidia GPUs to avoid crashes.

Pull Request: https://projects.blender.org/blender/blender/pulls/109214
2023-06-23 16:02:19 +02:00
Hoshinova
3efc63b398 Fix #109253: Voronoi Smooth F1 breaks when Smoothness is 0
The Voronoi Smooth F1 mode breaks when the Smoothness is 0 for OSL. This is
due to a zero division in the shader.

To fix this, standard F1 is used when Smoothness is 0.

Pull Request: https://projects.blender.org/blender/blender/pulls/109255
2023-06-23 15:56:09 +02:00
Sergey Sharybin
d8cc8fcf7f Refactor: Move color space information to ImBuf buffers
Before this change the ImBuf struct had dedicated fields for the
buffer data. Now the color space is stored inside of the struct
which wraps around the buffer information.

This only changes the field placement, without changing the way
it is handled. In the future one might imagine that operations
like stealing buffer data should null-ify the buffer colorspace
pointer. Such changes would need to have more accurate thinking
before implementation.

Should be no functional changes.

Pull Request: https://projects.blender.org/blender/blender/pulls/109291
2023-06-23 15:55:42 +02:00
Falk David
62e7ed0da5 Cleanup: remove unused variable 2023-06-23 15:45:29 +02:00
Falk David
0d6fda3b26 Fix: GPv3 layer operators missing undo flag 2023-06-23 14:12:40 +02:00
Guillermo Venegas
3f26bdf840 Cleanup: simplify keyword recognition in text editor
Arrays are used to eliminate the use of many nested if else's that
compare a string value against to many other strings.

These arrays are sorted to be able to perform binary searches on these
string literals arrays.

ref !108775.
2023-06-23 20:11:52 +10:00
lolloz98
fdc0402a50 GPv3: Select Alternate
Adds a "Select Alternate" operator for the new Grease Pencil data type.
This replaces the previous `gpencil.select_alternate`.

Resolves #109204.

Pull Request: https://projects.blender.org/blender/blender/pulls/109240
2023-06-23 11:34:00 +02:00
Falk David
fae170ed7a Fix: Assert in gpencil next engine
The `GPENCIL_NEXT` was no longer defined, so the shader is split and only loaded for gpencil next.

Pull Request: https://projects.blender.org/blender/blender/pulls/109010
2023-06-23 11:18:30 +02:00
Campbell Barton
4eca65f7f8 Cleanup: format 2023-06-23 18:05:01 +10:00
Clément Foucault
ddd88c00b4 EEVEE-Next: Irradiance Cache: Initial Implementation
This is a full rewrite of the irradiance volume baking.
The baking is much faster and doesn't scale linearly with the number
of irradiance samples in the volumes.

Ref #105643

Pull Request: https://projects.blender.org/blender/blender/pulls/108639
2023-06-23 08:39:46 +02:00
Germano Cavalcante
cd08a55a68 Fix compiler error caused by 9383d06688
`prop_snap_source` does not exist.
2023-06-23 00:12:51 -03:00
Germano Cavalcante
9383d06688 Fix measure tool snapping to perpendicular while not dragging 2023-06-22 23:21:46 -03:00
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
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
a07063e6a4 Release: Blender 3.6 enters Bcon4, RC. 2023-06-22 09:21:13 +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
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
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