Commit Graph

100414 Commits

Author SHA1 Message Date
Lukas Tönne
f3dd63e25c Cleanup: Convert several RNA C files to C++
C++ RNA files for object, nodetree, and curves.

Pull Request: https://projects.blender.org/blender/blender/pulls/108934
2023-06-14 15:27:59 +02:00
Germano Cavalcante
cfede90082 Merge branch 'blender-v3.6-release' into main 2023-06-14 10:27:36 -03:00
Germano Cavalcante
c2ed9c39cd Fix #108958: Crash in edit mode when snapping is enabled
Caused by cad897de16

The crash happens because the `SnapData_EditMesh` is removed from the
map but still accessed afterwards.

However, after cad897de16, invalidating an object's unique snap date is
no longer required.
2023-06-14 10:25:34 -03:00
Clément Foucault
cbfb9bcee4 EEVEE-Next: Fix wrong buffer location for sampling_buf
This created missing bind errors on some implementations.
2023-06-14 15:10:30 +02:00
Julian Eisel
8783038a38 Refactor: Remove asset library reference in node add menu code
The asset library reference isn't needed anymore for importing assets
since ccc9eef1b9. So it doesn't need to be set in the add menu context,
which simplifies code a bit.
2023-06-14 14:57:05 +02:00
Jacques Lucke
345d4087b7 Merge branch 'blender-v3.6-release' 2023-06-14 14:39:34 +02:00
Jacques Lucke
f43dd04aac Fix: missing simulation cache allocation when creating new modifier 2023-06-14 14:39:10 +02:00
Jacques Lucke
3298c72ea2 Merge branch 'blender-v3.6-release' 2023-06-14 14:24:08 +02:00
Jacques Lucke
54e303a69c Fix #108720: allow discovering baked simulation data during rendering
Sometimes the modifier has never been evaluated by an active depsgraph
before it is used for rendering. In this case, the baked data was never
loaded. Now also allow checking for baked data in a non-active depsgraph.
The locking that is in-place already should probably already be enough
to make this thread-safe but maybe that could be made more explicit.
2023-06-14 14:23:13 +02:00
Jacques Lucke
f1ce94d09e Merge branch 'blender-v3.6-release' 2023-06-14 14:14:38 +02:00
Jacques Lucke
7b61dcf6bc Geometry Nodes: deduplicate anonymous attribute analysis algorithm
Previously, there were two independent algorithms for analysing how anonymous
attributes are used in a node tree: One that just computed the `aal::RelationsInNode`
for an entire node tree and one that performed a more in depth analysis to
determine how far anonymous attributes should be propagated.

As it turns out, both operations can also be done at the same time and the result
can be cached on the node tree. This reduces the amount of code and allows for
better code reuse.

