WIP: Pass on color_attribute metadata through instancing, only for mesh #107066

Draft
Martijn Versteegh wants to merge 5 commits from Baardaap/blender:pass_active_color_to_instances into main

When changing the target branch, be careful to rebase the branch in your fork to match. See documentation.

Since color attributes don't use the CustomData active/render/clone index system
anymore the active status is no longer embedded in the CustomData itself.
In 3.4 and earlier if you use an Instance on Points node to instance mesh data
on the vertices of a base mesh and then realize the instances the first color attribute
in the resulting mesh (which can be inherited from the base mesh or the instances)
gets set as the active color attribute. This is useful because it allows rendering
pointcloud data in a fast way in solid mode (see #106563).

However with the named system this no longer works and the resulting mesh after realize
does not have an active color attribute (even though the attribute data itself is inherited just fine)

Since color attributes don't use the CustomData active/render/clone index system anymore the active status is no longer embedded in the CustomData itself. In 3.4 and earlier if you use an `Instance on Points` node to instance mesh data on the vertices of a base mesh and then realize the instances the first color attribute in the resulting mesh (which can be inherited from the base mesh or the instances) gets set as the *active* color attribute. This is useful because it allows rendering pointcloud data in a fast way in solid mode (see https://projects.blender.org/blender/blender/issues/106563). However with the named system this no longer works and the resulting mesh after realize does not have an *active* color attribute (even though the attribute data itself is inherited just fine)
Author
Member

This patch shows one approach.

It stores the active/default color attribute from the instancer mesh on the Instances level and then uses that to set the active/default in the resulting mesh. If the instancer mesh does not have an active/default color attribute it uses the first one it encounters in the list of instanced meshes.

Questions/doubts I have:

  • I used std::string, but maybe this is overkill? Could probably just be a char * referencing the base mesh? I guess the base mesh will always stay alive at least up till the 'realize instances' node?
  • I now have to include "DNA_mesh_types.h" in node_geo_instance_on_points.cc just to get at those strings. I don't really like it.

Other possibilities:

Another approach would be to just check if there are color attributes present on the resulting mesh after a realize instances just make the first one active+default. Slightly less control, but maybe easier to implement and probably more or less equivalent to what happened in 3.4.

Yet another approach would be to build a full system of priorities and collect all this metadata in the gather phase and then use the priorities to pick the best option. I'd imagine the instancer mesh to have the highest priority. Direct mesh instances a lower one and instances in instances an even lower one. That might be slightly better than what I do in this patch (just pick the first I encounter in the list of instanced meshes) at the cost of considreably more complexity.

edit:
Another approach would be to leave the strings alone completely and if a mesh has no active/default set just always use the first one as active/default. That would have the added benefit of fixing #107206

  • It might be nice to also have this active/default metadata on other objects (PointCloud? Curves?)
  • Eventually we want to get rid of the active/render/clone layer indices in CustomData I guess. Because that would make CD layers implicitly shareable between meshes with different active layers. Having these be name based is (I think) more robust than the constant jugging of indices anyway.

With these 2 possible future developments in mind it might be better to eventually store this metadata in some sort of easier to handle container then as bare char * on the object data. Maybe a key-value based system?

This patch shows one approach. It stores the active/default color attribute from the instancer mesh on the Instances level and then uses that to set the active/default in the resulting mesh. If the instancer mesh does not have an active/default color attribute it uses the first one it encounters in the list of instanced meshes. Questions/doubts I have: - I used std::string, but maybe this is overkill? Could probably just be a char * referencing the base mesh? I guess the base mesh will always stay alive at least up till the 'realize instances' node? - I now have to include "DNA_mesh_types.h" in node_geo_instance_on_points.cc just to get at those strings. I don't really like it. Other possibilities: --------------------------------- Another approach would be to just check if there are color attributes present on the resulting mesh after a realize instances just make the first one active+default. Slightly less control, but maybe easier to implement and probably more or less equivalent to what happened in 3.4. Yet another approach would be to build a full system of priorities and collect all this metadata in the gather phase and then use the priorities to pick the best option. I'd imagine the instancer mesh to have the highest priority. Direct mesh instances a lower one and instances in instances an even lower one. That might be slightly better than what I do in this patch (just pick the first I encounter in the list of instanced meshes) at the cost of considreably more complexity. edit: Another approach would be to leave the strings alone completely and if a mesh has no active/default set just always use the first one as active/default. That would have the added benefit of fixing #107206 Related thoughts ---------------------------- - It might be nice to also have this active/default metadata on other objects (PointCloud? Curves?) - Eventually we want to get rid of the active/render/clone layer indices in CustomData I guess. Because that would make CD layers implicitly shareable between meshes with different active layers. Having these be name based is (I think) more robust than the constant jugging of indices anyway. With these 2 possible future developments in mind it might be better to eventually store this metadata in some sort of easier to handle container then as bare `char *` on the object data. Maybe a key-value based system?
Martijn Versteegh requested review from Hans Goudey 2023-04-18 12:16:58 +02:00
Hans Goudey reviewed 2023-04-18 20:12:10 +02:00
@ -215,2 +217,4 @@
params,
attributes_to_propagate);
if (type == GEO_COMPONENT_TYPE_MESH) {
const Mesh *src_mesh = ((MeshComponent *)geometry_set.get_component_for_read(type))->get_for_read();
Member

geometry_set.get_mesh_for_read() is a simpler way of writing this.

`geometry_set.get_mesh_for_read()` is a simpler way of writing this.
Iliya Katushenock added this to the Nodes & Physics project 2023-05-15 12:11:48 +02:00
Iliya Katushenock added the
Interest
Geometry Nodes
Interest
Modeling
labels 2023-05-15 12:11:56 +02:00
Baardaap changed target branch from main to blender-v3.6-release 2023-05-27 00:16:47 +02:00
Martijn Versteegh added 294 commits 2023-05-29 11:28:35 +02:00
buildbot/vdev-code-daily-coordinator Build done. Details
7be3a0a727
Release cycle: Bcon1 for Blender 4.0, alpha.
buildbot/vdev-code-daily-coordinator Build done. Details
feaeb7e6ad
Revert "Release cycle: 3.6 enters beta, Bcon3."
This reverts commit 2dd0a08aff.
buildbot/vdev-code-daily-coordinator Build done. Details
df48490db2
Fix warning in USD curves exporter
Use timecode.GetValue() to fix warning about passing correct 'double' type to 'WM_reportf'

Co-authored-by: DESKTOP-ON14TH5\Sonny Campbell <sonny.campbell@unity3d.com>
Pull Request: #108008
buildbot/vdev-code-daily-coordinator Build done. Details
aa2eb422a7
Merge branch 'blender-v3.6-release'
buildbot/vdev-code-daily-coordinator Build done. Details
ac6af0be7b
Cleanup: Add enum type for drag data type definitions
Adds type safety and enables compiler features like warnings on missing
enumerator in switches.
a9193a9ad2 Refactor ID liblinking on readfile to take ID pointer.
The usage of the lib pointer was cryptic to say the least, it was
essentialy used to allow or not local IDs results in the mapping
old_id_pointer -> new_id_pointer lookup result.

Now:
- Explicitely pass a boolean to allow or not local ID as result in
  lower-level code.
- Pass the 'self ID' pointer instead of its library to the whole
  liblinking code (that was already the case in a few places).

Note that naming of the 'self id' pointer is currently very inconsistent
throughout the readfile liblink code, this will have to be cleaned up in
a separate step later. For now, `self_id` has been chosen for new code
as it matches the terminology in lib_query code.

The later change can also allow finer handling of lookup on undo, based
on how it was re-read (or not), should the need for this arise.
buildbot/vdev-code-daily-coordinator Build done. Details
086dada878
Fix/Update the 'search previous startup data' versioning logic.
`PREFERENCES_OT_copy_prev` handling of versionning was for older release
cycles type (pre-3.0), now that we are in 4.0, we can use a simpler
logic: Just look for startup data from this major release cycle (i.e.
4.x currently) and the previous one (i.e. all 3.x releases).

Fixes the 're-use previous settings' option not showing when first
starting 4.0 build.
d4217c278e Fix excessive vertical margin between items in asset view template
The UI list and asset view preview size calculations were out of sync,
so the UI list made more space than the preview actually used. Making
them match made the previews quite large though, so compensate that by
scaling the layout down.
Remove the related TODO comment, since this uses a common function for
getting the preview size now.

Before/after:
![Screenshot from 2023-05-17 17-33-19.png](/attachments/0ac713a3-12d9-41b6-ab50-85790da765a9) ![Screenshot from 2023-05-17 17-42-15.png](/attachments/0def65b5-6b16-4431-9a9e-592ed3d9675f)

Pull Request: #108017
76112f1439 Fix double highlighting of preview tiles in asset view template
The highlighting of preview tiles would be too strong in asset view
templates and grid views (only used in branches so far). This is because
two buttons are overlayed on top of each other, and both would
highlight. Ensure the overlayed preview tile button doesn't use any
highlighting.
c89354da80 UI: Properly center text under previews
The text under previews would be quite close to the preview, so that
there was more space below it than above. Center it vertically in the
available space now. Also, the horizontal padding was only applied to
the right side of the text rectangle, meaning horizontally centered text
would be too far left. Apply the padding equally, this doesn't affect
available space for the text too much.

See #108018 for before/after pictures.

Pull Request: #108018
buildbot/vdev-code-daily-coordinator Build done. Details
39a5025032
UI: Use fixed width for grid view items, don't stretch to full width
No user visible changes expected (since grid-views are only used in
branches right now).

This just makes grid view UIs feel more "stable" while scaling areas,
since things don't move around as much anymore. The tradeoff is that
there may be some empty space on the right, if there's not enough space
for a full column. This is how the file browser already behaves, and can
be mitigated by a smaller preview size.
buildbot/vdev-code-daily-coordinator Build done. Details
1b63a290c6
Core: Write mesh and movieclip with new format
Finish the transition from #95966 and fe38715600 by
writing files with the new format for meshes and some movie clip fields.
This removes overhead when saving files, and makes meshes saved in
files smaller (a file with a 1 million face grid changed from 32 to 28 MB).

3.6 can still read files saved with this format, but older versions will
crash. Older files are automatically converted by versioning code when
opened.

This also allows removing all the code that converts from the new
format to the legacy format, previously used when saving files.

Pull Request: #108015
buildbot/vdev-code-daily-coordinator Build done. Details
6805657a39
Mesh: Remove sculpt vertex colors from RNA API
Added in f7bbc7cdbb, these were never exposed in an
official release, and were eventually replaced by the attribute system.

Ref #100153
buildbot/vdev-code-daily-coordinator Build done. Details
d41021a7d4
Mesh: Remove deprecated face/vert custom data API
Remove six collection properties from Mesh that are redundant
with the attribute API which has a nicer API and more features.
- `vertex_layers_float`
- `vertex_layers_int`
- `vertex_layers_string`
- `polygon_layers_float`
- `polygon_layers_int`
- `polygon_layers_string`
buildbot/vdev-code-daily-coordinator Build done. Details
9bdfb15e98
Cleanup: Remove redundant writing of old face set type
Face sets are now always saved with the generic float type
468295cb7c Cleanup: Add a function to sample mesh point normals
This simplifies #108014 and is consistent with the existing function
for face corners, `sample_corner_normals`.
buildbot/vdev-code-daily-coordinator Build done. Details
4368b0e296
Merge branch 'blender-v3.6-release' into main
buildbot/vdev-code-daily-coordinator Build done. Details
9fbadc98cd
Merge branch 'blender-v3.6-release'
buildbot/vdev-code-daily-coordinator Build done. Details
07058765b9
Merge branch 'blender-v3.6-release'
buildbot/vdev-code-daily-coordinator Build done. Details
406cfd214a
Refactor ImBuf buffer access
The goal is to make it more explicit and centralized operation to
assign and steal buffer data, with proper ownership tracking.

The buffers and ownership flags are wrapped into their dedicated
structures now.

There should be no functional changes currently, it is a preparation
for allowing implicit sharing of the ImBuf buffers. Additionally, in
the future it is possible to more buffer-specific information (such
as color space) next to the buffer data itself. It is also possible
to clean up the allocation flags (IB_rect, ...) to give them more
clear naming and not have stored in the ImBuf->flags as they are only
needed for allocation.

The most dangerous part of this change is the change of byte buffer
data from `int*` to `uint8_t*`. In a lot of cases the byte buffer was
cast to `uchar*`, so those casts are now gone. But some code is
operating on `int*` so now there are casts in there. In practice this
should be fine, since we only support 64bit platforms, so allocations
are aligned. The real things to watch out for here is the fact that
allocation and offsetting from the byte buffer now need an explicit 4
channel multiplier.

Once everything is C++ it will be possible to simplify public
functions even further.

Pull Request: #107609
0eba8ac85a Fix #108034: Multires simple subdivide crash
Before 9f78530d80, the -1 coarse_edge_index values in the
foreach_edge calls would return false in BLI_BITMAP_TEST_BOOL,
which made them look like loose edges. BitSpan doesn't have this
problem, so the return for negative indices must be explicit.
buildbot/vdev-code-daily-coordinator Build done. Details
30a20b4def
Nodes: Remove deprecated useless width_hidden property
See 7b82d8f029
buildbot/vdev-code-daily-coordinator Build done. Details
fc06a471f1
Geometry Nodes: Only use realized geometry in mesh boolean node
Since 44e4f077a9 and related commits, geometry nodes doesn't
try to hide the difference between real geometry data and instances from
the user. Other nodes were updated to only support real geometry, but
the "Mesh Boolean" node was never updated and still implicitly gathered
all the instances. This commit removes the special instance behavior in the
boolean node and adds realize instances nodes to keep existing behavior
in most cases. Typically this doesn't make a difference in the result,
though it could in the union mode for instance inputs. Shifting more of
the work to realizing instances should generally be better for
performance, since it's much faster.
buildbot/vdev-code-daily-coordinator Build done. Details
3a839cc52b
Merge branch 'blender-v3.6-release'
buildbot/vdev-code-daily-coordinator Build done. Details
8cde7d8f8a
Cycles: Merge Anisotropic BSDF node into Glossy BSDF node
Used to be https://archive.blender.org/developer/D17123.

Internally these are already using the same code path anyways, there's no point in maintaining two distinct nodes.

The obvious approach would be to add Anisotropy controls to the Glossy BSDF node and remove the Anisotropic BSDF node. However, that would break forward compability, since older Blender versions don't know how to handle the Anisotropy input on the Glossy BSDF node.

Therefore, this commit technically removes the Glossy BSDF node, uses versioning to replace them with an Anisotropic BSDF node, and renames that node to "Glossy BSDF".

That way, when you open a new file in an older version, all the nodes show up as Anisotropic BSDF nodes and render correctly.

This is a bit ugly internally since we need to preserve the old `idname` which now no longer matches the UI name, but that's not too bad.

Also removes the "Sharp" distribution option and replaces it with GGX, sets Roughness to zero and disconnects any input to the Roughness socket.

Pull Request: #104445
buildbot/vdev-code-daily-coordinator Build done. Details
b34ece48f8
Fix #106484: Show all rotations with same precision
Increase precision of some rotational inputs so that they all show the
same precision.  And have the arrows change in full degrees.

Pull Request: #106515
buildbot/vdev-code-daily-coordinator Build done. Details
40ccc37fc6
VSE: Add go to current frame operator to view menu
buildbot/vdev-code-daily-coordinator Build done. Details
dad9e8e621
Fix #102574: Don't Show "Rename" for Volume and & System lists
For File Browser "System" and "Volumes" lists, the item names cannot be
changed by users yet the tooltip says "Double click to rename". This PR
just removes that text for these non-editable lists.

Pull Request: #106873
c7a508be50 Cleanup: pass boolean to text_drawcache_tag_update
Also remove redundant CTX_wm_space_text(C) calls.
381fae91b1 Geometry Nodes: Keep loose vert/edge tags for extrude and split edges
If there are no loose vertices or edges, it's basically free to
propagate that information to the result and save calculating
it later in case it's necessary. I observed a peformance increase
from 3.6 to 4.1 FPS when extruding a 1 million face grid.
buildbot/vdev-code-daily-coordinator Build done. Details
71d22331b1
Cleanup: Rename mesh loose edges tag function
To match the more recently added `tag_loose_verts_none`.
buildbot/vdev-code-daily-coordinator Build done. Details
ec8a4cfcb7
Merge branch 'blender-v3.6-release'
712d177aa3 Cleanup: avoid strcpy for initializing ID names
While strcpy is safe in this case, it's use requires extra scrutiny
and can cause problems if the strings are later translated.

Also move the ID code assignment into material_init_data
as the ID-code is more of an internal detail.
buildbot/vdev-code-daily-coordinator Build done. Details
3db0bde21d
Merge branch 'blender-v3.6-release'
buildbot/vdev-code-daily-coordinator Build done. Details
9af19822f0
Merge branch 'blender-v3.6-release'
buildbot/vdev-code-daily-coordinator Build done. Details
9e5e06136a
Fix motion tracking not tracking at all
A mistake in the recent ImBuf API refactor: the Libmv image accessor
was copying destination to destination (possibly using the wrong
number of channels as well).

Pull Request: #108070
buildbot/vdev-code-daily-coordinator Build done. Details
e620ae054f
Merge branch 'blender-v3.6-release'
buildbot/vdev-code-daily-coordinator Build done. Details
3a286a735f
Merge branch 'blender-v3.6-release'
buildbot/vdev-code-daily-coordinator Build done. Details
51923c09e2
Cycles: implement faster #make_orthonormals()
Pull Request: #106053
buildbot/vdev-code-daily-coordinator Build done. Details
2a56403cb0
Mesh: Move bevel weight to generic attribute
Store bevel weights in two new named float attributes:
- `bevel_weight_vert`
- `bevel_weight_edge`

These attributes are naming conventions. Blender doesn't enforce
their data type or domain at all, but some editing features and
modifiers use the hard-coded name. Eventually those tools should
become more generic, but this is a simple change to allow more
flexibility in the meantime.

The largest user-visible changes are that the attributes populate the
attribute list, and are propagated by geometry nodes. The method of
removing this data is now the attribute list as well.

This is a breaking change. Forward compatibility is not preserved, and
the vertex and edge `bevel_weight` properties are removed. Python API
users are expected to use the attribute API to get and set the values.

Fixes #106949

Pull Request: #108023
buildbot/vdev-code-daily-coordinator Build done. Details
8cc22d2809
Workaround Cycles regression test failures
The failure happens since the recent changes in the make_orthonormals.

The only difference is the underwater caustics test file, and the
difference seems to be a noise floor.

There seems to be nothing wrong with the math in the function itself:
the return values are all without quite small epsilon when comparing
Linux with M2 macOS. The thing is: the very first input is already a
bit different on different platforms. So the difference is already
somewhere else.

For now increase the threshold to avoid confusion of the rest of the
team, and to allow builds to be deployed.

Pull Request: #108080
buildbot/vdev-code-daily-coordinator Build done. Details
560e9c654b
UI: Edit Mode Options panel cleanup
AutoMerge is a property of transform operations, so it seems more
convenient to have this option bundled with transform settings.

Another thing is that the 'Live Unwrap' option has no real relation to
Transform.

Therefore, remove the 'AutoMerge' sub-panel and create two sub-panels
for the Options Panel:
- Transform
- UVs

Merge the 'AutoMerge' settings into the 'Transform' sub-panel.

Move 'Live Unwrap' to the 'UVs' sub-panel.

Pull Request: #108056
b40b59935d Metal: Force Compute shaders workgroup max thread count
This forces the max thread count to be inlined with what
blender expects. While this will make some shaders less
eficient it avoid crashes / assert on shaders that
could not compile. The performance impacts can be fixed
by tackling the individual cases.
buildbot/vdev-code-daily-coordinator Build done. Details
8bca0e1075
Cleanup: Format python after recent changes
Pull Request: #108086
buildbot/vdev-code-daily-coordinator Build done. Details
c435d2f856
Metal: Always add GPU_TEXTURE_USAGE_ATTACHMENT flag
Texture clearing is done using framebuffer clear.
To avoid adding the flag everywhere we add it as part
of the texture creation process.

This should have no performance impact.
buildbot/vdev-code-daily-coordinator Build done. Details
f17ea1f2a7
Geometry Nodes: Remove realize instances legacy behavior
The option was added f5ce243a56 when the node was
rewritten to add support for propagating instance attributes.
buildbot/vdev-code-daily-coordinator Build done. Details
552c262cee
Merge branch 'blender-v3.6-release'
buildbot/vdev-code-daily-coordinator Build done. Details
2ce365efc7
View 3D: new utility to provide navigation in operators
Implements a new API consisting of:
- `ED_view3d_navigation_init`,
- `ED_view3d_navigation_do` and
- `ED_view3d_navigation_free`,

With these functions, any operator can create their own navigation
context and navigate in the 3D View without having to use
`PASS_THROUGH`.
buildbot/vdev-code-daily-coordinator Build done. Details
33c13ae6e3
Transform: support navigation while transforming in 3D view
Implements a new option in keymap settings:
- "Navigate during Transform"

Note that with the option enabled, the keymap changes as follows:

|Modal Map (Blender):| Conflict: | Current: | New:
|---|---|---|---
| Increase Proportional Influence | VIEW3D_OT_zoom | Wheel Down | Alt Wheel Down
| Decrease Proportional Influence | VIEW3D_OT_zoom | Wheel Up | Alt Wheel Up
| Adjust Proportional Influence | VIEW3D_OT_rotate | Mouse/Trackpad Pan | Alt Mouse/Trackpad Pan
| Increase Max AutoIK Chain Length | VIEW3D_OT_zoom | Wheel Down | Alt Wheel Down
| Decrease Max AutoIK Chain Length | VIEW3D_OT_zoom | Wheel Up | Alt Wheel Up
| Automatic Constraint | VIEW3D_OT_rotate | Middle Mouse | Alt Middle Mouse
| Automatic Constraint Plane | VIEW3D_OT_move | Shift Middle Mouse | Shift Alt Middle Mouse

Design Task: #106008
Pull Request: #105764
buildbot/vdev-code-daily-coordinator Build done. Details
8783a51583
Merge branch 'blender-v3.6-release'
buildbot/vdev-code-daily-coordinator Build done. Details
8925ea1890
Merge branch 'blender-v3.6-release'
buildbot/vdev-code-daily-coordinator Build done. Details
f637b8c095
UI: Rename Copy Vertex Group to Duplicate Vertex Group
Change display name of OBJECT_OT_vertex_group_copy to "Duplicate Vertex
Group" from "Copy Vertex Group". The word "duplicate" is a better
unambiguous descriptor of this operation.

Pull Request: #107691
buildbot/vdev-code-daily-coordinator Build done. Details
43d66f6760
Cleanup: Fix copyright date in new bke header
Pull Request: #108112
buildbot/vdev-code-daily-coordinator Build done. Details
57f593b7ca
Merge branch 'blender-v3.6-release'
buildbot/vdev-code-daily-coordinator Build done. Details
f6d824bca6
BLI: move tbb part of parallel_for to implementation file
Previously, `tbb::parallel_for` was instantiated every time `threading::parallel_for`
is used. However, when actual parallelism is used, the overhead of a function
call is negilible. Therefor it is possible to move that part out of the header
without causing noticable performance regressions.

This reduces the size of the Blender binary from 308.2 to 303.5 MB, which is
a reduction of about 1.5%.
buildbot/vdev-code-daily-coordinator Build done. Details
b58cfde48a
BLI: improve IndexRange
Defining `operator-` for the iterator allows it to be used in more generic
iterator code. The `index_range` method is the same that exists on many
other containers like `Vector`.
buildbot/vdev-code-daily-coordinator Build done. Details
8c6908eba5
Merge branch 'blender-v3.6-release'
buildbot/vdev-code-daily-coordinator Build done. Details
737f582329
Merge branch 'blender-v3.6-release'
buildbot/vdev-code-daily-coordinator Build done. Details
fd887bcb15
Merge branch 'blender-v3.6-release'
92512f224d BLI: support keeping track of how much memory a linear allocator uses
This is useful when debugging how much memory a particular function
allocates from this allocator. The change also reduces the size of
`LinearAllocator`.
2b49d4eeea BLI: support transferring ownership of buffers between linear allocators
This can be useful when e.g. each thread has its own `LinearAllocator`,
but in the end they are combined into one.
7725bacd6a BLI: support aligned parallel reduce
Alignment here means that the size of the range passed into callback
is a multiple of the alignment value (which has to be a power of two).
This can help with performance when loops in the callback are are
unrolled and/or vectorized. Otherwise, it can potentially reduce
performance by splitting work into more unequally sized chunks.
For example, chunk sizes might be 4 and 8 instead of 6 and 6 when
alignment is 4.
buildbot/vdev-code-daily-coordinator Build done. Details
64c33871bd
Cleanup: add missing inline
This is necessary for correctness of the code to avoid duplicate symbols.
In practice, this wasn't necessary yet, because usually we pass lambdas
into these functions which cause every instantiation to have a different
signature.
buildbot/vdev-code-daily-coordinator Build done. Details
7f4aa0b553
Merge branch 'blender-v3.6-release'
buildbot/vdev-code-daily-coordinator Build done. Details
eb3e32b653
Fix #108136: Regression : Texture paint is broken
Mistake in the 406cfd214a which was calculating the offset wrongly.

Pull Request: #108138
buildbot/vdev-code-daily-coordinator Build done. Details
a440386654
Merge branch 'blender-v3.6-release'
buildbot/vdev-code-daily-coordinator Build done. Details
2decfe4f00
I18n: Add translation contexts to properties declared from Python
Some property labels need a context to disambiguate them from others
which have the same name.

The only way to show the proper text currently for such properties is
to override it in the UI code with a translation context, like:

```python
    layout.prop(obj, "area", text="Area",
                context=i18n_contexts.amount)
```

Python properties already store a translation context though, but this
context cannot be chosen from a Python script.

For instance, typing:

```python
bpy.types.Scene.test_area = bpy.props.BoolProperty(name="Area")
print(bpy.context.scene.bl_rna.properties['test_area'].translation_context)
```

will print `*`, the default context for Python props.

This commit allows specifying a context in this manner:

```python
from bpy.app.translations import contexts as i18n_contexts
bpy.types.Scene.test_number_area = bpy.props.BoolProperty(
    name="Area", translation_context=i18n_contexts.amount
)
print(bpy.context.scene.bl_rna.properties['test_number_area'].translation_context)
```

will now print `Amount` and can be translated differently from other
labels. In this instance, the word for a surface area measurement,
instead of a UI area.

-----

This is what translated properties look like using the existing ("Area", "") and ("Area", "Amount") messages:
![python_prop_contexts_test.png](/attachments/b0d9737e-4b31-4c91-a08e-b347db31225f)

The panel can be generated with this script:
[python_prop_contexts_test.py](/attachments/ab613cdc-8eba-46bc-8f3c-ad0a97e7a6e5)

Pull Request: #107150
0af41365e6 Cleanup: remove translation headers from node files
After 22f641e7f8, translation macros were removed and thus in many
files inclusion of the translation header is no longer needed.

Pull Request: #107986
buildbot/vdev-code-daily-coordinator Build done. Details
1ab265f535
Merge branch 'blender-v3.6-release'
buildbot/vdev-code-daily-coordinator Build done. Details
2164515fab
DrawManager: Fix Incorrect Resource Binding Hair/Curves
In the DrawManager a dummy texture was attached to the a, au, c, ac
binding points. In the shader those binding points are actual texture
buffers.

The reason for the dummy texture was to work around some OpenGL driver
bugs. In Vulkan (and expected also in Metal) it is not allowed to attach
a texture as a texel buffer. Fixing this would require copying buffers into a
buffer during binding.

This patch will remove the binding of the textures and use the vbos
instead. Also it fixes an issue where a platform does support compute
shaders, but don't support transform feedback. This is currently the
case for the Vulkan backend.

Pull Request: #108139
buildbot/vdev-code-daily-coordinator Build done. Details
e70051ae3d
Merge branch 'blender-v3.6-release'
buildbot/vdev-code-daily-coordinator Build done. Details
6cce149144
Merge branch 'blender-v3.6-release'
buildbot/vdev-code-daily-coordinator Build done. Details
7d416ece82
Cleanup: fix compiler warnings
c93bb9f323 LibOverride: Minor improvement to recent liboverride API changes.
Avoid two GHash lookups when deleting an override property by its RNA
path.
buildbot/vdev-code-daily-coordinator Build done. Details
5eab240f7f
Merge branch 'blender-v3.6-release'
buildbot/vdev-code-daily-coordinator Build done. Details
ae405639e7
Metal: Stencil texture view support
Adds stencil texture view support for Metal, allowing reading of
stencil component during texture sample/read.

Stencil view creation refactored to use additional parameter in
textureview creation function, due to deferred stencil parameter
causing double texture view creation in Metal, when this should
ideally be provided upfront.

Authored by Apple: Michael Parkin-White

Pull Request: #107971
buildbot/vdev-code-daily-coordinator Build done. Details
f85fb56a4a
Merge branch 'blender-v3.6-release'
buildbot/vdev-code-daily-coordinator Build done. Details
6609ca4593
UI: Shapekey pin tooltip change
Use correct terminology "value" vs strength
buildbot/vdev-code-daily-coordinator Build done. Details
c06e8f6549
UI: Change tooltip for edit mode display shapekey
Change terminology from Apply to Display.
Apply suggests a destructive change to
the base mesh.

Display is also used in modifiers.
buildbot/vdev-code-daily-coordinator Build done. Details
2c1338f67b
Merge branch 'blender-v3.6-release'
buildbot/vdev-code-daily-coordinator Build done. Details
c440efb23a
Fix invalid buffer size used in ED_asset_handle_get_full_library_path
Relatively harmless as the length was shorter, however all callers
used the larger size.
5659e83e04 Cleanup: remove incorrect use of the `r_` prefix, use sized argument
Rename `r_dir` to `dirpath` as this isn't a return only argument.
Also add the maximum size in the argument as a hint for the maximum size.
buildbot/vdev-code-daily-coordinator Build done. Details
63074dddb1
Merge branch 'blender-v3.6-release'
7fbac7e235 UI: set the waiting cursor from pack/unpack operators
Remove the guimode argument which used to set the cursor back in v2.4x.
buildbot/vdev-code-daily-coordinator Build done. Details
9357f7b606
PyAPI: remove deprecated blf.size() dpi argument
Scripts can be updated by scaling the font size, e.g.

blf.size(id, size, dpi) -> blf.size(id, size * (dpi / 72.0))
buildbot/vdev-code-daily-coordinator Build done. Details
ab5fc46872
PyAPI: remove deprecated Mesh.calc_normals
ac263a9bce PyAPI: remove context override argument from bpy.ops
Remove deprecated context override argument to operator execution and
poll() method in favor of context.temp_override().
buildbot/vdev-code-daily-coordinator Build done. Details
d1cc16913d
PyAPI: use faster argument parsing for internal bpy.ops call & poll
No functional changes.
472e6563b0 Cleanup: replace strncpy calls with BLI_strncpy
Prefer BLI_strncpy as it ensures the string is null terminated.
buildbot/vdev-code-daily-coordinator Build done. Details
345fc2b1f6
PyAPI: remove deprecated bpy.app.version_char
7bc34283ea PyAPI: Operator.bl_property no longer defaults to "type"
This hard-coded assumption meant that operators would behave as if
bl_property = "type" was assigned in the operator - when the variable
wasn't found.

Remove the hard coded name. Operators that depended on this now need
to assign bl_property = "type" in the operator class explicitly.

Remove this because it wasn't documented as means operator behavior
could change unexpectedly when renaming a property.
fd68f977e0 PyAPI: remove dpi from BLF doc-string
Missed from recent removal of the argument.
buildbot/vdev-code-daily-coordinator Build done. Details
9a8fd2f1dd
PyAPI: remove deprecated 2D_/3D_ prefix for built-in shader names
Names passed to gpu.shader.from_builtin()
no longer skip the 2D_/3D_ prefix.
buildbot/vdev-code-daily-coordinator Build done. Details
495e4f2d0e
PyAPI: remove deprecated 2D_/3D_ prefix (update docs)
a5677d225b Refactor Render Result to allow implicit buffer sharing
Allows to share buffer data between the render result and image buffers.

The storage of the passes and buffers in the render result have been
wrapped into utility structures, with functions to operate on them.

Currently only image buffers which are sharing buffers with the render
results are using the implicit sharing. This allows proper decoupling of
the image buffers from the lifetime of the underlying render result.

Fixes #107248: Compositor ACCESS VIOLATION when updating datablocks from handlers

Additionally, this lowers the memory usage of multi-layer EXR sequences
by avoiding having two copies of render passes in memory.

It is possible to use implicit sharing in more places, but needs
some API to ensure the render result is the only owner of data before
writing to its pixels.

Pull Request: #108045
buildbot/vdev-code-daily-coordinator Build done. Details
793446cbdc
BLI: Replace some macros with inlined functions for C++
Covers the macro ARRAY_SIZE() and STRNCPY.

The problem this change is aimed to solve it to provide cross-platform
compiler-independent safe way pf ensuring that the functions are used
correctly.

The type safety was only ensured for GCC and only for C. The C++
language and Clang compiler would not have detected issues of passing
bare pointer to neither of those macros.

Now the STRNCPY() will only accept a bounded array as the destination
argument, on any compiler.

The ARRAY_SIZE as well, but there are a bit more complications to it
in terms of transparency of the change.

In one place the ARRAY_SIZE was used on float3 type. This worked in the
old code because the type implements subscript operator, and the type
consists of 3 floats. One would argue this is somewhat hidden/implicit
behavior, which better be avoided. So an in-lined value of 3 is used now
there.

Another place is the ARRAY_SIZE used to define a bounded array of the
size which matches bounded array which is a member of a struct. While
the ARRAY_SIZE provides proper size in this case, the compiler does not
believe that the value is known at compile time and errors out with a
message that construction of variable-size arrays is not supported.

Solved by converting the field to std::array<> and adding dedicated
utility to get size of std::array at compile time. There might be a
better way of achieving the same result, or maybe the approach is
fine and just need to find a better place for such utility.

Surely, more macro from the BLI_string.h can be covered with the C++
inlined functions, but need to start somewhere.

There are also quite some changes to ensure the C linkage is not
enforced by code which includes the headers.

Pull Request: #108041
buildbot/vdev-code-daily-coordinator Build done. Details
4997748e5e
Vulkan: Select Compatible Render Surface
In previous implementation the first available render surface was
selected. For NVIDIA platform this was the correct one, but for
AMD and Intel GPUs this was incorrect. This PR goes over all the
available render surfaces and selects a compatible one.

For now when no compatible render surface is found it will still select
the first available one. With the expectation that the screen is drawn
incorrectly and users would report a bug so we can investigate.

Pull Request: #108169
07c59041ac GPU: Add `packed_int3` for SSBO/UBO struct alignment
MSL require to use packed_int3 for compatibility
with GLSL memory layout.
buildbot/vdev-code-daily-coordinator Build done. Details
e54a20b2a2
Cleanup: Remove unused collection pointer from depsgraph builder
Pull Request: #108177
94f5ea9731 Refactor instanced collection relation builder in depsgraph
Move the instancing related code to a dedicated function, leaving
the generic `build_collection()` dedicated to the building of the
collection itself.

Should be no functional changes: the code paths should effectively
still be the same. This is because non-instancing cases were passing
object as a null pointer, disabling the non-generic code path.
buildbot/vdev-code-daily-coordinator Build done. Details
61ed5b3d24
Depsgraph: Add explicit object collection hierarchy tracking
The practical problem this change addresses is ability to have base
flag dependent functionality in Cycles without re-setting the render
on selection. This problem initially arose during the Cycles light
linking project.

The original review happened there:

    #105837

Pull Request: #108182
3d895f6e7a Cleanup: Clear Space in the render log
I found the small dent on the log to be bothersome and unnecessary. Although modifying the Blender output may cause some parsing issues, they can be quickly resolved.

Before:
```
22-05 16:26:02 (debug) Fra:96 Mem:3130.54M (Peak 11196.17M) | Time:11:58.38 | Remaining:00:09.02 | Mem:2890.45M, Peak:9039.80M | Scene | ViewLayer | Finishing
22-05 16:26:34 (debug) Saved: 'd:\sheep_gpu\sheepit\208726392_0096.png'
22-05 16:26:34 (debug)  Time: 12:30.28 (Saving: 00:31.08)
```
After:
```
22-05 16:26:02 (debug) Fra:96 Mem:3130.54M (Peak 11196.17M) | Time:11:58.38 | Remaining:00:09.02 | Mem:2890.45M, Peak:9039.80M | Scene | ViewLayer | Finishing
22-05 16:26:34 (debug) Saved: 'd:\sheep_gpu\sheepit\208726392_0096.png'
22-05 16:26:34 (debug) Time: 12:30.28 (Saving: 00:31.08)
```

Pull Request: #108187
9ae2dd577a Overlay-Next: Initial implementation
This contains the basis of the new overlay engine.
Only a few overlays are ported for proof of concept of the new design.

This new design unifies the selection drawing with the overlay-next engine.
It now becomes responsible of selection in object mode.
For this we create a dedicated shader module that patches the shaders
for selection.

Note that the gizmo selection still uses the occlusion queries and edit-mode
the current selection engine (select_engine.c).

Related task #102179
Related task #102177

Co-authored-by: Clément Foucault <foucault.clem@gmail.com>
Pull Request: #107734
buildbot/vdev-code-daily-coordinator Build done. Details
683f7d3f74
Merge branch 'blender-v3.6-release'
c0e61afc05 GPU: Make ShaderInterface.debug_print const
Method didn't modified the ShaderInterface but wasn't usable when trying
to debug a const reference to the ShaderInterface. This PR just adds the
const to the method.

Pull Request: #108190
buildbot/vdev-code-daily-coordinator Build done. Details
1d9aaf7a4d
Merge branch 'blender-v3.6-release'
buildbot/vdev-code-daily-coordinator Build done. Details
5142d8c831
Merge branch 'blender-v3.6-release'
buildbot/vdev-code-daily-coordinator Build done. Details
0d13b0e50d
Depsgraph: add generic way for modifiers to check user-edited flags
This implements the design described in #108174.

Pull Request: #108181
buildbot/vdev-code-daily-coordinator Build done. Details
ec1349c62d
Merge branch 'blender-v3.6-release'
buildbot/vdev-code-daily-coordinator Build done. Details
574a9a9c8f
Merge branch 'blender-v3.6-release'
buildbot/vdev-code-daily-coordinator Build done. Details
14e6a5c44c
Cleanup: Remove #pragma once in .cc files
buildbot/vdev-code-daily-coordinator Build done. Details
abdb2bd6e9
Merge branch 'blender-v3.6-release'
buildbot/vdev-code-daily-coordinator Build done. Details
0f87bdfd8f
Merge branch 'blender-v3.6-release'
fa8351486f Cleanup: Remove template in vertex color transform operators
Replace a template with a FunctionRef, reducing Blender's
binary size by 63 KB, with a negligible performance impact.
buildbot/vdev-code-daily-coordinator Build done. Details
e704ebaba4
Cleanup: Remove unnecessary template in curve subdivide node
The Catmull Rom curve subdivision arguments use runtime-typed spans,
so the template doesn't help anyway. Makes Blender 27 KB smaller.
buildbot/vdev-code-daily-coordinator Build done. Details
37b6ba7616
Cleanup: Fix build error on Windows
48d146fb5c Fix potential buffer overflows in USD export & OpenEXR
- Don't use the source string length +1 as the size of the destination
  (USD export & IMB_exr_get_handle_name).
- Correct undersized buffer being passed into imb_exr_insert_view_name.
buildbot/vdev-code-daily-coordinator Build done. Details
f5ea30985e
Cleanup: misleading/incorrect argument to BLI_path_to_display_name
The strlen() was passed in as a size argument, in this case it
couldn't have caused an overflow because the source & destination
happened to be the same size.

Also reduce the destination buffer size as this is used for an ID name.
buildbot/vdev-code-daily-coordinator Build done. Details
44d9a5eb72
Merge branch 'blender-v3.6-release'
buildbot/vdev-code-daily-coordinator Build done. Details
a6eae61b52
Fix: Windows build error in template code
`using namespace blender` didn't make it into the lambda,
likely because of a compiler bug.
buildbot/vdev-code-daily-coordinator Build done. Details
8be8960738
Merge branch 'blender-v3.6-release'
buildbot/vdev-code-daily-coordinator Build done. Details
a4217d8a71
Merge branch 'blender-v3.6-release'
4ac66828cf Cleanup: remove use of strcat
While these uses seemed safe, strcat is error prone enough that other
functions are preferable.
buildbot/vdev-code-daily-coordinator Build done. Details
9e8cfabb8a
Merge branch 'blender-v3.6-release'
buildbot/vdev-code-daily-coordinator Build done. Details
57501d899d
Merge branch 'blender-v3.6-release'
buildbot/vdev-code-daily-coordinator Build done. Details
4d841e1b35
Mesh: Reimplement and unify topology maps
Combine the newer less efficient C++ implementations and the older
less convenient C functions. The maps now contain one large array of
indices, split into groups by a separate array of offset indices.
Though performance of creating the maps is relatively unchanged, the
new implementation uses 4 bytes less per source element than the C
maps, and 20 bytes less than the newer C++ functions (which also
had more overhead with larger N-gons). The usage syntax is simpler
than the C functions as well.

The reduced memory usage is helpful for when these maps are cached
in the near future. It will also allow sharing the offsets between
maps for different domains like vertex to corner and vertex to face.

A simple `GroupedSpan` class is introduced to make accessing the
topology maps much simpler. It combines offset indices and a separate
span, splitting it into chunks in an efficient way.

Pull Request: #107861
buildbot/vdev-code-daily-coordinator Build done. Details
60d97fb5fa
Fix man-page generation when ASAN_OPTIONS included strict_init_order
The install target would fail when ASAN_OPTIONS was set for the
environment that launched the build.

Resolve by explicitly overriding these settings.
buildbot/vdev-code-daily-coordinator Build done. Details
ba3f26fac5
Cycles: light and shadow linking
With light linking, lights can be set to affect only specific objects in the
scene. Shadow linking additionally gives control over which objects acts a
shadow blockers for a light.

Usage:
https://wiki.blender.org/wiki/Reference/Release_Notes/4.0/Cycles

Implementation:
https://wiki.blender.org/wiki/Source/Render/Cycles/LightLinking

Ref #104972
Co-authored-by: Brecht Van Lommel <brecht@blender.org>
buildbot/vdev-code-daily-coordinator Build done. Details
c9dac7e77c
BLI: Add utility to find true/false mix in boolean array
This is useful for #108014, when determining whether there
are any sharp faces and edges in a mesh.
buildbot/vdev-code-daily-coordinator Build done. Details
9acff4edab
Merge branch 'blender-v3.6-release'
2cfcb8b0b8 BLI: refactor IndexMask for better performance and memory usage
Goals of this refactor:
* Reduce memory consumption of `IndexMask`. The old `IndexMask` uses an
  `int64_t` for each index which is more than necessary in pretty much all
  practical cases currently. Using `int32_t` might still become limiting
  in the future in case we use this to index e.g. byte buffers larger than
  a few gigabytes. We also don't want to template `IndexMask`, because
  that would cause a split in the "ecosystem", or everything would have to
  be implemented twice or templated.
* Allow for more multi-threading. The old `IndexMask` contains a single
  array. This is generally good but has the problem that it is hard to fill
  from multiple-threads when the final size is not known from the beginning.
  This is commonly the case when e.g. converting an array of bool to an
  index mask. Currently, this kind of code only runs on a single thread.
* Allow for efficient set operations like join, intersect and difference.
  It should be possible to multi-thread those operations.
* It should be possible to iterate over an `IndexMask` very efficiently.
  The most important part of that is to avoid all memory access when iterating
  over continuous ranges. For some core nodes (e.g. math nodes), we generate
  optimized code for the cases of irregular index masks and simple index ranges.

To achieve these goals, a few compromises had to made:
* Slicing of the mask (at specific indices) and random element access is
  `O(log #indices)` now, but with a low constant factor. It should be possible
  to split a mask into n approximately equally sized parts in `O(n)` though,
  making the time per split `O(1)`.
* Using range-based for loops does not work well when iterating over a nested
  data structure like the new `IndexMask`. Therefor, `foreach_*` functions with
  callbacks have to be used. To avoid extra code complexity at the call site,
  the `foreach_*` methods support multi-threading out of the box.

The new data structure splits an `IndexMask` into an arbitrary number of ordered
`IndexMaskSegment`. Each segment can contain at most `2^14 = 16384` indices. The
indices within a segment are stored as `int16_t`. Each segment has an additional
`int64_t` offset which allows storing arbitrary `int64_t` indices. This approach
has the main benefits that segments can be processed/constructed individually on
multiple threads without a serial bottleneck. Also it reduces the memory
requirements significantly.

For more details see comments in `BLI_index_mask.hh`.

I did a few tests to verify that the data structure generally improves
performance and does not cause regressions:
* Our field evaluation benchmarks take about as much as before. This is to be
  expected because we already made sure that e.g. add node evaluation is
  vectorized. The important thing here is to check that changes to the way we
  iterate over the indices still allows for auto-vectorization.
* Memory usage by a mask is about 1/4 of what it was before in the average case.
  That's mainly caused by the switch from `int64_t` to `int16_t` for indices.
  In the worst case, the memory requirements can be larger when there are many
  indices that are very far away. However, when they are far away from each other,
  that indicates that there aren't many indices in total. In common cases, memory
  usage can be way lower than 1/4 of before, because sub-ranges use static memory.
* For some more specific numbers I benchmarked `IndexMask::from_bools` in
  `index_mask_from_selection` on 10.000.000 elements at various probabilities for
  `true` at every index:
  ```
  Probability      Old        New
  0              4.6 ms     0.8 ms
  0.001          5.1 ms     1.3 ms
  0.2            8.4 ms     1.8 ms
  0.5           15.3 ms     3.0 ms
  0.8           20.1 ms     3.0 ms
  0.999         25.1 ms     1.7 ms
  1             13.5 ms     1.1 ms
  ```

Pull Request: #104629
buildbot/vdev-code-daily-coordinator Build done. Details
adb87dd080
Merge branch 'blender-v3.6-release'
buildbot/vdev-code-daily-coordinator Build done. Details
41e49d7ece
Refactor: group multiple floats to `float2` or `float3`
Multiple random numbers were passed around separately, making some
argument lists unnecessarily long.
No functional changes expected.

Pull Request: #108236
buildbot/vdev-code-daily-coordinator Build done. Details
9cf77efaa0
UI: Updated Windows File Registration
Windows file associations using ProgID, needed because of the launcher.
This fixes "pin to taskbar" and Recent Documents lists, allow per-
version jump lists and an "Open with" list with multiple versions.

Pull Request: #107013
buildbot/vdev-code-daily-coordinator Build done. Details
0e8419246d
UI: Text cursor behavior for Apple Devices
MacOS-specific behavior for arrow keys, delete, and backspace. Alt/Opt
modifier to jump by word, CMD modifier to jump to beginning/end.

Pull Request: #107522
buildbot/vdev-code-daily-coordinator Build done. Details
f37f60937a
UI: Updated Windows File Registration Correction
Removal of thumbnail via regsvr32 requires /s argument to be silent
to not show any messageboxes during WIX uninstallation

Pull Request: #107013
buildbot/vdev-code-daily-coordinator Build done. Details
b567b249d4
Merge branch 'blender-v3.6-release'
2d3bb2787c Fix: Spreadsheet selection filter UI inactive in curves edit mode
Curves edit mode does select the selection filter feature.
d049e622bd Cleanup: Corrections in IndexMask comments
Also use "values" and "indices" instead of elements, since they're
more specific terms.
6bf3831b2c Fix: IndexMask slice and offset ignores offset
The mask was sliced, but the original mask was used from before the
slicing, causing an unsliced mask to be used with the new offsets.
This caused a crash in the hair styles demo file.
379a8b700b Cleanup: Simplify iteration in align euler to vector node
- Handle multithreading in caller, consistent with other multi-functions
- Simplify IndexMask iteration (avoid logarithmic lookup)
1b19f62917 Curves: Improve IndexMask usage in curves sculpt brushes
Unify the handling of masks for affected curves in a few of the sculpt
brushes. In the grow shrink brush, replace a more custom "influences
per thread" solution. In the puff brush, use a full array of weights,
and build the mask earlier. In the snake hook brush, use the selection
properly (I observed a 2-3x improvement with a small selection).
5063f7a725 Cleanup: Simplify IndexMask usage in two geometry nodes
Use the weird but at least consistent "from_groups" method in the sample
curves node, and avoid one logarithmic lookups when merging points.
4a7cfa18e2 Cleanup: Rename loose edge and loose vert variables in draw code
"ledge" and "lvert" sound very word, and "ledge" is also a word. It's
clearer to use the full word and abbeviate the obvious part, "index."
buildbot/vdev-code-daily-coordinator Build done. Details
23862ec60e
Cleanup: quiet RNA warnings from a trailing '.'
buildbot/vdev-code-daily-coordinator Build done. Details
6eebc06c36
Clenup: remove strcat use
buildbot/vdev-code-daily-coordinator Build done. Details
9182ebdfde
Cleanup: replace strcat with BLI_strncat
buildbot/vdev-code-daily-coordinator Build done. Details
21b2393eb2
Fix off by 1 error in BLI_uniquename* clipping an extra character
When the new name was clipped to make room for the number,
the string was clipped by the number size (including the null byte).

Store the length in `numlen` instead of the size (including null byte).
buildbot/vdev-code-daily-coordinator Build done. Details
0e7b81dd32
Metal: Fix MSL compilation warning
buildbot/vdev-code-daily-coordinator Build done. Details
f669f6cd8c
Fix #108243: Crash when save before close with modified image
A mistake in the recent API refactor for the buffer sharing.

Pull Request: #108259
buildbot/vdev-code-daily-coordinator Build done. Details
f5d159b2a4
Vulkan: Extract Vendor/Driver/Device Information
Extract vendor, driver and device information from the physical device
properties.

Note that driver version is implementation dependent and might fail as
it is unclear which driver is being used. An open source driver could
store the driver version in a different way than a closed source driver.
But as it is not clear which driver version is being used it might
extract the incorrect version.

To solve this issue we check if the extracted version makes sense
depending on the version schema of the driver and if they don't match we
use another approach.

Pull Request: #107872
5e2f73df30 Fix crash doing viewport animation render
A user-counter mistake caused by shallow-copy of the render result
during its duplication.

Pull Request: #108265
4758299d86 Cleanup: rename functions relating to MNEE light sample update
The original names were `...update_position()`, but no update in
position is performed in these functions, rather, the entries in
`LightSample` are updated. Also make clear that the functions are used
by MNEE.
buildbot/vdev-code-daily-coordinator Build done. Details
01595ee807
Merge branch 'blender-v3.6-release'
buildbot/vdev-code-daily-coordinator Build done. Details
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: #108261
4d2ed350bc Fix #108240: Cycles fails on macOS and AMD GPU
The recent light linking commit changed some includes order,
making compilation to fail on platforms where certain features
are disabled.

Pull Request: #108264
buildbot/vdev-code-daily-coordinator Build done. Details
1c88721442
Fix: Crash entering vertex paint mode
SculptSession now contains non-trivial types that must be initialized.
buildbot/vdev-code-daily-coordinator Build done. Details
de2c8416a0
Fix #108258: Sculpt mode crash after remesh
4d841e1b35 incorrectly removed the clearing
of mesh topology maps when the object is reevaluated.
buildbot/vdev-code-daily-coordinator Build done. Details
a50768616f
Build: fix OpenBSD error in guardedalloc
Pull Request: #108252
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: #108249
buildbot/vdev-code-daily-coordinator Build done. Details
a31875dab6
Cleanup: Fix warnings in Overlay Next
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: #108277
393da5df78 Cleanup: Remove redundant object fetch in MNEE
The intersection already has proper object assigned.

Pull Request: #108275
buildbot/vdev-code-daily-coordinator Build done. Details
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.
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: #108283
buildbot/vdev-code-daily-coordinator Build done. Details
55b20cef43
Workbench Next: Add missing texture usage flags
buildbot/vdev-code-daily-coordinator Build done. Details
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.
buildbot/vdev-code-daily-coordinator Build done. Details
c18cafe748
Merge branch 'blender-v3.6-release'
buildbot/vdev-code-daily-coordinator Build done. Details
72309be398
Mesh: Avoid position copying in corrective smooth modifier
This is a place where copying mesh position is not needed. See #103789.

Pull Request: #108291
buildbot/vdev-code-daily-coordinator Build done. Details
e98c26dece
Audaspace: porting changes from upstream.
buildbot/vdev-code-daily-coordinator Build done. Details
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: #108172
buildbot/vdev-code-daily-coordinator Build done. Details
393d4a6e14
Cleanup: duplicate words in comments
Also use doxygen-comments in files where this is already the convention.
buildbot/vdev-code-daily-coordinator Build done. Details
cd09c91f69
Cleanup: deduplicate code to create menu for flip region
Ref !108302.
buildbot/vdev-code-daily-coordinator Build done. Details
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.
adef3a4556 Animation: Remove collection hotkeys from pose mode
We have been chatting in the Animation&Rigging module meeting that the collection hotkeys (1, 2, 3 etc.) in Pose Mode are unwanted and could be replaced with something more useful.
This patch only removes the hotkeys, we can later decide what should be in their place.

Pull Request: #105120
buildbot/vdev-code-daily-coordinator Build done. Details
dfb3e0d262
Merge branch 'blender-v3.6-release'
buildbot/vdev-code-daily-coordinator Build done. Details
786c599404
Fix assert in light linking when making an asset
Simple steps to reproduce: mark the default cube as an asset.

Pull Request: #108306
c6aa0217ac Fix #108125: Cycles generates NaN in render passes with low roughness
Slightly increase threshold to avoid division by zero.
buildbot/vdev-code-daily-coordinator Build done. Details
5e971e8d7f
Fix hiding receiver disabling light/shadow linking
Turns out it is not enough to check for the receiver/blocker set,
as the object might be hidden. This should not change the light
behavior.

Pull Request: #108307
buildbot/vdev-code-daily-coordinator Build done. Details
d6db9e4193
Cycles: Store light name
Similar to objects, store the name of Blender's side light name
on the Cycles side. This allows to have readable logs where a
name and property is logged (while previously in the logs all
lights will be called lamp).

There is no user-measurable change.

Pull Request: #108310
buildbot/vdev-code-daily-coordinator Build done. Details
4ca39297ab
Fix specialized light tree building for distant lights
On a user level this fixes configuration when a spot light is
linked to an object, and a sun light is not linked to anything.
It used to be making non-linked receivers to be very noisy.

This is because the distant light did not update the node's
light linking settings when they are added to the node.

A simple demo file will be added to the tests suit as
light_link_distant_tree.blend.

Pull Request: #108311
buildbot/vdev-code-daily-coordinator Build done. Details
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.
buildbot/vdev-code-daily-coordinator Build done. Details
0f3682a88a
Merge branch 'blender-v3.6-release'
4492fe3080 Cleanup: rename gpencil rna function to legacy
Renames `RNA_def_main_gpencil` to `RNA_def_main_gpencil_legacy`.
buildbot/vdev-code-daily-coordinator Build done. Details
074abff87e
Merge branch 'blender-v3.6-release'
buildbot/vdev-code-daily-coordinator Build done. Details
cc25a37bee
Fix #108315: Illegal CUDA address with shadow-linked mesh emitters
A mistake in the intersection picking logic: if a mesh was hit at
least one intersection is to be recorded.

Pull Request: #108320
buildbot/vdev-code-daily-coordinator Build done. Details
82e8f1129c
Cleanup: Spelling in Cycles light tree
Pull Request: #108324
buildbot/vdev-code-daily-coordinator Build done. Details
9c15058d0b
Merge branch 'blender-v3.6-release'
0b0b6a687a Cleanup: Move offset size copying utility to generic header
This shows more clearly that there's nothing specific to curves here.
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.
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.
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.
buildbot/vdev-code-daily-coordinator Build done. Details
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
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: #107280
buildbot/vdev-code-daily-coordinator Build done. Details
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.
buildbot/vdev-code-daily-coordinator Build done. Details
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: #108333
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: #108179
buildbot/vdev-code-daily-coordinator Build done. Details
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 blender/blender-manual#104455 as well.

Pull Request: #108232
buildbot/vdev-code-daily-coordinator Build done. Details
d133d622c1
Merge branch 'blender-v3.6-release'
a5fe656c84 Build: add WITH_CYCLES define for creator
Recently added cycles options weren't included in the help message.

Also quiet extra token warning.
f2e83f1ad1 Cleanup: avoid multiple newlines in --help printing
A minor change that makes text a little easier to follow for developers.
ffe12465c2 Cleanup: remove comment for O_DIRECT in animation playback loading
This flag isn't used, even going back to the initial commit.
8e9c105819 Cleanup: use BLI_str_endswith
The in-line ends-with check could read before the string began, as it
happens this wouldn't have caused problem (based on the memory layout),
nevertheless, out of bounds buffer access is best avoided.
buildbot/vdev-code-daily-coordinator Build done. Details
45bd9b58b9
Merge branch 'blender-v3.6-release'
buildbot/vdev-code-daily-coordinator Build done. Details
9371349281
BLI_path: add BLI_path_is_win32_drive_only check
823685db76 Cleanup: consistent doxygen comment blocks
Also remove doxygen block for comments in a functions body.
buildbot/vdev-code-daily-coordinator Build done. Details
d9ffa2dfc4
Test: add string.StrCat test
buildbot/vdev-code-daily-coordinator Build done. Details
9ad7ad4323
Revert "Cleanup: consistenly use rnaindex -1 to mean the no or entire array"
This reverts commit 9a9209d8e0.

This commit caused an assert on factory startup,
needs further investigation.
buildbot/vdev-code-daily-coordinator Build done. Details
3a5ba15c79
PyAPI: add bpy.app.help_text() for accessing output from `--help`
Simplify help text extraction which may be used by the manual &
man-page generation.
buildbot/vdev-code-daily-coordinator Build done. Details
28b8ceea7c
ByAPI: add "all" argument to bpy.app.help_text, to show all help text
Optionally extract all help text, even for options not available
on the current platform or with the current build options.

Useful so it's possible to extract help text for the user-manual
which doesn't depend on the blender build used for extraction.
buildbot/vdev-code-daily-coordinator Build done. Details
61d99d450e
manpage: use bpy.app.help_text() for manual text extraction
Call Blender directly to generate the man-page,
instead of relying on the systems Python which called Blender twice and
processed it's output.
buildbot/vdev-code-daily-coordinator Build done. Details
8ed65fe6de
Cleanup: consistently use rnaindex -1 to mean the no or entire array
Re-apply [0] with the assert on startup resolved & doc-string updated.

[0]: 9ad7ad4323.
ba29fb9717 Fix building WITH_PYTHON=OFF
Missed when adding bpy.app.help_text()
buildbot/vdev-code-daily-coordinator Build done. Details
6e40c8d61b
Cleanup: quiet uninitialized warning for headless build
buildbot/vdev-code-daily-coordinator Build done. Details
4a0f2b576c
CMake: don't suppress stderr with manpage generation
Quiet ASAN leak reports so this isn't an issue.
buildbot/vdev-code-daily-coordinator Build done. Details
52015737c9
Fix #108316: CUDA error rendering Attic scene
The light tree dependent on the first threshold to evaluate to 1
when picking up an emitter.

Pull Request: #108323
buildbot/vdev-code-daily-coordinator Build done. Details
0a004fbad4
Metal: Improve GPU debugger support
This patch improves how debug groups are displayed
within captures. Passes are now split to align with
debug groups, such that navigation of captures is
more intuitive.

To closer represent useful information, debug groups are now
deferred to align with passes, with the addition of Macros to
control capture display options.

METAL_DEBUG_CAPTURE_MAX_NESTED_GROUPS limits debug
group nesting, and METAL_DEBUG_CAPTURE_HIDE_EMPTY allows
hiding of debug groups which do not contain any commands.

Authored by Apple: Michael Parkin-White

Pull Request: #108287
buildbot/vdev-code-daily-coordinator Build done. Details
e99a2fb61c
Merge branch 'blender-v3.6-release'
buildbot/vdev-code-daily-coordinator Build done. Details
ab73a8abba
Help text: corrections & minor changes for the user manual
- BLENDER_STARTUP_FILE was included as a literal instead of expanding
  into 'startup.blend' as intended.
- Single quote cycles device (matching image formats).
- Include all GPU back-ends from bpy.app.help_text(all=True)
- Minor changes to simplify conversion to RST.
buildbot/vdev-code-daily-coordinator Build done. Details
db43b27227
Merge branch 'blender-v3.6-release'
d958a5dd24 Refactor: split file loading into its own function
Function naming made it seem main_args_setup might need to call
main_args_setup_post, when this was in fact only needed for handing
final arguments.

Call BLI_args_parse directly and expose main_args_handle_load_file
as a public function. Move handle_load_file into a separate function
which is called by --open-last.
buildbot/vdev-code-daily-coordinator Build done. Details
1f3a0fbad8
Command line argument --open-last exists if the file isn't found
Don't create a new empty file when --open-last is used.
Author
Member

I think the conclusion from the last module meeting was that the thing this patch does for instances should be done for joining as well. I'll try to update the patch and add join handling.

I *think* the conclusion from the last module meeting was that the thing this patch does for instances should be done for joining as well. I'll try to update the patch and add join handling.
Martijn Versteegh force-pushed pass_active_color_to_instances from 0068cd0771 to f5c52ce17f 2023-06-15 10:29:05 +02:00 Compare
Author
Member

rebased onto blender-v3.6-release

rebased onto blender-v3.6-release
Martijn Versteegh force-pushed pass_active_color_to_instances from f5c52ce17f to c3a8457b42 2023-06-15 23:46:45 +02:00 Compare
Author
Member

rebased onto blender-v3.6-release again.

I had to untangle some erroneous merges with main.

rebased onto blender-v3.6-release again. I had to untangle some erroneous merges with main.
Martijn Versteegh force-pushed pass_active_color_to_instances from c3a8457b42 to 3f83adf70f 2023-07-13 00:58:15 +02:00 Compare
Martijn Versteegh changed title from WIP: Pass on color_attribute metadata through instancing, only for mesh to WIP: Pass on color_attribute metadata through instancing, only for mesh 2023-07-13 01:00:07 +02:00
Baardaap changed target branch from blender-v3.6-release to main 2023-07-13 01:00:09 +02:00
Martijn Versteegh added 1 commit 2023-07-13 01:47:16 +02:00
Member

Seems in !117249 it has been more or less decided that active wont be set from procedural geometry?

Seems in !117249 it has been more or less decided that **active** wont be set from procedural geometry?
This pull request has changes conflicting with the target branch.
  • source/blender/blenkernel/BKE_instances.hh
  • source/blender/geometry/intern/realize_instances.cc

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u pass_active_color_to_instances:Baardaap-pass_active_color_to_instances
git checkout Baardaap-pass_active_color_to_instances
Sign in to join this conversation.
No reviewers
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#107066
No description provided.