Commit Graph

129072 Commits

Author SHA1 Message Date
Pratik Borhade
4fabafa352 GPv3: Assign correct GP material
Creating new material on empty slot adds general material for GPv3
object. Instead GP material should be used.
Found this issue while creating #113481

Pull Request: https://projects.blender.org/blender/blender/pulls/113526
2023-10-11 13:06:13 +02:00
Jacques Lucke
16ae169388 Cleanup: quite warning for function only used in debug build 2023-10-11 12:49:42 +02:00
Jacques Lucke
6a6dd392e2 Fix: copying panels in regions did not handle runtime data
Caused by 663aa353.
2023-10-11 12:48:40 +02:00
Falk David
4e05da2648 Fix: GPv3: Crash when drawing new stroke
The crash was happening because the storage buffer for active smoothing
was not resized correctly as the active smoothing window changed.

This fix makes sure the storage buffer is resized correctly.
2023-10-11 12:20:21 +02:00
Sergey Sharybin
926c6782fe Sculpt: Support Float2 attributes for dynamic topology
It was a missing case in the code which is responsible for in the code
which is responsible for filling in VBO data. It is now implemented for
vertex and corner attributes.

Co-Authored-By: Hans Goudey <hans@blender.org>

Pull Request: https://projects.blender.org/blender/blender/pulls/113536
2023-10-11 12:12:37 +02:00
Sergey Sharybin
e36626b02d Merge branch 'blender-v4.0-release' 2023-10-11 12:05:26 +02:00
Sergey Sharybin
a12a3dc73a Fix #113496: Crash in sculpt mode when Float2 attributes used on Vertices
The old logic had a hard-coded assumption that Float2 attribute is an
UV-map. This assumption is now resolved.

Pair programming session with Hans.

Pull Request: https://projects.blender.org/blender/blender/pulls/113535
2023-10-11 12:04:30 +02:00
Jacques Lucke
1d516bba1e Cleanup: use C++ struct for panel runtime data 2023-10-11 11:52:46 +02:00
Jacques Lucke
80dd5a4f52 Cleanup: remove padding in runtime data 2023-10-11 11:49:35 +02:00
Jacques Lucke
613a0ad651 Cleanup: move panel runtime data out of dna header 2023-10-11 11:48:37 +02:00
Jacques Lucke
c393d2a4d9 Merge branch 'blender-v4.0-release' 2023-10-11 11:36:55 +02:00
Jacques Lucke
535d211c94 Fix #113386: separating by loose parts removes attribute data
The issue was that custom data layers were modified without checking
that the data was not shared. Now the data is unshared first.

I also added an assert to catches this kind of issue more directly.
2023-10-11 11:35:11 +02:00
Philipp Oeser
ec5287bb39 Merge branch 'blender-v4.0-release' 2023-10-11 09:20:28 +02:00
Philipp Oeser
1242512ff2 Fix #113285: Mesh analysis not updating all multi-object-editing objects
The RNA update function was only taking into account the active object,
now changed to respect all `objects_in_edit_mode_unique_data`.

Pull Request: https://projects.blender.org/blender/blender/pulls/113294
2023-10-11 09:19:50 +02:00
Philipp Oeser
9783611518 Fix #113287: Industry Compatible Keymap: Node Editor Search missing
Caused by 974edc5885 / 7f9d51853c

You can now type to search directly in the `Add` menu.
Bit unfortunate though that this is not mapped to any shortcut in the
`Industry Compatible` keymap anymore

I think we could just add TAB back (but this time, mapped to
`NODE_MT_add`).

Pull Request: https://projects.blender.org/blender/blender/pulls/113446
2023-10-11 09:19:19 +02:00
Philipp Oeser
0e18097674 Fix #113463: VSE Hold-Split has no visual indication anymore
Exposed by cba9f47562 (but actually caused by 4d668e6825 I think).

Because of 4d668e6825 , the `StripDrawContext` `content_start` &
`content_end` were wrong for hold still regions.
These wrong extends were then used in cba9f47562 .

Now actually update `StripDrawContext` `content_start` & `content_end`
when hold still regions are in play (instead of just calling the right
functions [but not using their return values]).

