Commit Graph

120409 Commits

Author SHA1 Message Date
Campbell Barton
f2945f3895 UI: don't change mouse cursor while it's grabbed
The paint cursor was continuously set which meant hiding the cursor
while interacting with buttons would immediately show it again.

This exposed cursor warping.
2022-12-16 17:22:09 +11:00
Campbell Barton
8b2afe93b4 Build: correct extension type for SNDFILE 2022-12-16 15:35:43 +11:00
Campbell Barton
ba7afbe3a1 Build: remove opus workaround for sndfile
For some reason SNDFILE now builds without this workaround,
which broke building FFMPEG.
2022-12-16 15:35:43 +11:00
Chris Blackbourn
0079460dc7 Fix T102923: replace zero check with epsilons with uv constrain to bounds
Small roundoff errors during UV editing can sometimes occur, most likely
due to so-called "catastrophic cancellation".

Here we set a tolerance around zero when using Constrain-To-Bounds and UV Scaling.

The tolerance is set at one quarter of a texel, on a 65536 x 65536 texture.

TODO: If this fix holds, we should formalize the tolerance into the UV editing
subsystem, perhaps as a helper function, and investigate where else it needs
to be applied.

Differential Revision: https://developer.blender.org/D16702
2022-12-16 17:26:24 +13:00
Chris Blackbourn
a6c30e1a0c Fix T103237: Prevent UV Unwrap from packing hidden UV islands
When migrating to the new packing API, pin_unselected was not
implemented correctly.

Regression from rB143e74c0b8eb, rBe3075f3cf7ce, rB0ce18561bc82.

Differential Revision: https://developer.blender.org/D16788

Reviewed By: Campbell Barton

Duplicated in blender-v3.4-release as rB3dcd9992676a
2022-12-16 16:59:22 +13:00
Chris Blackbourn
75c2e81103 Cleanup: format 2022-12-16 16:55:16 +13:00
Campbell Barton
841020dba2 Fix active/default color names not being editable
Revert [0] and enable the editable flag as the intent for [1] was that
these values would be editable.

[0]: e58f5422c37762ab5b4302e7481a9ffed023913a
[1]: 6514bb05ea5a138d897151db02cb0bad9fe01968
2022-12-16 12:33:15 +11:00
Damien Picard
edfef62371 Fix T103183: UV map name of mesh converted from curve is untranslated
Upon conversion, the newly-created UV map with default name "UVMap"
should be translated.

Reviewed By: mont29

Maniphest Tasks: T103183

Differential Revision: https://developer.blender.org/D16775
2022-12-16 09:47:56 +09:00
Campbell Barton
e58f5422c3 Cleanup: remove unused active name set callback functions 2022-12-16 10:50:18 +11:00
Campbell Barton
2c22795dfd Build: upgrade pre-built libraries for Linux
Replace ../lib/linux_centos7_x86_64 with ../lib/linux_x86_64_glibc_228,
built with Rocky8 Linux, compatible with the VFX platform CY2023,
see: T99618.

- Update build-bot configuration.
- Remove unnecessary check for Blosc, this is part of OpenVDB lib now.
- Remove WITH_CXX11_ABI, always use new C++11 ABI now
- Replace centos7 by glibc_228 everywhere

Note that existing builds with cached paths pointing to
"../lib/linux_centos7_x86_64" will need to be updated.

Includes contributions by Brecht.
2022-12-16 10:42:40 +11:00
Brecht Van Lommel
3d29bbcc38 Fix T103049: Cycles specular light leak regression
The logic here is not ideal but was unintentionally changed in refactoring
for path guiding, now restore it back to 3.3 behavior again.
2022-12-15 21:49:59 +01:00
Hans Goudey
6514bb05ea Mesh: Store active & default color attributes with strings
Attributes are unifying around a name-based API, and we would like to
be able to move away from CustomData in the future. This patch moves
the identification of active and fallback (render) color attributes
to strings on the mesh from flags on CustomDataLayer. This also
removes some ugliness used to retrieve these attributes and maintain
the active status.

The design is described more here: T98366

The patch keeps forward compatibility working until 4.0 with
the same method as the mesh struct of array refactors (T95965).

