Check existence of layer and slot before handling Channelbags.
The existing asserts dont catch this (they are skipping the "empty
layers" case) and rightfully so, think there might be usecases for
moving **empty** slots as well.
Pull Request: https://projects.blender.org/blender/blender/pulls/135963
Add 'Smoothing Groups' option for exporting polygon smoothing groups.
Generates 'bitflags' smoothgroups values, ensuring no faces from different
groups sharing a same boundary edge or vertex have the same bitflag value.
NOTE: This type of smoothgroups will run out of group values (aka bitflags) with
some specific topologies, e.g. a fan of over 31 flat faces sharing a same vertex
(like the sides of a cone). In such cases, once all available values have been used,
the remaining faces will get `0` (aka 'no group') value assigned.
Original issue https://projects.blender.org/blender/blender-addons/issues/104434
Pull Request: https://projects.blender.org/blender/blender/pulls/135646
Followup to 4499fad40e.
Although no really necessary (the added versioning would be fine to
always run), still bump the subversion to avoid confusion about the
unversioned block.
Part of #134755 / #134766.
The asset browser currently lacks a compact view that leaves names
readable. Especially when managing asset libraries (e.g. to prepare it
for sharing or set up a production library), this is quite a usability
issue. A column view like the file browser has can solve this, allowing
a quick overview and fast browsing of libraries, while keeping names
readable.
Adds a new "Horizontal List" display mode to the asset browser that
distributes assets over multiple columns, with horizontal scrolling.
Asset previews are shown in this mode, plus an asset type icon if
there's enough space. The size of previews and the columns can be
configured next to the display mode, for optimizing the display.
Pull Request: https://projects.blender.org/blender/blender/pulls/135306
Profiling on Arc B580 shown that sd->num_closure queries were often
stalling.
Packing it closer to other often accessed elements within ShaderData
(type, flag..) does speedup rendering by ~5% in most scenes.
Pull Request: https://projects.blender.org/blender/blender/pulls/135980
Having no material is not uncommon, e.g. this can happen in blender when
a Curve is coverted to Grease Pencil.
If there is no material, we can still regard that stroke as visible, and use the
default Grease Pencil material in that case.
Pull Request: https://projects.blender.org/blender/blender/pulls/135975
There was quite a bit of drop-box code in `space_view3d.cc`. Moving it
to an own file makes files more focused & coherent, and keeps file sizes
more manageable.
The main issue of 'type-less' standard C allocations is that there is no check on
allocated type possible.
This is a serious source of annoyance (and crashes) when making some
low-level structs non-trivial, as tracking down all usages of these
structs in higher-level other structs and their allocation is... really
painful.
MEM_[cm]allocN<T> templates on the other hand do check that the
given type is trivial, at build time (static assert), which makes such issue...
trivial to catch.
NOTE: New code should strive to use MEM_new (i.e. allocation and
construction) as much as possible, even for trivial PoD types.
Pull Request: https://projects.blender.org/blender/blender/pulls/135976
The main issue of 'type-less' standard C allocations is that there is no check on
allocated type possible.
This is a serious source of annoyance (and crashes) when making some
low-level structs non-trivial, as tracking down all usages of these
structs in higher-level other structs and their allocation is... really
painful.
MEM_[cm]allocN<T> templates on the other hand do check that the
given type is trivial, at build time (static assert), which makes such issue...
trivial to catch.
NOTE: New code should strive to use MEM_new (i.e. allocation and
construction) as much as possible, even for trivial PoD types.
Pull Request: https://projects.blender.org/blender/blender/pulls/135971
Implement shortcuts for viewer nodes. Viewer nodes are now activated using the operator `bpy.ops.node.activate_viewer()` instead of activating the viewer by setting the node to active.
This also unifies the behavior with viewer shortcuts in the compositor (see attachment in the original PR).
Pull Request: https://projects.blender.org/blender/blender/pulls/134555
This replaces the deprecated DrawData mechanism by the
usage of the update timestamp `last_update`.
The compositor keeps the `last_update` value of the cached ID
and compares it with the value on the ID at the time of evaluation.
Rel #134690
Pull Request: https://projects.blender.org/blender/blender/pulls/134878
If we tag positions to be changed we get a proper update (was probably
working for poly curves because the evaluated positions just reference
the original positions array when all curves are poly curves).
Pull Request: https://projects.blender.org/blender/blender/pulls/135874
This commit prevents the "Gravity" value from having an effect on
brushes that are based on either the Paint or Smear brush in addition to
the ones that are already filtered. Prior versions of blender don't
crash, but still deformed the mesh, which is unexpected & undesired.
Pull Request: https://projects.blender.org/blender/blender/pulls/135944
This commit prevents the "Gravity" value from having an effect on
brushes that are based on either the Paint or Smear brush in addition to
the ones that are already filtered. Prior versions of blender don't
crash, but still deformed the mesh, which is unexpected & undesired.
Pull Request: https://projects.blender.org/blender/blender/pulls/135944
This commit adds a file that bakes ambient occlusion to the
color attribute of a mesh, then bakes the color attribute to a texture
and saves that as the test image.
This test is being done to make sure the `bake_offset_towards_center`
function is tested as it is necessary to fix some bugs with
color attribute baking (blender/blender#95969)
Ref: blender/blender-test-data!73
Hovering over UI items will pop up a tooltip hint if you are perfectly
still. This is easy when using a mouse since it is resting on a
surface. But with a tablet pen you are holding it off the surface so
absolute stillness is difficult. This PR allow a small amount of
movement. So unsteady or slow movement will still pop up the hint.
Pull Request: https://projects.blender.org/blender/blender/pulls/135602
Toolbar items with variations open a menu on long press. But they will
also open immediately on drag. The amount of distance it considers a
drag is about two pixels. Tablet pen users generally move more than
that while selecting items so the menu almost always pops out. This PR
uses the correct drag distance per pointer type, and uses the position
of the start of the drag instead of the last reported position.
Pull Request: https://projects.blender.org/blender/blender/pulls/135677
This is primarily to solve Intellisense failures with various USD
header files and macros. However, it also unifies Windows x64 with
Windows arm64 (though MSVC is unused for arm64 currently) since it would
be required for proper `sse2neon` support anyhow.
Pull Request: https://projects.blender.org/blender/blender/pulls/135844
When using vec3[] as push constants it selected the incorrect
branch resulting in uploading incorrect data to the shader.
This resulted in not seeing the clipping bounds in vulkan.
Ref: #131111
Since the introduction of storage buffers in Blender, the calling
code has been responsible for ensuring the buffer meets allocation
requirements. All backends require the allocation size to be divisible
by 16 bytes. Until now, this was sufficient, but with GPU subdivision
changes, an external library must also adhere to these requirements.
For OpenSubdiv (OSD), some buffers are not 16-byte aligned, leading
to potential misallocation. Currently, this is mitigated by allocating
a few extra bytes, but this approach has the drawback of potentially
reading unintended bytes beyond the source buffer.
This PR adopts a similar approach to vertex buffers: the backend handles
extra byte allocation while ensuring data uploads and downloads function
correctly without requiring those additional bytes.
No changes were needed for Metal, as its allocation size is already
aligned to 256 bytes.
**Alternative solutions considered**:
- Copying the CPU buffer to a larger buffer when needed (performance impact).
- Modifying OSD buffers to allocate extra space (requires changes to an external library).
- Implementing GPU_storagebuf_update_sub.
Ref #135873
Pull Request: https://projects.blender.org/blender/blender/pulls/135716