Commit Graph

99875 Commits

Author SHA1 Message Date
Campbell Barton
a5fe656c84 Build: add WITH_CYCLES define for creator
Recently added cycles options weren't included in the help message.

Also quiet extra token warning.
2023-05-27 14:17:52 +10:00
Campbell Barton
d133d622c1 Merge branch 'blender-v3.6-release' 2023-05-27 13:47:02 +10:00
Campbell Barton
6d03fde7db Fix potential NULL pointer de-reference from BLI_path_slash_rfind use
Avoid BLI_path_slash_rfind for accessing file-names as NULL is returned
when the path has no slashes, use BLI_path_basename instead.

Also remove 2 cases where BLI_path_basename was inlined.
2023-05-27 13:10:07 +10:00
Raimund Klink
082766bfa4 Docs: Make Cycles Args visible in --help
The Cycles-specific command line arguments are currently hidden
on this page [1]. To make the command visible in the manual [2] and
in `blender --help`, I added this patch.

[1] https://docs.blender.org/manual/en/3.6/advanced/command_line/render.html#cycles
[2] https://docs.blender.org/manual/en/3.6/advanced/command_line/arguments.html#argument-order

If this gets merged, please merge https://projects.blender.org/blender/blender-manual/pulls/104455 as well.

Pull Request: https://projects.blender.org/blender/blender/pulls/108232
2023-05-27 00:53:05 +02:00
Raimund Klink
d044b9f80c Docs: Move --debug-freestyle to the correct place
It bothered me that in the Blender manual the `--debug-freestyle` was in the `Other Options` category.
Now it should appear correctly in `Debug Options`.
https://docs.blender.org/manual/en/3.6/advanced/command_line/arguments.html#other-options

Pull Request: https://projects.blender.org/blender/blender/pulls/108179
2023-05-27 00:45:18 +02:00
Harley Acheson
07dbdd01e8 UI: Temporarily Disable Apple-specific Text Modifier Support
Disable recently-added support for some Apple-specific key modifiers
when  editing UI text. Only until we can add support for same for text
objects, console, and text editor. Keeping consistent between areas.

Pull Request: https://projects.blender.org/blender/blender/pulls/108333
2023-05-26 23:47:19 +02:00
Hans Goudey
93a2e5dbfa Cleanup: Consolidate public point cloud/mesh conversion functions
Exposing these direct conversions separately just confuses
the API, and they're not used anywhere else anyway.
2023-05-26 16:28:16 -04:00
Brecht Van Lommel
9a9209d8e0 Cleanup: consistenly use rnaindex -1 to mean the no or entire array 2023-05-26 21:33:37 +02:00
Josh Maros
6ba0346797 Python API: add bpy.context.property, for property under the mouse cursor
This can be useful for example to add custom operators to the property
context menu.

Pull Request: https://projects.blender.org/blender/blender/pulls/107280
2023-05-26 21:33:26 +02:00
Hans Goudey
ea937b304d Cleanup: Standardize delete geometry code
- Avoid using geometry sets from a different abstraction level
- Deduplicate basic attribute copying propagation code
- Allow more use of implicit sharing when data arrays are unchanged
- Optimize for when a point cloud delete selection is empty
- Handle face corners generically for "only face" case
2023-05-26 15:09:16 -04:00
Hans Goudey
de0f11515e Cleanup: Remove unnecessary namespace specification 2023-05-26 15:09:16 -04:00
Hans Goudey
865f14c641 Curves: Avoid inverting selection when deleting elements
Pass the curves and points to keep instead of delete. In the same test
file as the previous commit, this gave an increase from 50 to 60 FPS
when deleting curves.
2023-05-26 15:09:16 -04:00
Hans Goudey
d7e671028c Curves: Use simpler index mask logic in various places
In several nodes, and sculpt brushes, use the proper `IndexMask` type
instead of a span of ranges to encode a selection. This allows deleting
the duplicate data copying utilities using the second format.
2023-05-26 15:09:16 -04:00
Hans Goudey
f63cfd8e28 Curves: Optmize and simplify point and curve deletion
Using the new index mask implementation, things can be a bit simpler.
It's also simpler to use `complement` instead of `to_ranges_invert`,
which just made everything less standard. Also create the new curve
offsets in place instead of copying, and use implicit sharing to share
attributes when no curves were deleted.