Pull Request: https://projects.blender.org/blender/blender/pulls/113494
2023-10-11 09:18:39 +02:00
Campbell Barton
91ec9bc5a7 Cleanup: don't use DOXYGEN blocks for inline comments 2023-10-11 10:49:07 +11:00
Campbell Barton
b0a6c6c1de Merge branch 'blender-v4.0-release' 2023-10-11 10:44:23 +11:00
Campbell Barton
58442a420e Cleanup: comment for release configuration, quote-style & remove parens 2023-10-11 10:41:16 +11:00
Harley Acheson
61dc86b0eb Merge branch 'blender-v4.0-release' 2023-10-10 15:48:29 -07:00
Harley Acheson
b0515e34f9 UI: Input Placeholders
Optional inline hint describing the expected value of an input field.

Pull Request: https://projects.blender.org/blender/blender/pulls/112104
2023-10-11 00:47:13 +02:00
Campbell Barton
10e840935a Merge branch 'blender-v4.0-release' 2023-10-11 09:13:24 +11:00
Campbell Barton
c006c1809d BLI_fileops: set the errno if read returns an invalid value
Set the "I/O error" if the result from read is larger than the requested
size, while unlikely - set the error so an error return always sets the
`errno`.
2023-10-11 09:04:52 +11:00
Clément Foucault
a82e9586c4 Fix EEVEE-Next: Compilation on Metal 2023-10-10 23:52:04 +02:00
Hans Goudey
a6a2af5fdd Fix: Sculpt dynamic topology doesn't draw active/render color attribute
Pass the mesh to the drawing functions so it doesn't have to be
retrieved from the PBVH. It's nice to rely less on the PBVH `me`
pointer, since it's a fairly ugly "back pointer" which isn't necessarily
good design.
2023-10-10 18:22:50 +02:00
Jacques Lucke
663aa3538d UI: allocate panel runtime data separately
This results in better separation for what is stored in .blend files and what is not.
Also allows us to potentially use C++ in panel run-time data.

Pull Request: https://projects.blender.org/blender/blender/pulls/113502
2023-10-10 18:17:31 +02:00
Miguel Pozo
e235913c0d Fix: EEVEE-Next: Handle ObjectKey padding bytes 2023-10-10 17:55:23 +02:00
Miguel Pozo
26154aae81 Fix: EEVEE-Next: Bake regression
Missing `hiz_buffer.set_source` call after 80a6a8efe9
2023-10-10 17:40:28 +02:00
Germano Cavalcante
5429d892b7 Merge branch 'blender-v4.0-release' into main 2023-10-10 12:19:37 -03:00
Germano Cavalcante
ab2618e186 Fix compile error due to conversion to 'long unsigned int' from 'int'
Conversion to `long unsigned int` from `int` may change the sign of the
result [-Werror=sign-conversion]
2023-10-10 12:16:31 -03:00
Falk David
559c271a53 Clang-format 2023-10-10 16:59:56 +02:00
Bastien Montagne
a238ab737b Fix (unreported) liboverride: Hierarchy corruption when making some override local.
Making some liboverride local will break/corrupt liboverride hierarchies
in many cases. So that function (or its caller, in some cases) need to
call #BKE_lib_override_library_main_hierarchy_root_ensure to re-validate
(and re-generate if needed) the liboverride hierarchy roots.
2023-10-10 16:56:48 +02:00
Bastien Montagne
c5e10920f9 Fix (studio-reported) liboverride: hierarchy root ensure fails in some cases.
The code ensuring a valid liboverride hierarchy root ID pointer for all
liboverrides in a given Main would fail in some cases, and crash on
asserts (in Debug builds) or due to corrupted data later in code
(release builds).

The main issue fixed here is re-entry in case of dependency loops (a
same ID being checked more than once within the same chain of recursive
calls to ensure its hierarchy root is valid). Solved the usual way now,
using the intermediate 'PROCESSING' flag instead of setting immediately
the 'PROCESSED' one, when recursively processing the chain of
dependencies.

A second issue fixed in that code was that in some cases, it could leave
the invalid existing hierarchy root pointer unchanged, because it could
not find a 'valid enough' alternative.

NOTE: This data corruption is presumably caused by 'make local'
operations on liboverride hierarchy root IDs. This will be addressed as
a second commit.

For reference, issue is reproducible when opening
`/promo/splash/040_0010.lighting.splash.blend` from Pets SVN repo r3106.
2023-10-10 16:56:48 +02:00
Falk David
3931a54e08 GPv3: Initial Geometry Nodes support
This implements the core changes for this design: https://devtalk.blender.org/t/grease-pencil-integration-into-geometry-nodes/31220

The changes include:
* Add `CustomData` for layer attributes
* Add attribute support for the `GreasePencilComponent` to read/write layer attributes. Also introduces a `Layer` domain.
* Implement a `GreasePencilLayerFieldContext` and make `GeometryFieldContext` work with grease pencil layers.
* Implement `Set Position` node for `Grease Pencil`.

