Commit Graph

100622 Commits

Author SHA1 Message Date
Bastien Montagne
738264c7d6 Merge remote-tracking branch 'upstream/blender-v3.6-release'
Conflicts:
	source/blender/editors/uvedit/uvedit_select.cc
2023-06-21 16:47:05 +02:00
Damien Picard
58c6a278d3 I18n: remove context translation from node title
The node title was translated in two steps: first using the
BLT_I18NCONTEXT_ID_NODETREE context, and if that failed, using the
default context.

As far as I could find, the only node using this intentionally is the
Frame node, but its title is only displayed in the Add Menu.

However, at least one node has a bad translation because its name was
extracted independently with the NodeTree context: the compositing
Scale node uses a translation which is only appropriate in a vector
math context.

This commit removes the double translation step. If needed by
translators, a translation context in the node RNA could be introduced
at a later time.

Pull Request: https://projects.blender.org/blender/blender/pulls/108241
2023-06-21 16:43:19 +02:00
Damien Picard
386c653855 I18n: translate new sequence strip names
Newly added sequence strip names can be translated as user data. This
commit adds the appropriate `DATA_()` macros.

Pull Request: https://projects.blender.org/blender/blender/pulls/109058
2023-06-21 16:41:13 +02:00
Germano Cavalcante
e9eb8b3cc4 Cleanup: Use BLI_timeit in C++ code
And prefer `std::cout` instead of `printf`.
2023-06-21 11:39:18 -03:00
Damien Picard
037e5787a5 I18n: extract missing enum items for the Select Similar UV operator
The Select Similar UV operator defined multiple enum item arrays, and
returned one depending on current mode in the enum function
uv_select_similar_type_itemf().

The operator prop's enum items used only the vertex items, which
resulted in several items never being extracted because they were
dynamically generated instead of exposed to the RNA.

This commit groups all items in a single array so that they are
exposed, but uses the enum function to filter them.

Issue reported by Satoshi Yamasaki (@SatoshiYamasaki) in #43295.

Pull Request: https://projects.blender.org/blender/blender/pulls/108994
2023-06-21 16:37:54 +02:00
Jacques Lucke
ca25fc89bf Merge branch 'blender-v3.6-release' 2023-06-21 16:06:30 +02:00
Jacques Lucke
571aaa0e92 Fix: zero interior band width leads to no volume output
The input only determines the gradient of the volume density at its surface.
Using zero there should not break it.

Pull Request: https://projects.blender.org/blender/blender/pulls/109208
2023-06-21 16:05:47 +02:00
Iliya Katueshenock
ff528626f4 Fix #108344: default result buffer must be initially contain values
Caused by 15f464019a.

Now make sure that the `result_buffer` is properly initialized, because
it may be used when trying to blur on an unsupported attribute domain.

Pull Request: https://projects.blender.org/blender/blender/pulls/108347
2023-06-21 16:04:12 +02:00
Iliya Katueshenock
716cc72b96 Fix #108344: default result buffer must be initially contain values
Caused by 15f464019a.

Now make sure that the `result_buffer` is properly initialized, because
it may be used when trying to blur on an unsupported attribute domain.

Pull Request: https://projects.blender.org/blender/blender/pulls/108347
2023-06-21 16:02:20 +02:00
Bastien Montagne
94e6ab6d71 Fix #108923: Serious issues in 'undo_preserve' process of Scene's toolsettings.
By removing the extra complete check/remapping of ID pointers in undo
case, ebb5643e59 merely revealed how broken the 'undo_preserve' code of
Scene was.

It cumulated a flock of issues, all more or less related to ID pointers:
* 'source of truth' should be the _old_ data (toolsettings), not the new
  one, since this is the one kept at the end of the process;
* In some cases, some paint data may exist in one, but not the other
  of the two 'old' and 'new' toolsettings data.
