120479 Commits

Author SHA1 Message Date
Bastien Montagne
cb93433a56 Band-aid fix crash when appending an overridden collection from T103062.
This commit addresses that specific case related to Collection ID type,
using a band-aid fix which is hopefully safe enough.

T103062 will remain open as a TODO task for a proper fix later.
2022-12-26 20:34:40 +09:00
Alexander Gavrilov
87cf495860 Fix cloth regression after removing mvert pointers in Mesh.
This is an obvious editing mistake introduced in 05952aa94d33eeb,
resulting in incorrect vertex coordinates used when raycasting
for internal springs with a rest shape key.
2022-12-26 11:16:33 +02:00
Bastien Montagne
9e0feec0d3 Fix T103421: Library weak reference generates "Could not find .blend" errors when "Find Missing Files".
Do not consider weak references in `BKE_bpath_missing_files_find`, just
as already done in `BKE_bpath_missing_files_check`.
2022-12-26 16:31:25 +09:00
Bastien Montagne
32b1947be2 Fix T103389: Invalid flags in default_material_surface->nodetree->tag.
There are still codepaths that can create embedded IDs with `NO_MAIN`
tag. Related to T88555 TODO.
2022-12-26 16:22:50 +09:00
Bastien Montagne
09ba00974f Fix recent liboverride diff report refactor.
In rBfcddb7cda766 I forgot to update part of the whole diffing chain,
effectively breaking the report flags propagation from any sub-structs
of RNA IDs structs.
2022-12-25 20:01:59 +09:00
Hans Goudey
00b3f863b8 Curves: Remove option to disable selection
Remove the redundant option to disable selection in order to simplify
the tools and UI, both conceptually and internally.

It was possible to disable curves selection completely by clicking on
the active selection domain. However, that was redundant compared to
just selecting everything by pressing "A". The remaining potential use
could have been saving a selection for later, but that can be done with
more complete attribute editing tools in the future.
2022-12-24 16:09:40 -05:00
Jacques Lucke
8fab53c023 BLI: add last time to scoped averaged time 2022-12-24 14:01:05 +01:00
Antonio Vazquez
e1180bfdb2 GPencil: Use Material or Vertex Color for Brush cursor
The color of the brush cursor is changed depending
of the mode selected.

If the mode is stroke vertex color, use vertex color, otherwise
it uses material stroke color.
2022-12-24 11:37:21 +01:00
Martijn Versteegh
14667de65b Fix uninitialized ColorSceneLinear4f occuring in certain situations.
On gcc 11.3, Ubuntu 22.04 the default constructor for
ColorSceneLinear4f did not zero the r,g,b,a member variables. Replacing
the empty constructor with a default constructor circumvents this
problem (compiler bug? ) even though it *should* be more or less
equivalent.
2022-12-24 10:39:22 +01:00
Aaron Carlisle
4701421dbe UI: Remove unused light object panel (Correction)
This panel showed a duplication of options that were in the main light panel and only mistakenly shows up in the workbench engine where lights should have no options.

This panel was also used by the POV-Ray add-on but that was removed recently.
2022-12-23 19:06:29 -05:00
Aaron Carlisle
014d0a8ede Update RNA to User manual mappings 2022-12-23 19:00:02 -05:00
Aaron Carlisle
fea60eccbf UI: Remove unused light object panel
This panel showed a duplication of options that were in the main light panel and only mistakenly shows up in the workbench engine where lights should have no options.

This panel was also used by the POV-Ray add-on but that was removed recently.
2022-12-23 18:58:48 -05:00
Sietse Brouwer
a44c128482 GPencil: show brush size in Draw tool cursor
When drawing strokes in Grease Pencil, it was always a bit hard
to predict how thick the strokes would be, because there was
no visual reference of the thickness in the cursor.
This patch adds that visual reference. It shows the brush size
as a circle in the draw cursor.
Showing the brush size can be toggled in the Cursor menu
of the Grease Pencil draw tool.

Request in RCS with 26 upvotes for this option:
https://blender.community/c/rightclickselect/0zfbbc