With a version of `IndexMask::complement()` optmized locally, I observed
the following speedups with a 1.2 million point curve system:
- Delete points: 29 FPS -> 45 FPS
- Delete curves: 48 FPS -> 49 FPS
- Delete tip points: 25 FPS -> 32 FPS

Also add a method to apply the "gather" function to all attributes,
mostly as a continued experiment of consolidating attribute propagation.
This can be used more elsewhere in the future.
2023-05-26 15:09:16 -04:00
Hans Goudey
0b0b6a687a Cleanup: Move offset size copying utility to generic header
This shows more clearly that there's nothing specific to curves here.
2023-05-26 15:09:16 -04:00
Bastien Montagne
9c15058d0b Merge branch 'blender-v3.6-release' 2023-05-26 18:53:47 +02:00
Bastien Montagne
ff126ede17 'Fix' (unreported) issue that liboverride code can corrupt Main namemap.
Does not happen very often, but that weak handling of copying linked
data as linked data currently can lead to an invalid namemap in Main.

This is a known issue, fixing it requires addressing #107847.

In the mean time, work around it by re-validating and fixing the namemap
after the problematic liboverride calls.

NOTE: only identified issue currently is the proxy conversion of linked
proxies. The other cases *should* be fine.

Found while investigating issues when opening the
`lib/tests/libraries_and_linking/libraries/main_scene.blend` file.
2023-05-26 18:43:19 +02:00
Bastien Montagne
e260bc64da Fix (unreported) broken 'fixing' code in ID name uniqueness handling.
Logic in `main_namemap_validate_and_fix` could end up re-generating
a thousand of time the names of IDs because of an invalid assumption
about processed IDs being re-processable (in case they get renamed).

Also do not `CLOG_ERROR` when checking and fixing errors, if this code is
called to fix errors, it means errors are expected. Use `CLOG_INFO`
instead, or `CLOG_WARN` when the info is really important (like when IDs
had to be renamed).

And finally, simplify code clearing invalid namemaps, there is now a
function to handle this task, `BKE_main_namemap_clear`.

Issues & improvements found while working on readfile errors when
opening `lib/tests/libraries_and_linking/libraries/main_scene.blend`.
2023-05-26 18:43:19 +02:00
Bastien Montagne
591936c7ed Fix (unreported) wrong logic in readfile lookup for existing library ID.
In readfile code, when looking up for an already existing Library ID
based on the filepath, the logic handling said file path was wrong.

NOTE: This probably does not have any effect in practice, but better be
safe than sorry.

Found while investigating issues when opening
`lib/tests/libraries_and_linking/libraries/main_scene.blend`.
2023-05-26 18:43:19 +02:00
Christoph Lendenfeld
074abff87e Merge branch 'blender-v3.6-release' 2023-05-26 17:02:35 +02:00
Christoph Lendenfeld
e233507efd Fix: Channel select keys doesn't add undo step
When double clicking a channel in the Graph Editor, it would select all keyframes but not create an undo step for that.

This is an issue when double clicking to select all keys and then applying an operator.
The redo panel would also revert the selection since it didn't have an undo step

Pull Request: https://projects.blender.org/blender/blender/pulls/107887
2023-05-26 17:00:22 +02:00
Falk David
4492fe3080 Cleanup: rename gpencil rna function to legacy
Renames `RNA_def_main_gpencil` to `RNA_def_main_gpencil_legacy`.
2023-05-26 16:50:41 +02:00
Jason Fielder
9e83211b8d Fix: Implement shared Metal Command queue to resolve sync bugs
Previously, each GHOST Context instantiated its own Metal device
queue. Commands are only synchronized within a queue, this was the
root cause of a number of flickering issues which had previously
been worked-around with synchronization primitives.