* Since this data is preserved to its latest version accross undos, its
  ID pointers can become completely unrelated to these read from the
  undo memfile, _even when the Scene itself is detected as unchanged_!
  This implies that:
  + undo_preserve code has to be called even when there is no liblinking
    (when the ID is detected as unchanged and re-used 'as-is').
  + Using existing ID addresses to find/validate an ID pointer in
    undo_preserve process is like playing Russian roulette - invalid
    memory access and crash is guaranteed at some point or another.
    Use `session_uuid` value instead to ensure a valid ID pointer is set
    (or null in case none can be found).

NOTE: while these issues also exist in previous releases (including both
latest LTSs), they were hidden by the code later in `setup_app_data`,
preventing any crash to happen. So backporting this fix would be far too
risky for a very minimal benefit imho.
2023-06-21 15:37:39 +02:00
Bastien Montagne
b5db6fe5d2 BLO: Add a new API call to find IDs in newly read Main from a session_uuid.
Needed for upcomming fix in Scene's undo_preserve code.
2023-06-21 15:37:39 +02:00
Bastien Montagne
6d1f34a15f IDManagement: libquery: Add macro taking pointer to ID pointers as parameters.
Needed to simplify upcomming fix in Scene undo_preserve code.

NOTE: also renamed 'private' macro parameter names to follow C++ classes
convention (one trailing `_`, instead of one or two leading `_` - the
two `__` leading ones are triggering complains from IDE regarding reserved
identifier names when the relevant macros are used in C++ files).

No expected behavior changes with this commit.
2023-06-21 15:37:39 +02:00
Brecht Van Lommel
d9da86dd15 Refactor: move Cycles versioning into regular versioning files
It's confusing to have it separately, and could lead to potential bugs in the
future if there is some versioning depending on the order.

Pull Request: https://projects.blender.org/blender/blender/pulls/109166
2023-06-21 15:20:15 +02:00
Brecht Van Lommel
f4e6981513 Merge branch 'blender-v3.6-release' into main 2023-06-21 15:15:23 +02:00
Brecht Van Lommel
17fa168a3d Linux: add launcher script to fix issue launching on Steam
The steam environment sets LD_LIBRARY_PATH with a libtbb.so.2 that is
incompatible with our own. This wrapper scripts gives our own library
priority.

There is a more modern "Steam Linux Runtime" that can be used instead of
the "LD_LIBRARY_PATH Steam Runtime" and which launches Blender, but it
fails to detect GPU compute libraries. So that was not an option.

Ref #107385

Pull Request: https://projects.blender.org/blender/blender/pulls/109169
2023-06-21 14:49:27 +02:00
Jacques Lucke
c38dd2da2b Fix: geometry nodes modifier property not working after changing it in Python
Same as 9f30555faf but the fix had to
change a bit in `main` compared to `blender-v3.6-release` due to a refactor.
2023-06-21 14:16:36 +02:00
Jacques Lucke
9f30555faf Fix: geometry nodes modifier property not working after changing it in Python
This affected only vector and color inputs. The issue was that those were
expected to be stored as float-array properties. However, when setting them
from python using `modifier["Input_X"] = [1, 2, 3]` the array type becomes
either `int` or `double`, but not `float`. A workaround was to use
`modifier["Input_X"][:] = [1, 2, 3]` as this changes the property inplace.

Now `int` and `double` arrays are also understood by the modifier.

Pull Request: https://projects.blender.org/blender/blender/pulls/109203
2023-06-21 14:00:41 +02:00
Joseph Eagar
1347640e38 Sculpt: Fix #109112: Connected island code broken for multires 2023-06-21 02:19:48 -07:00
Joseph Eagar
93020db5e0 Sculpt: Fix #109112: Connected island code broken for multires 2023-06-21 02:19:00 -07:00
Jacques Lucke
ec18e11c37 Cleanup: remove unnecessary "for_write" in method name
This suffix is only preferred when the non-const version does more
work than the const version of a method (e.g. because it may duplicate
data because of implicit sharing).
2023-06-21 09:26:41 +02:00
Campbell Barton
4ed4fa8106 Linux: quiet error message on startup when GVFS dir isn't found 2023-06-21 17:23:15 +10:00
Pratik Borhade
57e4eea7b9 Merge branch 'blender-v3.6-release' 2023-06-21 11:47:08 +05:30
Germano Cavalcante
c83e37d354 Cleanup: Organize snap functions into methods
The definition of `test_projected_vert_dist` has been moved to
`Nearest2dUserData::snap_point`, and the parameters accessed within the
object have been removed from the function.