On the technical side: the brush size is calculated
in 3D space and takes zoom level into account, as well as
object/layer transfrom, layer thickness change (gpl->line_change)
and thickness scale (gpd->pixfactor).

Reviewed By: mendio, antoniov

Differential Revision: https://developer.blender.org/D16851
2022-12-23 16:02:54 +01:00
Jacques Lucke
b024577452 Fix: dangling attribute name pointer 2022-12-23 13:16:42 +01:00
Philipp Oeser
2838d9324d Cleanup: clang format
Missed in rB15c433d7d564.
2022-12-23 12:04:56 +01:00
Eimear Crotty
a521960fdd Fix T103426: Crash on Insert Keyframe
Add required additional_info to shader using gpu_shader_point_uniform_color_aa_frag.glsl. This is the only other reference to the shader which requires the additional_info to be added.

{F14085803}

Reviewed By: #eevee_viewport, fclem

Maniphest Tasks: T103426

Differential Revision: https://developer.blender.org/D16853
2022-12-23 11:39:49 +01:00
Dalai Felinto
a8aae66f0e Asset Browser: New catalog menu
This replaces the old Edit menu, creating a menu only for catalog
operators. The Undo/Redo were already working only for catalogs, so now
this is more clear.

The menu also contains the Save and New catalog operators.

Differential Revision: https://developer.blender.org/D16820
2022-12-23 11:31:38 +01:00
Clément Foucault
834ca5d682 GPU: Fix Shader Builder stubs after removal of UNUSED macro in C++
This was introduced by rBfb7f12dc4078
2022-12-23 11:19:04 +01:00
Philipp Oeser
fb8778a28c Fix T103394: default/active color status lost after remeshing
Caused by rB6514bb05ea5a.

For the remeshing, we have to make sure these names are brought over
each time a mesh is made from another in the process.

This happens when reprojecting the colors in
`BKE_remesh_reproject_vertex_paint` and also again in
`BKE_mesh_nomain_to_mesh`. A bit unsure if this should happen as deep as
in `BKE_mesh_nomain_to_mesh` (if not, this can be isolated to
`voxel_remesh_exec`), but I would assume other callers of
`BKE_mesh_nomain_to_mesh` would actually benefit from it, too?

Maniphest Tasks: T103394

Differential Revision: https://developer.blender.org/D16847
2022-12-23 09:18:33 +01:00
Joseph Eagar
f803a0a95b Sculpt: Fix T103341: Move sculpt overlay flags to View3DOverlay.flag
"Show mask" and "Show face sets" were being stored in
`Sculpt`, yet their opacities are in `View3dOverlay`.
Now `View3DOverlay` has the flags too.
2022-12-22 16:56:50 -08:00
Philipp Oeser
15c433d7d5 Fix: Missing UI context members after recent refactor
Caused by 7d7e90ca685954409ece00.

When accessing context members from the windowmanager context
(`C->wm.store` which is mainly used for UI related stuff) the above
commit broke behavior in `CTX_store_ptr_lookup` in that it changed and
would **always** return NULL if no type is passed in. The call to
`CTX_store_ptr_lookup` from `ctx_data_get` **always** passes in NULL
though.

Accessing other context members survived since they take a different
code path in `ctx_data_get` and dont use `CTX_store_ptr_lookup`.

Now also return the entry if a NULL type was passed as it was before.

Fixes T103370, T103405, T103417

Differential Revision: https://developer.blender.org/D16840
2022-12-22 16:14:41 -05:00
Damien Picard
d9510f02c8 Animation: separate constraint owner space descriptions for objects
Until now the owner spaces in the object constraint properties used the
same descriptions as the target spaces, unlike bone constraints.

For instance, if you chose World Space as owner space, you'd get the
description: "The transformation of the target is evaluated relative to
the world coordinate system".

Reuse the existing descriptions from the bone constraints instead, so
now you get: "The constraint is applied relative to the world coordinate
system".

Reviewed By: sybren

Maniphest Tasks: T43295