Note: These changes are only accessible/visible with the `Grease Pencil 3.0` experimental flag enabled.
Co-authored-by: Jacques Lucke <jacques@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/112535
2023-10-10 16:49:30 +02:00
Germano Cavalcante
7d7ca7b90d Merge branch 'blender-v4.0-release' into main 2023-10-10 11:31:35 -03:00
Germano Cavalcante
02ee5a7693 Fix Snap to Face ignoring back Clip Planes
Snap to Face ignoring some clip planes is an old behavior, but it is
not desirable as the snap is made to non-visible geometry.
2023-10-10 11:30:28 -03:00
Germano Cavalcante
c351de8b2a Fix #113486: Crash snapping with clipping borders
Caused by 2cead79747

The clip_plane count in BLI_kdopbvh.c was incorrectly reduced.

To solve, make the size of the clip_plane array variable.

This eliminates the need to keep values in sync.
2023-10-10 11:30:28 -03:00
Falk David
fa2a05ef86 Fix: GPv3 sometimes crashes when drawing
This was because the size and bounds of points were not properly
checked in some places.
Additionally, the smoothing algorithm should only be run if the
smoothing window is larg enough.
2023-10-10 16:22:25 +02:00
Falk David
cf2ea5979c Fix: GPv3 draw tool sometimes draws a cyclic curve
The issue was that the drawing tool did not write to the "cyclic" attribute.

Resolves #113423.

Pull Request: https://projects.blender.org/blender/blender/pulls/113500
2023-10-10 16:15:43 +02:00
Miguel Pozo
7d28b8cb5b Merge branch 'blender-v4.0-release' 2023-10-10 15:49:56 +02:00
Miguel Pozo
96d6003b92 Cleanup: Draw: max_orphan_cycles clarification 2023-10-10 15:49:28 +02:00
Brecht Van Lommel
46d32d8966 Merge branch 'blender-v4.0-release' into main 2023-10-10 15:36:39 +02:00
Brecht Van Lommel
478e1ab6d3 Fix build error on Windows after BLI_read changes
Don't use posix-only ssize_t in platform independent code.

Pull Request: https://projects.blender.org/blender/blender/pulls/113493
2023-10-10 15:36:15 +02:00
Pratik Borhade
3f3b693bab Merge branch 'blender-v4.0-release' 2023-10-10 18:54:30 +05:30
Pratik Borhade
02b5ad05f6 Update drawtype when forcefield is added to empty object
For consistency, change drawtype of empty when forcefield is added to
fresh empty object.
Found this while checking #113460

Pull Request: https://projects.blender.org/blender/blender/pulls/113471
2023-10-10 15:21:41 +02:00
Jeroen Bakker
25a1cea8e2 EEVEE-Next: Scene Reflection Probe Resolution
This PR reuses the scene specific reflection probe resolution for all
reflection light probes in the scene. The target is to have a automatic
detection for the resolution. But as long as we don't have a mechanism
for detection it is better to not introduce a new UI element that will
be removed within the foreseen future.

This setting is currently used by EEVEE and EEVEE-Next. EEVEE supports
resolutions upto 4096px. This will be clamped to 2048 when using
EEVEE-Next.

The motivation for this is that EEVEE-Next will soon replace
EEVEE and 4096 can then be removed from the choices that the user can
made. Adding as separate option could need synchronization, and that
option would also be temporary as it will be removed by the resolution
detection mechanism.

Pull Request: https://projects.blender.org/blender/blender/pulls/113491
2023-10-10 14:50:17 +02:00
Campbell Barton
57fc3d48b8 Merge branch 'blender-v4.0-release' 2023-10-10 22:49:58 +11:00
Campbell Barton
8d80d611e9 Use BLI_read instead of read to avoid issues with large files
Follow up to fix for #113473, similar issues exist elsewhere.
2023-10-10 22:47:35 +11:00
Campbell Barton
028c4b440c Merge branch 'blender-v4.0-release' 2023-10-10 22:28:53 +11:00
Campbell Barton
fa40724a72 BLI_fileops: Add 'BLI_read' wrapper to ensure the requested data is read
According to the documentation `read` isn't required to read all the
data requested. Although until recently I'd never encountered this and
none of Blender's code checks for read succeeding but not reading the
requested size.

Resolves #113473 where images over 2gb fail to load.

Ref !113474.
2023-10-10 22:27:40 +11:00