The strings are allowed to not correspond to an attribute, to allow
setting the active/default attribute independently of actually filling
its data. When applying a modifier, if the strings don't match an
attribute, they will be removed.

The realize instances / join node and join operator take the names from
the first / active input mesh. While other heuristics may be helpful
(and could be a future improvement), just using the first is simple
and predictable.

Differential Revision: https://developer.blender.org/D15169
2022-12-15 14:21:35 -06:00
Hans Goudey
b1494bcea7 Geometry Nodes: Add error message when applying modifier with no mesh
If the resulting geometry from applying a geometry nodes modifier
contains no mesh, give an error message. This gives people something to
search and makes the behavior more purposeful.

Also remove the `modifyMesh` implementation from the geometry nodes
modifier, since it isn't necessary anymore. And remove the existing
"Modifier returned error, skipping apply" message which was cryptic
and redundant if applying returns an actual error message.

Resolves T103229

Differential Revision: https://developer.blender.org/D16782
2022-12-15 14:21:35 -06:00
Hans Goudey
ae886596a0 Nodes: Allow skipping node attachment after dragging
This patch allows skipping the automatic insertion of nodes on top of
links when the transform operator ends. When putting nodes into small
spaces this often gets in the way and wastes time. Now, when holding
`alt`, this is turned off.

The header text is also improved to add this shortcut and to remove
the Dx and Dy values and improve the formatting a bit.

Making this functionality optional might allow us to use it in more
places in the future, like for the nodes added by link-drag-search.

Differential Revision: https://developer.blender.org/D16230
2022-12-15 14:21:35 -06:00
Iliya Katueshenock
7608ebe44a Fix: ignore unavailable sockets linked to multi-input socket
Differential Revision: https://developer.blender.org/D16784
2022-12-15 19:33:13 +01:00
Brecht Van Lommel
ef35247ee1 Fix make deps harvest error on Linux, due to macOS specific folder in Vulkan 2022-12-15 19:17:36 +01:00
Brecht Van Lommel
62f8d0d8c8 Fix T103170: missing Cycles viewport light threshold update after exposure edit 2022-12-15 19:13:55 +01:00
Brecht Van Lommel
c6ff8eb837 Fix build issue with NanoVDB and HIP on Linux
This patch was already accepted upstream, so this is temporary until we update
to a new OpenVDB release that includes it.
2022-12-15 18:58:52 +01:00
Jacques Lucke
6546113f1e Cleanup: fix warning 2022-12-15 17:31:14 +01:00
Hans Goudey
970f4c2f9f Cleanup: Various improvements to modifier apply operator
Use C++ casts, decrease variable scope, use references, use const.
2022-12-15 10:13:43 -06:00
Hans Goudey
bd04e80c09 Cleanup: Move mesh modifier apply function to editors module
The function was highly related to the apply modifier operator,
and only used once. This was too specific to be in the blenkernel,
especially in a mesh conversion file.
2022-12-15 10:13:43 -06:00
Ray Molenkamp
d2aebf10fa cmake/win: Allow running blender_test from the VS debugger
This was missing some paths setup in the environment, ctest
normally sets this up before running the tests from the CLI
but that does not help the IDE all that much.
2022-12-15 09:04:59 -07:00
Nate Rupsis
51759e6595 Fix T101130: Scaling of NLA Strip Via S Hotkey Not Working
After switching over to using start_frame / end_frame, scaling an NLA strip didn't scale the strip, it just repeated the action.

Now withing the NLA transform code, we look for TFM_TIME_EXTEND / TFM_TIME_SCALE transform mode, and handle the update to strip scale accordingly
2022-12-15 08:59:52 -05:00
Antonio Vazquez
9fe1db1d2b GPencil: Fix potential memory leak
If the layer was omitted there was a memory leak.
2022-12-15 13:08:55 +01:00
Philipp Oeser
0e1440eefd Paint: Orbit around selection/stroke: remove redundant case
Since rB8014180720d8, all paint modes support orbiting around last
stroke, so [a] the comment there is out of date and [b] the fallback
case of orbiting around the center will never be used (unless there is
no stroke information - but BKE_paint_stroke_get_average handles that
anyways).

Spotted while looking into T101766.

Maniphest Tasks: T101766