New solution uses a shared queue to simplify dependencies and
alleviate possibility of stalls and bugs when resources are modified
or shared across separate GPU command queues.

Authored by Apple: Michael Parkin-White

Pull Request: https://projects.blender.org/blender/blender/pulls/108223
2023-05-26 16:00:20 +02:00
Sybren A. Stüvel
001e012ea0 Fix crash when selecting all bones in armature
Pressing 'A' to select all pose bones in an armature caused a segfault,
as `id->override_library->runtime->tag` was checked while
`id->override_library->runtime` was `nullptr`. An extra check resolved
the crash.
2023-05-26 15:12:43 +02:00
Sybren A. Stüvel
d36c329e16 Fix crash when selecting all bones in armature
Pressing 'A' to select all pose bones in an armature caused a segfault,
as `id->override_library->runtime->tag` was checked while
`id->override_library->runtime` was `nullptr`. An extra check resolved
the crash.
2023-05-26 14:36:44 +02:00
Sergey Sharybin
786c599404 Fix assert in light linking when making an asset
Simple steps to reproduce: mark the default cube as an asset.

Pull Request: https://projects.blender.org/blender/blender/pulls/108306
2023-05-26 11:30:48 +02:00
Campbell Barton
ad6fa96041 BLF: use BLI_path_cmp when comparing path names
There is no reason to use case-sensitive path lookups on MS-Windows.

Also replace BLI_str_endswith with BLI_path_basename since ends-with
checks don't ensure a preceding path separator.
2023-05-26 14:48:53 +10:00
guishe
cd09c91f69 Cleanup: deduplicate code to create menu for flip region
Ref !108302.
2023-05-26 13:31:56 +10:00
Campbell Barton
e7f88c1050 Cleanup: format 2023-05-26 13:30:14 +10:00
Campbell Barton
393d4a6e14 Cleanup: duplicate words in comments
Also use doxygen-comments in files where this is already the convention.
2023-05-26 12:40:06 +10:00
Campbell Barton
6876372974 License headers: add missing license identifier 2023-05-26 12:24:55 +10:00
Campbell Barton
ac74f3b396 Cleanup: refactor cursor jump type check into a function 2023-05-26 11:45:11 +10:00
YimingWu
99df159ce0 Fix #108098: GPencil: Prevent overwriting mvalo
There are other events besides `MOUSEMOVE` that's passed in during modal
handling, causes the `tgpi->mvalo` variable to be overwritten without
moving the stroke in the first place, this results in inaccurate offsets
during mouse/pen grabbing in primitive gizmo `IN_MOVE` mode. Now fixed.

Also fixed the operator hint to include the grab functionality.

Pull Request: https://projects.blender.org/blender/blender/pulls/108172
2023-05-26 03:30:16 +02:00
Chao Li
72309be398 Mesh: Avoid position copying in corrective smooth modifier
This is a place where copying mesh position is not needed. See #103789.

Pull Request: https://projects.blender.org/blender/blender/pulls/108291
2023-05-25 22:12:11 +02:00
Xavier Hallade
c18cafe748 Merge branch 'blender-v3.6-release' 2023-05-25 20:39:27 +02:00
Xavier Hallade
2533576802 EEVEE: Fix non-deterministic codegen preventing shader cache to work
used_libraries was iterated on to generate shader code depending on
pointers order, which was non-deterministic. It prevented shader caching
by graphics drivers to survive across reboots, as reported in
https://techgage.com/article/blender-3-5-performance-deep-dive-cycles-eevee-viewport/

Co-authored-by: Ray Molenkamp <github@lazydodo.com>

Pull Request: https://projects.blender.org/blender/blender/pulls/108289
2023-05-25 20:37:42 +02:00
Jacques Lucke
dc33a8e974 Geometry Nodes: expose simulation bake path in UI
Longer term we want to have a more centralized place where the bake
paths can be managed, but this is what we can still add in bcon3.