This simplification is likely only an intermediate step as things will probably have
to be refactored further to support e.g. serial loops (#108896).
2023-06-14 14:04:22 +02:00
Jacques Lucke
87643d173e Geometry Nodes: use shared_ptr for sharing simulation cache
With this the simulation cache pointer is copied over to the evaluated modifier.
This allows the original modifier to be removed without breaking the evaluated
modifier, which results in better decoupling. This can avoid issues when a
non-active depsgraph is evaluated in the background while the user is manipulating
the scene.

Also, it is now assumed that the simulation cache is always allocated even if
there is no simulation (similar to run-time data). This simplifies the code.

Pull Request: https://projects.blender.org/blender/blender/pulls/108976
2023-06-14 14:04:02 +02:00
Jacques Lucke
b169469016 Geometry Nodes: crash when propagating attributes
Pull Request: https://projects.blender.org/blender/blender/pulls/108801
2023-06-14 13:59:38 +02:00
Jacques Lucke
37a0b97b51 Nodes: add debug utility to export bNodeTree as dot graph
It's possible to customize how the generated graph looks like by
passing in a custom `bNodeTreeToDotOptions`. This allows making
specialized visualizations for specific algorithms.
2023-06-14 12:19:13 +02:00
Philipp Oeser
5b101b7a63 Merge branch 'blender-v3.6-release' 2023-06-14 09:05:51 +02:00
Philipp Oeser
a7afce347d Fix #104597: Knife relative angle constaint wrong on rotated objects
The face normal was used in local space whereas it is needed as a global
direction (since other vectors here are in worldspace as well --
knife_input_ray_segment() returns worldspace).

Could go into 3.3 LTS.

Pull Request: https://projects.blender.org/blender/blender/pulls/108938
2023-06-14 08:58:28 +02:00
Philipp Oeser
c99dd96731 Knife: remove redundant recreation of a ray
This was done prior with no altering it and had a misleading comment.
Part of PR #108938 (split into a separate commit).

Pull Request: https://projects.blender.org/blender/blender/pulls/108938
2023-06-14 08:56:30 +02:00
Richard Antalik
58d8a2ed67 Revert "Merge branch 'blender-v3.6-release'"
This reverts commit 01f0f8b86c, reversing
changes made to 26b5de6865.
2023-06-14 04:47:53 +02:00
Richard Antalik
01f0f8b86c Merge branch 'blender-v3.6-release' 2023-06-14 04:41:57 +02:00
Richard Antalik
b77e7480ef VSE: Remove retiming tool for 3.6 release
This reverts commits:
e1f6587f12
b4100ed377
6749593aec
a97cae3efc
559898709f
e4eb9e04e0
bb1c503bee
b21695a507
7bf56e5c75
4dc026ec8e
354ef89d20

Reason for reverting is to not introduce this feature with current UI.

Pull Request: https://projects.blender.org/blender/blender/pulls/108870
2023-06-14 04:25:52 +02:00
Campbell Barton
47b52b39ac Cleanup: use C++ conventions (function style cast, nullptr) 2023-06-14 12:20:07 +10:00
Campbell Barton
d4b23cae8f Cleanup: use C-style comments for descriptive text 2023-06-14 12:20:06 +10:00
Campbell Barton
5474f8d0ad Cleanup: remove unused MTex members
Also add docstring for which_output.
2023-06-14 12:20:05 +10:00
Campbell Barton
46e5d475a5 Cleanup: compiler warning 2023-06-14 12:20:03 +10:00
Campbell Barton
9e8db89b43 Fix logical error selecting similar vertex crease
Changes from [0] meant the crease layer was never assigned
(would always be left at -1).

[0]: e5ec04d73c
2023-06-14 12:18:58 +10:00
Hans Goudey
67d7614c9b Fix: Debug build error after C++ conversion 2023-06-13 17:50:31 -04:00
Hans Goudey
8030e38f63 Cleanup: Move editmesh_utils.c to C++
See #103343

Pull Request: https://projects.blender.org/blender/blender/pulls/108952
2023-06-13 23:05:45 +02:00
Hans Goudey
3896eca440 Cleanup: Move rna_mesh.c to C++
See #103343

Pull Request: https://projects.blender.org/blender/blender/pulls/108950
2023-06-13 22:24:10 +02:00
Habib Gahbiche
ab4286f940 Compositor: speedup Kuwahara classic variation
Compute luminance only once per region and per pixel by means of vectorization.

Measured time improvements on intel i9 CPU on a 1920 x 3199 image:
- from 14.7s to 3.9s for full-frame compositor
- from 50.1s to 15.3s for tiled compositor

Pull Request: https://projects.blender.org/blender/blender/pulls/108859
2023-06-13 22:22:01 +02:00
Hans Goudey
7d935f94f3 Cleanup: Grammar: it's vs its 2023-06-13 14:51:49 -04:00
Hans Goudey
58d2c7386d Merge branch 'blender-v3.6-release' 2023-06-13 14:41:30 -04:00
Hans Goudey
83ef3bc923 Mesh: Forward compatibility with generic crease in 4.0
e5ec04d73c changed the way crease vakyes are stored in 4.0.
Add versioning for reading the new files that replaces the new generic
attributes with the old non-generic custom data layers. The code is
paranoid with lots fo checks I expect will typically not be necessary.

Similar to f75af7cbf5
2023-06-13 14:31:25 -04:00
Brecht Van Lommel
3998c11627 Merge branch 'blender-v3.6-release' 2023-06-13 20:25:01 +02:00
Brecht Van Lommel
f3c45f5b5a Fix off by one error introduced by me in recent commit 6948a2d 2023-06-13 20:24:17 +02:00
Hans Goudey
e5ec04d73c Mesh: Move vertex/edge crease to generic attributes
Store subdivision surface creases in two new named float attributes:
- `crease_vert`
- `crease_edge`
This is similar to 2a56403cb0.

The attributes are naming conventions, so their data type and domain
aren't enforced, and may be interpolated when necessary. Editing tools
and the subdivision surface modifier use the hard-coded name. It might
be best if these were edited as generic attributes in the future, but
in the meantime using generic attributes helps.

The attributes are visible in the list, which is how they're now meant
to be removed. They are now interchangeable with any tool that works
with the generic attribute system-- even tools like vertex paint can
affect creases now.

This is a breaking change. Forward compatibility isn't preserved for
versions before 3.6, and the `crease` property in RNA is removed in
favor of making a smaller API surface area with just the attribute API.
`Mesh.vertex_creases` and `Mesh.edge_creases` now just return the
matching attribute if possible, and are now implemented in Python.
New functions `*ensure` and `*remove` also replace the operators to
add and remove the layers for Python.

A few extrude node test files have to be updated because of different
(now generic) attribute interpolation behavior.

Pull Request: https://projects.blender.org/blender/blender/pulls/108089
2023-06-13 20:23:39 +02:00
Hans Goudey
f32bd8f804 Merge branch 'blender-v3.6-release' 2023-06-13 14:09:30 -04:00
Hans Goudey
89232d52db Fix: Avoid creating uninitialized attribute in distribute points node
Interpolation from edge attributes is unsupported, and the data
of the new point attribute was uninitialized. As a fix, just avoid
interpolating edge attributes in the first place.
2023-06-13 14:09:11 -04:00
Brecht Van Lommel
835252fd1c Merge branch 'blender-v3.6-release' into main 2023-06-13 19:48:48 +02:00
guishe
6948a2d613 Fix #98973: Renaming Custom Python Properties is Incorrect
PyUnicode_AsUTF8AndSize is used when renaming a custom python property,
this method stores the size of the string without including the null
terminator in the size.

Renaming a custom python property now includes the null terminator when
copying the new string name.

Pull Request: https://projects.blender.org/blender/blender/pulls/107983
2023-06-13 19:46:11 +02:00
nutti
61ead957a0 Docs: Fix bpy.types.Operator.poll_message_set() method to classmethod
Pull Request: https://projects.blender.org/blender/blender/pulls/108854
2023-06-13 19:46:11 +02:00
Brecht Van Lommel
2b327d1c0e Fix realtime compositor unsupported node warnings shown for hidden 3D views 2023-06-13 19:46:11 +02:00
Almaz Shinbay
864798b4c7 Outliner: Port collection 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 collection IDs.

Pull Request: https://projects.blender.org/blender/blender/pulls/108943
2023-06-13 18:22:04 +02:00
Julian Eisel
256146a454 UI: Add setter function for grid view item tile size
No user visible change expected.

Needed in #104831 (not worth polluting the PR with such minor changes,
so committing this to main already).
2023-06-13 18:17:19 +02:00
Julian Eisel
ff44e376ce Cleanup: Return non-const view in grid view item getter
Needed in #104831, not a big deal to let this return non-const (and not
worth polluting the PR with such minor changes).
2023-06-13 18:11:14 +02:00
Julian Eisel
3b78bca592 UI: Allow view items to not be activatable
No user visible changes expected.

