Commit Graph

124574 Commits

Author SHA1 Message Date
Philipp Oeser
eae0a24afb Merge branch 'blender-v3.6-release' 2023-05-31 15:02:19 +02:00
Philipp Oeser
eb4ea0b51d Fix #108266: sculpt auto created color attribute not set as render color
When entering sculpt mode on an object without any color attributes and
starting to paint, the newly created color attribute was set active, but
not default (camera icon).

Now set it default as well.

Pull Request: https://projects.blender.org/blender/blender/pulls/108271
2023-05-31 15:00:39 +02:00
Campbell Barton
37e8147da0 Cleanup: clang-tidy files in uvedit 2023-05-31 19:58:08 +10:00
Sergey Sharybin
0eecf63907 Cleanup: unused variable warnings
Pull Request: https://projects.blender.org/blender/blender/pulls/108450
2023-05-31 11:51:44 +02:00
YimingWu
397663a7cb Fix #107956: Simulation reset on fps change
Resets simulation cache when frame rate changes, so we don't get
inconsistent accumulations when frame rate is changed in the middle of
the simulation.

Pull Request: https://projects.blender.org/blender/blender/pulls/108004
2023-05-31 10:05:58 +02:00
Campbell Barton
c8ed927eac Cleanup: use nullptr and function style casts for numbers 2023-05-31 17:33:20 +10:00
Campbell Barton
623a40b9d0 UV: move editor files to C++
For the most part this simply resolves build warnings for C++
although BLI_array.h has been replace by blender::Vector.
2023-05-31 17:31:08 +10:00
Campbell Barton
f80e2c9f93 Cleanup: remove redundant struct qualifiers in 'uvedit' 2023-05-31 17:12:31 +10:00
Campbell Barton
e2cb52594a code_clean: add 'remove_struct_qualifier' edit
Removes struct qualifier when it's not needed.
2023-05-31 17:12:19 +10:00
Aras Pranckevicius
3672f9c437 Tests: add PLY import test coverage for #107299 2023-05-31 10:01:42 +03:00
Aras Pranckevicius
86b54a3015 Merge branch 'blender-v3.6-release' 2023-05-31 09:44:28 +03:00
Aras Pranckevicius
e097415c2c Fix #107299: new PLY importer does not skip unknown custom data elements
Properly skip any unknown/unrecognized custom data elements,
fixes #107299.
2023-05-31 09:43:56 +03:00
Campbell Barton
bdc79caf0e Cleanup: use EXIT_SUCCESS/FAILURE from calls to exit()
Missed from 4408fea092.
2023-05-31 15:30:19 +10:00
Campbell Barton
4408fea092 Cleanup: use EXIT_SUCCESS/FAILURE from calls to exit() 2023-05-31 14:01:39 +10:00
Campbell Barton
bd23eb4742 Merge branch 'blender-v3.6-release' 2023-05-31 13:51:59 +10:00
Campbell Barton
5242f442a5 Fix crashes accessing freed memory from the material clipboard
Follow up to [0], some material data wasn't accounted for.