Differential Revision: https://developer.blender.org/D16779
2022-12-15 12:27:31 +01:00
Antonio Vazquez
e0ef5f3602 Fix T103234: GPencil applying armature does not work
The problem was the bake function was using the evaluated
data and must use the original data.

The problem was caused by commit: rBcff6eb65804d: Cleanup: Remove duplicate Bake modifier code.

Fix by Philipp Oeser
2022-12-15 10:53:22 +01:00
Thomas Dinges
ba347d7c9e Fix Cycles UI for Scrambling Distance, only works with Tabulated Sobol.
Thanks to Alaska for finding this.
2022-12-15 10:44:56 +01:00
Thomas Dinges
69d1ddd4c6 Fix Cycles Light Tree UI after recent changes. 2022-12-15 10:25:06 +01:00
Philipp Oeser
e5f139e99d Fix T101889: Curves editmode points are drawn from evaluated curves
Editmode should display the original (non-evaluated) points unless there
is something like an "On Cage" option of a modifier [which none of the
curves modifiers have].

This was not the case since the introduction in rBe15320568a29.

So we now draw the editpoints from the original curves. This also means
that original and evaluated curves might not have the same number of
points, so we have to get independent of `proc_point_buf` since that
would possibly create vertexbuffers of different sizes (compared to the
original curves) which is not allowed for a single batch.

- remove the "pos" alias from the vertex buffer format of proc_point_buf
- instead, create a new "edit_points_pos" vertex buffer
- fill that with the original (un-evaluated) curves positions
- dont request `proc_point_buf` anymore
- rename the editpoints flags buffer to be more consistent

And since original and evaluated points might also be in completely
different positions, we also need to draw connecting lines between those
editpoints to not have them float in thin air. For drawing these in
editmode, a simple polyline was chosen (instead of drawing lines in a
resolution that is take from the old particle system -- which is not
depending on points even but has a hardcoded resolution that can only be
upped by the hair_subdiv scene render setting)

- create appropriate batch and indexbuffer for this
- positions vertex buffer can be reused
- reuse particle edit shader (instead of curve edi shader) to get
segment highlighting

{F14055436}

NOTE: this also removes the broken depth handling and instead makes it
work (also XRay is properly taken into account) by binding the correct
overlay framebuffer.

NOTE: to further clarify the distinction between curves drawing (that is
based on the old partice system drawing) and drawing in editmode, the
corresponding vertexbuffers have been moved out of CurvesEvalCache into
CurvesBatchCache directly.

NOTE: drawing the lines in editmode could be improved (taking the "real"
resolution of splines into account, but since this should happen on the
GPU in a compute shader, this is for later)

Potentionally fixes T101889.

Maniphest Tasks: T101889

Differential Revision: https://developer.blender.org/D16281
2022-12-15 08:44:16 +01:00
Campbell Barton
9e47db4f43 Correct build error with MSVC 2022-12-15 18:03:09 +11:00
Campbell Barton
7571222a69 Cleanup: add trailing commas for multi-line collections
Avoid accidentally missing commas between strings, see: T101020.
Also use single quotes for enum identifiers.
2022-12-15 17:34:09 +11:00
Campbell Barton
657a5f205a Cleanup: remove redundant property lookups in RNA API use 2022-12-15 16:30:42 +11:00
Campbell Barton
18cc1b1108 Fix cursor warping display under Wayland
Under Wayland the transform cursor wasn't displaying the warped cursor.

This worked on other platforms because cursor motion is warped where as
Wayland simulates cursor warping, so it's necessary to apply warping
when requesting the cursor location too.
2022-12-15 15:22:52 +11:00
Campbell Barton
d715573aea Cleanup: declare GHOST_Window::getCursorGrabBounds as const
Needed so it the method can be called on a cosnt GHOST_Window.
2022-12-15 15:10:51 +11:00
Campbell Barton
b147af2b7e Cleanup: remove duplicate doc-strings 2022-12-15 14:56:58 +11:00
Campbell Barton
5da11e22de Cleanup: improve docs for grab functions & use rcti for the wrap region
- Use typed enum for the wrap axis.
- Rename `bounds` to `wrap_region`.
- Take a `rcti` argument instead of an `int[4]`.
- Pair wrap & wrap_region arguments together.
2022-12-15 14:34:50 +11:00
Campbell Barton
0240b89599 Fix T102346: Mouse escapes window during walk navigation
This is an alternative fix to [0] which kept the cursor centrally
located as part of GHOST cursor grabbing which caused T102792.