Differential Revision: https://developer.blender.org/D16747
2022-12-22 16:53:51 +01:00
Eimear Crotty
a7ad2dea62 Fix T97394: single points are brighter than stroke in 3D viewport
Convert 3D point shader fragment color from sRGB space to framebuffer space to match 3D line shader.

Reviewed By: fclem

Maniphest Tasks: T97394

Differential Revision: https://developer.blender.org/D16831
2022-12-22 14:22:56 +01:00
Clément Foucault
7d2dbe7849 DRW: Pass: Add bind_ssbo for indexbuf
This is a simple wrapper to GPU_indexbuf_bind_as_ssbo.
Add simple recording test for and fix other test.
2022-12-22 14:19:58 +01:00
Sybren A. Stüvel
dc30c9971d Anim: clarify the "Clear Motion Paths" operators
Make the "Clear Motion Paths" operators more intuitive. Previously, the
only way to clear the motion path of the selected object/bone would be
to shift-click the "Clear ALL Motion Paths" button. Now there are two
"X" buttons, one for "selected" and one for "all".

The "Clear Selected" and "Clear All" buttons align with the
corresponding "Update Selected" and "Update All" buttons.
2022-12-22 12:46:19 +01:00
Sybren A. Stüvel
4d22a517c9 Cleanup: animation, refactor motion paths UI code
Simplify the UI code for the motion paths properties panel.

No functional changes.
2022-12-22 12:38:46 +01:00
Sybren A. Stüvel
e4e17cf1df Anim: change wording of Clear Motion Paths operator
Change the wording of `OBJECT_OT_paths_clear` and `POSE_OT_paths_clear`
tooltips, so that they mention "motion path" instead of "path cache".
2022-12-22 12:08:56 +01:00
Sybren A. Stüvel
b617ddc004 Anim: rearrange the motion paths panel
Move the "Calculation Range" property above the "Frame Range" properties,
as you have to select the former before adjusting the latter.
2022-12-22 11:10:35 +01:00
Amelie Fondevilla
0bcfe2788d Fix T103376: Grease pencil frames selected from python are not updated in the dopesheet
Differential Revision: https://developer.blender.org/D16832
2022-12-22 09:59:28 +01:00
Ray Molenkamp
cef5841e12 Cmake: Fix building with WITH_WINDOWS_BUNDLE_CRT Off
When building without WITH_WINDOWS_BUNDLE_CRT the manifest
did not contain the blender.shared dependentAssembly leading
to missing dll errors at blender startup.
2022-12-21 13:25:02 -07:00
Jeroen Bakker
b621483659 GPU: Fix incorrect attribute usage in vk_shader.
Detected when reviewing the code. Just wanted it to be in
master before holiday season starts.
2022-12-21 21:19:23 +01:00
Jeroen Bakker
f4b03031e8 GPU: Select GPU Backend from Preferences.
(MacOS) only: In the System tab of the user preferences the user has the
ability to select a GPU backend that Blender will use. After changing
the GPU backend setting, the user has to restart Blender before the
setting is used.

It was added to start collecting feedback on the Metal backend without
using the command lines.

By default Blender will select OpenGL as backend. When Metal is selected
(via `--gpu-backend metal` or via user preferences) OpenGL will be used as
fallback when the platform isn't capable of running Metal.
2022-12-21 20:54:36 +01:00
Hans Goudey
b492dc3579 Cleanup: Remove unused modifier and BMesh includes 2022-12-21 13:10:51 -06:00
Hans Goudey
fa3ca9afdb Nodes: Rewrite group creation operator
Separate the "insert nodes into group" operation into more distinct
phases. This helps to clarify what is actually happening, to avoid
redundant updates to group nodes every time a new socket is discovered,
and to make use of the topology cache to avoid the "accidentally
quadratic" alrogithms that we have slowly been removing from node
editing.