Additionally, the definition of `test_projected_edge_dist` has been
moved to `Nearest2dUserData::snap_edge`, and the parameters accessed
within the object have been removed from the function.
2023-06-21 02:12:21 -03:00
Germano Cavalcante
b12ced210a Cleanup: Deduplicate transform snap code
This commit deduplicates the code for:
- Creating local projection matrix;
- Creating local clip planes;
- Testing BoundBox snap distance.

These common codes are repeated for each type of object
(Empty, Camera, Armature, Curve, Mesh, Editmesh...).

Now they have been unified in the creation of `Nearest2dUserData`.
2023-06-21 02:11:31 -03:00
Germano Cavalcante
3cfd9d8bb5 Cleanup: Reduce number of parameters in snapping functions 2023-06-21 02:09:23 -03:00
Germano Cavalcante
af63f05d17 Transform: Add utility for debug snapping time 2023-06-21 02:08:52 -03:00
Omar Emara
b450101000 Realtime Compositor: Add support for node previews
This patch adds support for node previews in the realtime compositor.
Only node operations have previews for now. Shader nodes likes the
MixRGB node does not have previews implemented yet due to required
sizable changes in the node compiler.

Depends on: #108900.

Pull Request: https://projects.blender.org/blender/blender/pulls/108904
2023-06-21 05:41:49 +02:00
Omar Emara
740baefb16 Nodes: Add bNodeInstanceKey to DerivedNodeTree
This patch adds support for bNodeInstanceKey to DerivedNodeTree. The
keys are computed and cached in the DContext at construction time, and
various utilities are added to return the instance keys of contexts,
nodes, as well as find the active context in the tree.

Pull Request: https://projects.blender.org/blender/blender/pulls/108900
2023-06-21 05:03:56 +02:00
Campbell Barton
b46b1c02a0 Cleanup: use enum for texture types
- move POINT_DATA_* to texture_pointdensity.c.
- remove MTEX_NSPACE_*.
- replace magic numbers with defines for Tex::vn_coltype comparisons.
- use doxy sections.
2023-06-21 11:29:00 +10:00
Campbell Barton
472c461816 Cleanup: spelling in comments 2023-06-21 11:28:58 +10:00
Campbell Barton
25b46a5041 Cleanup: comment blocks 2023-06-21 11:28:56 +10:00
Campbell Barton
5a8d9b893c Cleanup: quiet shadow warning 2023-06-21 11:28:55 +10:00
Iliya Katueshenock
fa505d7c18 Fix #109171: Delete curve instead of creating empty result
If accumulated amount of points is zero, next offsets
will be empty too. Instead to expand offsets to create
empty curve, just delete source curve and skip any next steps.

Pull Request: https://projects.blender.org/blender/blender/pulls/109172
2023-06-21 02:27:58 +02:00
Hans Goudey
e38195109c Merge branch 'blender-v3.6-release' 2023-06-20 16:33:08 -04:00
Hans Goudey
2ef27684c5 Fix #108930: Mirror modifier handles custom normals incorrectly
Before 17d161f565, the "vec_lnor" stored the automatically
computed normal without any influence from custom normals. But after,
the normals were used from the final output corner normals array, which
did have the custom normal data factored in at the end. This fix is to
revert part of that commit, storing the automatically computed normal
per space like before.
2023-06-20 16:32:15 -04:00
Jesse Yurkovich
88cc6aa11e Merge branch 'blender-v3.6-release' 2023-06-20 12:34:02 -07:00
Jesse Yurkovich
66a6ef0163 Fix #109045: Allow images with more than 4 channels to load
Align behavior to what Cycles does in such cases which is to drop the
additional channels that are not supported.

This was a regression from aa3bdfd76a

Pull Request: https://projects.blender.org/blender/blender/pulls/109063
2023-06-20 21:32:54 +02:00
Iliya Katueshenock
ee98b24d15 Cleanup: Undo revertions from last cleanup
Changes from 8bcad285de were reverted when merging
#108995 with main. This was missed and committed to main.
This is a revert of those changes.

