Commit Graph

100385 Commits

Author SHA1 Message Date
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
Hans Goudey
8a11f0f3a2 Fix #108517: Mesh split edges can give invalid indices
The split edges code had a complex method of merging duplicate edges,
going backwards to avoid shifting elements in a vector. Sometimes it
could result in incorrect corner edge indices though, if it moved an
index that matched one of the local variables (I think! I've bee
 trying to understand this all day and still struggling). Instead,
 replace it with a `VectorSet` that handles the deduplication by
 itself, and avoid creating the new edges until the end.

I think this code could still be simpler if we tried to reduce the
amount of things happening at the same time, making more code
deal with the input or final state rather than an in-between one.
But to avoid making the change too complicated I stopped here.

Pull Request: https://projects.blender.org/blender/blender/pulls/108826
2023-06-13 14:10:13 +02:00
Chao Li
e165dae3b8 GPv3: Select ends operator
Adds a "Select Ends" operator for the new Grease Pencil data type.
This replaces the previous `gpencil.select_first` and `gpencil.select_last`.

Resolves #108802.

Pull Request: https://projects.blender.org/blender/blender/pulls/108864
2023-06-13 13:02:49 +02:00
Pratik Borhade
796c69a0c6 Merge branch 'blender-v3.6-release' 2023-06-13 15:19:46 +05:30
Pratik Borhade
dc7678ecfa Fix #108814: Right Click doesn't cancel 3D View navigation
Entry for `VIEW_MODAL_CANCEL` was not included during refactor of
navigation operators (67203c0ec8)

Pull Request: https://projects.blender.org/blender/blender/pulls/108876
2023-06-13 11:46:54 +02:00
Iliya Katueshenock
3a1fdfc439 Fix: Dependency graph visibility flags counting a to nodes as a from
Fixing of typo in accomulating of affected nodes.

Pull Request: https://projects.blender.org/blender/blender/pulls/108888
2023-06-13 09:46:27 +02:00
Hoshinova
144ad4d20b Nodes: add Fractal Voronoi Noise
Fractal noise is the idea of evaluating the same noise function multiple times with
different input parameters on each layer and then mixing the results. The individual
layers are usually called octaves.
The number of layers is controlled with a "Detail" slider.
The "Lacunarity" input controls a factor by which each successive layer gets scaled.

The existing Noise node already supports fractal noise. Now the Voronoi Noise node
supports it as well. The node also has a new "Normalize" property that ensures that
the output values stay in a [0.0, 1.0] range. That is except for the F2 feature where
in rare cases the output may be outside that range even with "Normalize" turned on.

How the individual octaves are mixed depends on the feature and output socket:
- F1/Smooth F1/F2:
  - Distance/Color output:
    The individual Distance/Color octaves are first multiplied by a factor of
    `Roughness ^ (#layers - 1.0)` then added together to create the final output.
  - Position output:
    Each Position octave gets linearly interpolated with the combined output of the
    previous octaves. The Roughness input serves as an interpolation factor with
    0.0 resutling in only using the combined output of the previous octaves and
    1.0 resulting in only using the current highest octave.
- Distance to Edge:
  - Distance output:
    The Distance octaves are mixed exactly like the Position octaves for F1/Smooth F1/F2.

It should be noted that Voronoi Noise is a relatively slow noise function, especially
at higher dimensions. Increasing the "Detail" makes it even slower. Therefore, when
optimizing a scene one should consider trying to use simpler noise functions instead
of Voronoi if the final result is close enough.

Pull Request: https://projects.blender.org/blender/blender/pulls/106827
2023-06-13 09:18:12 +02:00
Campbell Barton
31613d15ef ImBuf: WIN32 UNC support for path to URI conversion
Correct the drive letter check & support UNC paths.
2023-06-13 14:37:02 +10:00
Campbell Barton
57dc36fb98 BLI_path: add BLI_path_slash_skip utility function
Avoids having to add inline loops that step over slashes.
2023-06-13 14:36:32 +10:00
Hans Goudey
31145ffce5 Cleanup: Use fmt library for geometry nodes error messages
Pull Request: https://projects.blender.org/blender/blender/pulls/108910
2023-06-13 02:52:09 +02:00
Richard Antalik
dc874b9f24 Fix #108613: Mute Audio for Playback also mutes for rendering
`AUDIO_MUTE` flag of `scene->audio.flag` works as intended and tooltip
for this property is not correct. However muting scene audio for
playback and rendering is not be very useful, since users can render
with no audio explicitly or adjust scene volume.

Only mute audio if `DAG_EVAL_VIEWPORT` mode is used.
2023-06-13 02:29:57 +02:00
Lukas Stockner
f58cbd05dc Cleanup: format 2023-06-13 01:58:06 +02:00
Richard Antalik
ef181b4913 Fix build warning
Oversight in `f4d6edd476`.
2023-06-13 01:51:35 +02:00
Germano Cavalcante
27a547cd3f Merge branch 'blender-v3.6-release' into main 2023-06-12 19:11:16 -03:00
Germano Cavalcante
f8617fe71b Fix #108880: Skin and Miffor modifiers cause mesh collapse
Before 4369627e71, the Mirror modifier merge did not interpolate
customdata.