Now this is done as part of walk mode as it's the operator that most
often ran into this problem although ideally this would be handled by
GHOST - but that's a much bigger project.

[0]: 9fd6dae7939a65b67045749a0eadeb6864ded183
2022-12-15 12:17:26 +11:00
Campbell Barton
c969a533f9 WM: support checking windowing capabilities
Historically checks for windowing capabilities used platform
pre-processor checks however that doesn't work when Blender is built
with both X11 & Wayland.

Add a capabilities flag which can be used to check which functionality
is supported. This has the advantage of being more descriptive/readable.
2022-12-15 12:17:01 +11:00
Campbell Barton
230744d6fd Revert "Fix T102346: Mouse escapes window during walk navigation"
This reverts commits
9fd6dae7939a65b67045749a0eadeb6864ded183,
4cac8025f00798938813f52dcb117be83db97f22 (minor cleanup).

Re-introducing T102346, which will be fixed in isolation.

Unfortunately even when the cursor is hidden & grabbed,
the underlying cursor coordinates are still shown in some cases.

This caused bug where dragging a button in the sculpt-context popup
would draw the brush at unexpected locations because internally
the cursor was warping in the middle of the window, reported as T102792.

Resolving this issue with the paint cursor is possible but tend towards
over-complicated solutions.

Revert this change in favor of a more localized workaround for walk-mode
(as was done prior [0] to fix T99021).

[0]: 4c4e8cc926a672ac60692b3fb8c20249f9cae679
2022-12-15 12:15:23 +11:00
Campbell Barton
b13a92a238 Cleanup: wrap long lines in CMake
Also remove `mingw_LIBDIR` from PKG_CONFIG_PATH since it's not a
package-file path.
2022-12-15 12:14:11 +11:00
Campbell Barton
530b232309 Cleanup: use more descriptive name for function in BMesh doc generation
Avoid the term "print" as the function doesn't print.
2022-12-15 12:02:57 +11:00
Ray Molenkamp
7766a20b8f Build: clarify some comments in the rocky8 setup script
also moved the install of the config manager to before it is needed.
2022-12-14 17:26:40 -07:00
Campbell Barton
36ca1312c4 Cleanup: use doxy sections and comments in DNA_scene_types.h 2022-12-15 10:31:46 +11:00
Hans Goudey
e0fbeb6e7b Fix T103225: Line Art modifier skips loose edges
1ea169d90e39647eac72 neglected to increase the loose edge count.
2022-12-14 17:07:51 -06:00
Campbell Barton
2dd27d5f06 Cleanup: remove function for accessing supported add-ons
This was only called once in a situation where such functions
are typically used as a dynamic enum callbacks.

Prefer keeping the items close to the EnumProperty definition &
avoid the need to note why this is a special case that doesn't follow
the common pattern for enum callbacks.
2022-12-15 09:46:14 +11:00
Campbell Barton
e476afff41 Cleanup: format 2022-12-15 09:37:02 +11:00
Campbell Barton
d173a52f56 Cleanup: doc-strings and minor changes to anim_utils.py
- Follow sphinx conventions for doc-strings.
- Use __slots__ for KeyframesCo as dynamically assigning new members
  isn't needed.
- Import from bpy.types instead of assigning.
- Split typing imports across multiple lines as they tend to become
  quite large.
2022-12-15 09:34:00 +11:00
Campbell Barton
2d21fc3f5d Cleanup: avoid multiplying lists multiple times
Parenthesis are important in this case to avoid creating a list with
multiplication, then multiplying it again.

Oversight in 58c8c4fde35c158407ca2ba0c0bc099d1455f691.
2022-12-15 09:34:00 +11:00
Campbell Barton
f167e366da Build: add missing packages for the rocky8 setup script 2022-12-15 09:02:40 +11:00
Campbell Barton
918df11a1a Build: prefer underscores for script naming
Matches convention for most existing scripts.
2022-12-15 09:02:40 +11:00