Pull Request: https://projects.blender.org/blender/blender/pulls/109167
2023-06-20 18:56:37 +02:00
Iliya Katueshenock
5b086fdc74 Cleanup: Preparation to move versioning file 2.6 to C++
Changes is a using `LISTBASE_FOREACH` instead of manual for-loops.
Also decrease variable scope in some places.

See #103343

Pull Request: https://projects.blender.org/blender/blender/pulls/108995
2023-06-20 18:38:28 +02:00
Julian Eisel
167c5c6b53 Fix UI views not refreshing properly in popovers
No UI views are used inside popups in the main branch yet, #104831 does
this so this issue became apparent. For example tree-view items would
not change their collapsed state.

UI views require the block to be attached to a region when drawing, so
that the matching to previous versions of the tree works. Before this
commit the block was attached just after.

The `BLI_findindex()` check before attaching the block was already done
for other kinds of popups, so this is more in sync now.
2023-06-20 17:23:25 +02:00
Jacques Lucke
a6d2bb92ed Cleanup: deduplicate code to create dummy nodes in simulation graph
The same new utility functions can also be used for serial loop zones later on.
2023-06-20 17:10:39 +02:00
Nate Rupsis
4268ac0ed9 Animation: NLA Vertical Reorder
Allow NLA strips to be vertically re-ordered. NLA strips can now be dragged through other strips, and locked tracks.

Co-authored-by: Sybren A. Stüvel <sybren@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/107990
2023-06-20 17:10:09 +02:00
Sybren A. Stüvel
2014084d29 Animation: Convert armature RNA from C to C++
Transform `rna_armature.c` and `rna_armature.cc` to C++.

- `UNUSED(x)` -> `/*x*/`
- Explicit casts for ID and void pointers
- Explicit casts for 0 enum values

No functional changes.
2023-06-20 17:02:47 +02:00
Julian Eisel
c8395e3bbc Cleanup: Remove unused header includes in outliner_tree.cc 2023-06-20 16:55:15 +02:00
Martijn Versteegh
c78ea4cefc Merge branch 'blender-v3.6-release' 2023-06-20 16:27:07 +02:00
Martijn Versteegh
77c37fb01d Fix #108053: Make the Collada UV sets enumerated from zero
The UV sets incorrectly used the CustomData layer index instead of the
count within the FLOAT2 layers.

Pull Request: https://projects.blender.org/blender/blender/pulls/109056
2023-06-20 16:24:33 +02:00
Campbell Barton
1765640558 Merge branch 'blender-v3.6-release' 2023-06-20 21:10:30 +10:00
Campbell Barton
e2dbc4779e UI: change the UV packing pin option into a toggle & drop-down
Exposing both the option not to use pinned islands and to skip pinned
islands in the same drop-down was confusing.

Now there is a checkbox "Pin", when disabled, pinned UV's don't
have any impact on the packed result.

When enabled, the pin-method selects how pinned islands are handled.

Also remove the "ignore" option from the UI as this didn't fit well with
other methods of handling pinned islands. Instead, islands to be ignored
can be de-selected by the user.

Ref !108733.
2023-06-20 21:08:59 +10:00
Bastien Montagne
27965a64a9 Merge branch 'blender-v3.6-release' 2023-06-20 12:42:14 +02:00
Michael Kowalski
a6f3afe995 Fix: USD export: wrong emissive color in viewport material
When a Blender material has no nodes, its viewport color,
roughness and metallic values are saved as inputs to a simple
USD Preview Surface.  This pull request fixes a bug where
the Blender material's viewport color is also saved as
the USD Preview Surface emissiveColor attribute.

This bug was accidentally introduced in #107947.

To reproduce the issue, open the default Blender scene,
turn off nodes on the material and set the material's viewport
color.  Export to USDA and notice that the color is incorrectly
set as the emissiveColor input in the USD shader.

Pull Request: https://projects.blender.org/blender/blender/pulls/109138
2023-06-20 12:35:39 +02:00