- The embedded node-tree's owner_id wasn't set.
- Animation data (both the material & it's embedded node-tree).
- Updating depsgraph relations is needed when animation data is freed
  as part of paste too.

Also report when paste fails.

[0]: 5b5a1e3581
2023-05-31 13:51:10 +10:00
Campbell Barton
3f253af0fb Merge branch 'blender-v3.6-release' 2023-05-31 13:25:26 +10:00
Campbell Barton
f5ad77adbf Fix material copy-buffer memory leak on exit
Commented [0] (2.5x refactor that disabled many free functions),
for some reason this call was never re-enabled.
Add back the free call along with other clipboard buffers.

---

Cherry picked [1] from main as other fixes material clipboard
are difficult to validate when memory is leaking.

[0]: a1c8543f2a
[1]: cb0c4f04d4
2023-05-31 13:22:50 +10:00
Campbell Barton
12e5241876 BKE_main: simplify & update debugging block for tracking freed ID's
Use a macro to make the ID-free switch more compact & use ID indices
for better readability. Also typedef the enum so missing types in the
switch will report compiler warnings.
2023-05-31 13:22:48 +10:00
Campbell Barton
aa679b3e35 Merge branch 'blender-v3.6-release' 2023-05-31 12:42:01 +10:00
Campbell Barton
3f35675be5 Merge branch 'blender-v3.6-release' 2023-05-31 12:41:24 +10:00
Campbell Barton
19cd473518 Fix failure to cleanup temporary files with '--python-exit-code'
Note that handlers for the `ARG_PASS_FINAL` pass must always use WM_exit
instead of calling exit directly.
2023-05-31 12:35:22 +10:00
Campbell Barton
b2950b2ad7 Fix saving a quit.blend on exit when a file failed to load
When a file passed in from the command line failed to load,
blender would exit & save the quit.blend.

Resolve by adding a `do_user_exit_actions` to WM_exit_ex which is
false in backgrounds mode or when an error has occurred.

---

Back-ported [0] & [1] from main with fix [2] included.

[0]: c803ddab29
[1]: d7d1c524e3
[2]: d3d91b79e0
2023-05-31 12:35:22 +10:00
Jesse Yurkovich
286edd6b2a Merge branch 'blender-v3.6-release' 2023-05-30 18:02:25 -07:00
Jesse Yurkovich
71079b7957 Fix #108381: Ensure ImageOutput is closed while IOProxy is still alive
Some file formats, like PNG, will perform additional writes inside their
`close` methods. So call close while the IOProxy is still alive.

Pull Request: https://projects.blender.org/blender/blender/pulls/108382
2023-05-31 03:00:33 +02:00
Hans Goudey
66d20c8723 Cleanup: Simplofy use of modifier eval context flags 2023-05-30 16:43:02 -04:00
Hans Goudey
1551d7f033 Fix #108273: Mirror modifier resets copied custom normals
The "no custom" normal used to be stored inside the custom normal space
struct, now it's stored separately. Before the normal was modified, but
not the one in the normal space struct. Fixed by storing the original
before modification in a temporary variable.
2023-05-30 16:28:29 -04:00
Hans Goudey
e64b3c8212 Refactor: Remove pre-2.8 function to reevaluate a single object
This function replaced the evaluated mesh with a new one with the given
custom data type mask. That doesn't work in general anymore for a few
reasons: the increased dependence on named attributes (a opposed to
custom data types), and the "all or nothing" approach to reevaluating
the depsgraph. Other objects might depend on the object's evaluated
geometry, so it shouldn't just be replaced. Pushed a bit further, this could
give nice simplifications to mesh modifier evaluation.

There are two breaking changes, `bmesh_from_object` and BVH tree
`FromObject` require the source object to have a proper evaluated
mesh now.

If this causes a regression, it's likely that the object is missing
an update tag when a mode is entered that requires extra evaluated data.

Pull Request: https://projects.blender.org/blender/blender/pulls/106186
2023-05-30 22:25:06 +02:00
Philipp Oeser
243f20ec10 Revert "Particles: remove Halo, Line and Path render options"
broke tests, will check again tomorrow

This reverts commit fbd2bd8154.
2023-05-30 22:20:17 +02:00
Aras Pranckevicius
23afc6161c IO: remove OBJ and PLY Python add-ons (#104503, #104504)
With C++ based built-in implementations having both more features
and way better performance, it's time to retire the add-ons. Implements
#104503 and #104504.

Pull Request: https://projects.blender.org/blender/blender/pulls/108440
2023-05-30 21:41:26 +02:00
Hans Goudey
0fb3dbba20 Merge branch 'blender-v3.6-release' 2023-05-30 15:15:54 -04:00
Hans Goudey
ac4b76318a Fix #108330: Resample node crash with empty curves 2023-05-30 15:13:44 -04:00
Hans Goudey
f75af7cbf5 Mesh: Forward compatibility with generic bevel weight in 4.0
2a56403cb0 changed the way bevel weights 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.
2023-05-30 15:10:13 -04:00
Philipp Oeser
fbd2bd8154 Particles: remove Halo, Line and Path render options
For emitter particle systems, these were never rendered anyways, Path is
kept for hair systems of course.

As a consequence, the new default for particle systems is:
- render as None (users have to explicitly set this to object/
collection)
- display as point

When changing to Hair type, this automatically gets set back to
- render as Path
- display as Render

Changing back to emitter, will use points as display again (and render
as None -- same here, users have to explicitly set this to object/
collection)

Not sure if this is still for 3.6, patch is for 4.0 for now.

"Fixes" #80197

Pull Request: https://projects.blender.org/blender/blender/pulls/108231
2023-05-30 20:45:32 +02:00
Hans Goudey
c39bb12744 Cleanup: Simplify retrieval of evaluated point cloud for conversion 2023-05-30 14:33:08 -04:00
Hans Goudey
37f6af9e2c Cleanup: Remove unnecessary assert
With `bool` as a proper type in C++, this is unnecessary.
2023-05-30 14:33:08 -04:00
Sergey Sharybin
9b946aeecb Fix #108363: Light linking does not work when linked to self
The code which was preventing this originated to an early days of the
light linking project where bits accumulation was done as part of the
graph evaluation. Since then it was changed to be pre-calculated at
the graph build time.

The updates of the receivers is ensured via the HIERARCHY nodes and
relations between them.

Also made it explicit that the emitter is updated with the tag of
the collection: before it was relying on implicit Copy-on-Write
component tag.

Pull Request: https://projects.blender.org/blender/blender/pulls/108425
2023-05-30 20:22:30 +02:00
Harley Acheson
2d91ebe780 Merge branch 'blender-v3.6-release' 2023-05-30 10:53:27 -07:00
Harley Acheson
8dc855e60a Fix #108403: Console Word Selection Clipboard Copy Incorrect
Small correction to word selection in Console. Start and end of
selection were in incorrect order so it displayed correctly but
did not copy to clipboard as expected.

Pull Request: https://projects.blender.org/blender/blender/pulls/108434
2023-05-30 19:51:38 +02:00
Harley Acheson
de10126b1f Fix: Build Warning of Unused Variable
Removing unused variable in GHOST_SystemWin32.cc

Own code, introduced in #108397
2023-05-30 08:54:28 -07:00
Sergey Sharybin
5c25277f6c Fix #108374: Sun light linking issue on direct sampling
This is a continuation of a fix from the last week in #108311.
The issue was not fully fixed due to a mistake in the regression
test file.

There are two major things which left to be fixed since the
previous patch:

1. Root nodes can not be shared, even if the local and distant
lights belong to the same light set. If the root node is shared
then the flattening will use the same node index for specialized
trees, which is not a desired behavior.

2. The node type needs to be preserved when a new node is
created for a subset of emitters. This is because tree sampling
in kernel will handle distant and local lights differently for
nodes where there are multiple emitters.

Pull Request: https://projects.blender.org/blender/blender/pulls/108427
2023-05-30 17:39:50 +02:00
Miguel Pozo
644dd14e26 Fix: Compilation error after 960b53dbbb 2023-05-30 15:59:50 +02:00
YimingWu
51d10f4400 Fix #108161: Transform affected by off constraints
A missing `CONSTRAINT_OFF` check in `transform_convert.c` causes the
inverse matrix of that constraint to be added on top of the translation,
causing weird translation response in the viewport. Now fixed.

Pull Request: https://projects.blender.org/blender/blender/pulls/108217
2023-05-30 15:25:09 +02:00
Miguel Pozo
960b53dbbb EEVEE Next: Image rendering and render passes fixes/improvements
* Fix image rendering.
* Fix AOV rendering.
* Merge all render passes and AOV textures into 2 arrays (one for colors and one for values).
* Make AOVsInfoData std140 compliant.
* Remove surface color from Diffuse Light and Specular Light passes.
* Add Environment pass support.
* Add Shadow pass support.

Pull Request: https://projects.blender.org/blender/blender/pulls/108239
2023-05-30 15:20:52 +02:00
Campbell Barton
d3d91b79e0 Fix error from recent refactor failing to save user data on exit
The check from [0] flipped background mode check.

[0]: c803ddab29
2023-05-30 23:01:00 +10:00
Sergey Sharybin
ec7c1a6e0a Add light group tests category to Cycles
Pull Request: https://projects.blender.org/blender/blender/pulls/108424
2023-05-30 14:37:42 +02:00
Sergey Sharybin
db98d9816c Fix #108342: Regression: Cycles: Light group does not work
A couple of mistakes since the light linking commit:

- The +1 got missed in some of the refactors in the branch
- The order of arguments to the shadow path split was wrong

Pull Request: https://projects.blender.org/blender/blender/pulls/108420
2023-05-30 14:23:06 +02:00
Brecht Van Lommel
c5eaaa69bb Merge branch 'blender-v3.6-release' into main 2023-05-30 14:12:52 +02:00
Brad Smith
670da740ba Build: fix OpenBSD error in guardedalloc
Pull Request: https://projects.blender.org/blender/blender/pulls/108252
2023-05-30 13:55:37 +02:00
Brad Smith
0711bae5e7 Libmv: Remove FreeBSD sincos() workaround
Pull Request: https://projects.blender.org/blender/blender/pulls/108346
2023-05-30 13:55:27 +02:00