Previously, the customdata was simply copied from the original vertex
during the merge, resulting in the retention of flags such as
`MVERT_SKIN_ROOT`.

This fix could just repeat that behavior for mirror. But these flags
can be useful in other cases, so this commit re-adds them to the
resulting merged vertex.

Although this can generate geometries with multiple roots on the same
island, there are different scenarios in which this can happen.
Therefore, multiple roots on the same island is not necessarily
considered a bug.
2023-06-12 19:10:47 -03:00
Hans Goudey
3db0c59ec1 Cleanup: Use functional cast for std::string_view
See https://wiki.blender.org/wiki/Style_Guide/C_Cpp#C.2B.2B_Type_Cast
2023-06-12 15:38:16 -04:00
Hans Goudey
0ec8599de7 Cleanup: Make curves/volume copy functions const
The same as 8593c5fa11.
2023-06-12 14:26:27 -04:00
Hans Goudey
8593c5fa11 Cleanup: Make point cloud copy function const 2023-06-12 14:22:11 -04:00
Brecht Van Lommel
a88114b35e Realtime Compositor: cache render pass GPU textures
* Store per RenderPass in RenderResult.
* Caches are cleared when starting rendering, to make more memory available
  to GPU rendering.
* Caches are cleared on UI changes, when no compositing node editor and no
  image editor with a render result or viewer node image is visible.
* Store 3 channel RGB passes as such, and set alpha 1 in shader.

This is an intermediate step before implementing GPU backed ImBuf, to
improve performance and figure out cache eviction.

Pull Request: https://projects.blender.org/blender/blender/pulls/108818
2023-06-12 19:49:18 +02:00
Iliya Katueshenock
e44e9634c4 Fix: Skip loop steps in recent cleanup
Reverse commit fix found for bge:
a5781f1302

Pull Request: https://projects.blender.org/blender/blender/pulls/108906
2023-06-12 18:50:18 +02:00
Iliya Katueshenock
14e96a9082 Cleanup: Move versioning file 2.7 to C++
1. `NULL` -> `nullptr`.
2. Cast `void *` to `T *` by using `static_cast`.
3. Using `LISTBASE_FOREACH` instead of manual for-loops.
4. `UNUSED` -> `/* ... */`
5. `#include <....h>` -> `#include <...>`

See #103343

Pull Request: https://projects.blender.org/blender/blender/pulls/108484
2023-06-12 18:34:47 +02:00
Hans Goudey
c1e2d01ce3 Cleanup: Move spacetypes.c to C++
See #103343

Pull Request: https://projects.blender.org/blender/blender/pulls/108905
2023-06-12 18:30:55 +02:00
Hans Goudey
655f00bb41 UI: Use property split for geometry nodes modifier bake path 2023-06-12 12:06:14 -04:00
Hans Goudey
612e306598 Attributes: Add identity default value to quaternion type
Missing from 1e4b80fed9.
2023-06-12 11:36:49 -04:00
Ray Molenkamp
8ba32c65a3 Merge remote-tracking branch 'origin/blender-v3.6-release' 2023-06-12 08:52:31 -06:00
Hans Goudey
b275851d1c Attributes: Support quaternion attribute in spreadsheet
Support drawing quaternion attributes. Row filters remain unimplemented.
2023-06-12 10:47:06 -04:00
Almaz Shinbay
a7ac317159 Outliner: Port linestyle 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 linestyle IDs.

Pull Request: https://projects.blender.org/blender/blender/pulls/108887
2023-06-12 16:03:25 +02:00
Hans Goudey
1e4b80fed9 Attributes: Add quaternion rotation type
Add a quaternion attribute type that will be used in combination with
rotation sockets for geometry nodes to give a more intuitive experience
and better performance when using rotations.

The most interesting part is probably the interpolation, the rest is
the same as the last attribute type addition, 988f23cec3.
We need to interpolate multiple values with different weights.
Based on Sybren's suggestion, this uses the `expmap` methods from
4805a54525 for that.

This also refactors `SimpleMixerWithAccumulationType` to use a
function rather than a cast to convert to the accumulation type.

See #92967

Pull Request: https://projects.blender.org/blender/blender/pulls/108678
2023-06-12 15:49:50 +02:00
Jeroen Bakker
ccbab842b7 Vulkan: Indirect Compute
This PR adds support for indirect compute.
Indirect compute is almost the same as regular compute. The
only difference is that the parameters for the compute dispatch
isn't passed as a parameter, but that these parameters are part
of a buffer.

Pull Request: https://projects.blender.org/blender/blender/pulls/108879
2023-06-12 14:56:38 +02:00
Hans Goudey
107c5e39aa Fix: OffsetIndices assert with invalid span
In some cases (when there are no faces for example, the offsets span
can have a size of 1 but no data). That's technically invalid and might
need to be addressed more later on, but for now, just fix the assert.
2023-06-12 08:48:21 -04:00