In some cases you'd want a view in which no, or not all items can be
activated. Needed for #104831, but makes sense as a general feature for
UI view items.
2023-06-13 18:02:48 +02:00
Hans Goudey
4834b301f0 Fix: Crash with "use sharp" turned off in weighted normal modifier 2023-06-13 11:43:30 -04:00
Hans Goudey
13d567ba92 Fix: Crash deleting all curve points
There was a special case for when all points were selected,
but a missing return caused the general case to run afterwards.
2023-06-13 11:23:12 -04:00
Sergey Sharybin
ea33172409 Fix de-referencing of null pointer in depsgraph
The accessors of original ID and objects are expected to return
nullptr for the nullptr input. This was handled explicitly in the
DEG_get_evaluated_id(), but the DEG_get_evaluated_object was using
`object->id` without check.

While it did not cause actual issue (as the id's offset is 0), this
was causing address sanitizer error print.

Pull Request: https://projects.blender.org/blender/blender/pulls/108939
2023-06-13 15:41:51 +02:00
Almaz Shinbay
3481376981 Outliner: Port grease pencil legacy 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 grease pencil legacy IDs.

Pull Request: https://projects.blender.org/blender/blender/pulls/108929
2023-06-13 14:30:16 +02:00
Hans Goudey
c9d70ae44b Merge branch 'blender-v3.6-release' 2023-06-13 08:22:50 -04:00