Pull Request: https://projects.blender.org/blender/blender/pulls/108220
2023-05-25 18:56:00 +02:00
Germano Cavalcante
c89461a2bc Fix recent change in transform code
fc854fc252 caused the precision modification to be removed after
navigation was complete.

The ideal is when starting navigation.

This is because the precision button can be released during navigation,
thus confirming the precision change.
2023-05-25 13:33:45 -03:00
Miguel Pozo
55b20cef43 Workbench Next: Add missing texture usage flags 2023-05-25 18:06:45 +02:00
Miguel Pozo
0897be8bb7 EEVEE Next: Ensure correct material settings are used
Add Material::blend_flags to Shaderkey,
to ensure Materials with different settings but the same shader
don't end up using the same pass.

Pull Request: https://projects.blender.org/blender/blender/pulls/108283
2023-05-25 18:01:54 +02:00
Germano Cavalcante
fc854fc252 Transform: remove precision modification upon starting navigation
In order to execute the navigation of type "VIEW3D_OT_move," the user
is required to press both the `Shift` and `MMB` keys.

However, pressing `Shift` also activates the precision modifier for the
transform.

Consequently, while the `MMB` is unpressed, the transform operation
unintentionally remains in precision mode, altering the mouse position.

To address this issue, the solution was to eliminate the precision
changes immediately after the navigation is initiated.

Unfortunately, we have no way of knowing whether the user actually
unintentionally enabled precision, so this solution serves as a
workaround. Ideally, keymap conflicts should be avoided.
2023-05-25 11:58:19 -03:00
Jacques Lucke
2fce65ecfb RNA: improve compatibility of generated code with C++
The goal here is to get us closer to using C++ in RNA code.

Pull Request: https://projects.blender.org/blender/blender/pulls/108277
2023-05-25 16:30:16 +02:00
Miguel Pozo
a31875dab6 Cleanup: Fix warnings in Overlay Next 2023-05-25 15:52:13 +02:00
Hans Goudey
986ff5a3a4 Cleanup: Remove IndexRange::as_span() static array and cache
After 2cfcb8b0b8 this was only used in one place that
was easily replaced. In practice this avoids creating a statically
allocated array after the split edges code is called.

Pull Request: https://projects.blender.org/blender/blender/pulls/108249
2023-05-25 15:42:54 +02:00
Hans Goudey
de2c8416a0 Fix #108258: Sculpt mode crash after remesh
4d841e1b35 incorrectly removed the clearing
of mesh topology maps when the object is reevaluated.
2023-05-25 08:53:18 -04:00
Campbell Barton
f97660d4ad Cleanup: spelling in comments 2023-05-25 22:50:30 +10:00
Hans Goudey
1c88721442 Fix: Crash entering vertex paint mode
SculptSession now contains non-trivial types that must be initialized.
2023-05-25 08:02:49 -04:00
Brecht Van Lommel
c6c127bfd3 Fix non-geometry object types being possible to set as light receivers 2023-05-25 13:49:38 +02:00
Brecht Van Lommel
673d066e35 Cleanup: change #define bitflags to enum 2023-05-25 13:49:38 +02:00
Sergey Sharybin
1c3e0f3585 Fix #108250: Cycles: Light Linking disabled after modifying object
The runtime backup/restore logic was slightly wrong: it is possible that
an object requires light linking runtime but does not need light linking
itself. This is typical configuration for the receivers/blockers.

Modified the logic so that the evaluated object light linking is allocated
if there was a runtime field needed.

This required to make it so light linking evaluation takes care of feeing
the light_linking if it is empty. The downside of this approach is a
redundant allocation from the object backup when removing light linking
collection from emitter. But this is not a typical evaluation flow, and
the more typical flows are cheap with this approach.

Pull Request: https://projects.blender.org/blender/blender/pulls/108261
2023-05-25 12:59:45 +02:00