The change is motivated by the desire to use dynamic node declarations
for group nodes and group input/output nodes, where it is helpful to
avoid updating the declaration and sockets multiple times.
2022-12-21 12:26:17 -06:00
Hans Goudey
908c539219 Nodes: Add non-const access to cached group output node pointer 2022-12-21 12:26:17 -06:00
Hans Goudey
8fe1499796 Cleanup: Use const arguments for node interface socket functions 2022-12-21 12:26:17 -06:00
Hans Goudey
688086e01f Cleanup: Simplify node duplicate operator
Use the map created for copying nodes more instead of iterating over all
nodes unnecessarily a few times. Use the map empty check instead of
a separate boolean variable. Use a utility function to retrieve a
separate buffer of selected nodes in case the  nodes by id Vector
is reallocated (that part is technically a fix).
2022-12-21 12:26:17 -06:00
Hans Goudey
8bbf823716 Cleanup: Simplify arguments to deselect all nodes function
Take the node tree as an argument directly instead of retrieving it from
the editor struct. Then use the utility function in two more places.
2022-12-21 12:26:17 -06:00
Hans Goudey
d0348bcb8a Fix: Crash when grouping frame node but not its children
Most likely caused by ab4926bcffeef20cfb9225d
2022-12-21 12:26:17 -06:00
Clément Foucault
51e2ce7df5 Metal: Turn Metal backend build option ON by default
This enable building the metal backend by default on Apple hardware.
This is needed for further testing and the new backend selector D16774.

Ref T96261
2022-12-21 16:03:50 +01:00
Jason Fielder
3535670ff1 Metal: Optimize local shader memory usage.
Global scope arrays can incur suboptimal per-shader-thread memory allocations, resulting in excessive usage of limited local memory resources. These changes ensure that any arrays are limited to the closest scope in which they are required and thus will get correctly optimized by the compiler.

A number of constants have also been replaced with Macro's as these can result in better runtime performance for complex shader code.

Authored by Apple: Michael Parkin-White

Ref T96261

Reviewed By: fclem

Maniphest Tasks: T96261

Differential Revision: https://developer.blender.org/D16825
2022-12-21 14:29:00 +01:00
Jason Fielder
7ff47f7a94 Metal: Add missing MIP_SWIZZLE texture usage flags. Fix compilation warnings.
Authored by Apple: Michael Parkin-White

Ref T96261

Maniphest Tasks: T96261

Differential Revision: https://developer.blender.org/D16824
2022-12-21 14:08:08 +01:00
Jeroen Bakker
b015fc4247 Cleanup: Use single declaration of TileNumber.
We used int and int32_t.
2022-12-21 08:42:19 +01:00
Bastien Montagne
fd9a1d62f5 install_deps: Enable building OIIO tools.
These tools are needed by some unittests doing image comparison e.g.
2022-12-21 15:58:03 +09:00
Bastien Montagne
fcddb7cda7 Small refactor of some of the RNA diffing API.
Propagate `eRNAOverrideMatchResult` 'return' flags at higher level into
BKE API, instead of just returning a boolean true when new override
rules have been created.

NOTE: This is an intermediary step towards fixing T102766.

Differential Revision: https://developer.blender.org/D16761
2022-12-21 12:43:26 +09:00
Lukas Stockner
4c295276f0 Cycles: Fix Metal kernel compilation 2022-12-21 04:24:22 +01:00
Aaron Carlisle
40e5954e39 Cleanup: Use ampersand instead of "and" for labels
UI guideline is use '&' for labels, use "and" for descriptions.
2022-12-20 18:32:30 -05:00
Germano Cavalcante
fb7f12dc40 Cleanup: hide 'UNUSED' macro definition for C++
This may allow the `C4100` warning to be re-enabled in the MSVC for C++.

Differential Revision: https://developer.blender.org/D16828
2022-12-20 19:16:33 -03:00
Hans Goudey
6383ed9956 Fix: Assert failure in mirror modifier
This was harmless because the function would just return null in release
builds, which was checked. Theoretically this vertex group mapping
shouldn't depend on the object type, but the vertex group API would
have to move away from the object-level first.
2022-12-20 14:07:24 -06:00
Germano Cavalcante
cc13934442 Cleanup: convert 'MOD_mirror.c' to C++
It will be useful to use the merge verts API in C++.

Reviewed By: HooglyBoogly

Differential Revision: https://developer.blender.org/D16823
2022-12-20 15:53:10 -03:00