Even if/when we take visibility into account for multires calculations,
the per-grid-face visibility is stored in SubdivCCG::grid_hidden, not
the base mesh's face visibility.
d1049f6082 translated the logic from the `int8` to `float`
conversion incorrectly. Previously the data was extracted to an integer
array (multiplied by 254) first then translated to a float VBO (and
divided by 255). I think conceptually the special `1.0/255` value isn't
necessary because the "optimal display edges" area already taken into
account for the creation of the index buffer. But as a quick fix, just
fix the factor to be the same as before.
Pull Request: https://projects.blender.org/blender/blender/pulls/126290
Retrieve the relevant data directly from the original object's mesh
(or the evaluated SubdivCCG in that case) rather than using the
BVH tree's geometry points which we'd like to remove.
Pull Request: https://projects.blender.org/blender/blender/pulls/126284
No functional changes expected.
The function `BKE_action_get_item_transform_flags` was only ever used in a single place.
As such it could be a static function within the given file.
This reduction in scope will help with future refactors.
This is in service of fixing #126125 since the function in its current form
does not support layered actions.
Pull Request: https://projects.blender.org/blender/blender/pulls/126287
This avoids an issue in clang-cl on Windows ARM64 where an invalid pointer would be (re)used.
See #124182 for more details, but basically without this, when the vector of tiles inside changeset is resized, a reference to an invalid pointer (ie, the location in the old vector) is kept somewhere, which makes the test fail.
Pull Request: https://projects.blender.org/blender/blender/pulls/126083
The lazy-connect feature of node wrangler uses the built-in `connect_sockets`
function which automatically handles virtual sockets in group input and output
nodes already. However, it does not handle virtual sockets in other nodes.
The fix is to generalize this behavior. For that, a new `handle_dynamic_sockets`
boolean input is added to `tree.links.new`. When enabled, virtual sockets are
handled properly by internally calling the `bNodeType.insert_link` methods.
The new behavior is turned of by default for compatibility reasons.
Pull Request: https://projects.blender.org/blender/blender/pulls/126282
This patch adds support for CPU side buffers for the result class. A new
storage type member was added to identify the type of buffer storage,
and allocation will either allocate a GPU texture or a CPU buffer based
on the context's GPU usage.
This implements the `Apply Modifier` operator for GPv3.
Applies the modifier to the current frame. Drawings at the current frame will be updated.
If the result of the modifier creates new layers, the layers will be added and a drawing
at the current frame will be inserted.
Applying a modifier will run the following steps:
* Create a localized copy of the original Grease Pencil data and insert it into a geometry
set that owns it.
* Execute the `modifiy_geometry_set` function of the modifier with this geometry set.
* In the resulting Grease Pencil data loop over all layers:
* If the original data has a layer with the same name, overwrite its drawing data in the
current frame.
* Otherwise create a new layer in the original data and insert a resulting drawing at
the current frame.
* Remove all original layers that are not mapped to from a result layer.
* Remap the material indices for all drawings that have not been updated (e.g. the ones
that are not on the current frame).
* Copy all the layer attributes to the original Grease Pencil.
Pull Request: https://projects.blender.org/blender/blender/pulls/124543
The problem was the automatic instance deduplication. There were two
instance references before baking, both of which were referenced by instances.
When loading the bake, they were deduplicated, so there was only one geometry,
but the instances still referenced two.
The fix is to not do deduplication when loading instances from a bake.
No need to enable the GL_ARB_conservative_depth extension as it is
core in GLSL 4.20. Some drivers still complain that the
extension was explicitly enabled.
Detected on AMD 21.Q2.1 (27.20.21026.2006) legacy driver.
Pull Request: https://projects.blender.org/blender/blender/pulls/126223
The encoded material names used by cryptomatte were incorrect. Reason
was that it used the name including the object type.
NOTE: reference images needs to be updated
Pull Request: https://projects.blender.org/blender/blender/pulls/126267
When quickly running the "frame step" and "insert key"
operators it was possible to run the key insertion when the
depsgraph hasn't yet been updated.
Because the key insertion code took the frame from the scene,
but the channel values
from the depsgraph, the inserted keys were appearing to be
duplicated from a different frame.
Compared to the previous solution #124583 this moves
the code to ensure an evaluated depsgraph
into a new invoke function for the operator.
This avoids the performance issues when calling the
operator from python (#125888)
Pull Request: https://projects.blender.org/blender/blender/pulls/126123
This patch allows the result to be allocated using new textures as
opposed to using pooled texture. This is useful to allow the result
class to be used for persistent data like cached resources which can't
be pooled since it spans multiple evaluations.
Part of #118145.
- Specialize initialization of enabled states, parallelize for mesh.
- Pass integer index and position instead of `PBVHVertRef`.
- Rename some variables to more standard names.
- Precalculate vertex enabled state instead of calculating in loop.
For the times we need to obtain the bitmap of an SVG icon, send these
through the new theme coloring callback if they are multi-color. This
removes some code duplication by adding a new function that gets an
imBuf from SVG Icon. This allows, for "About" logo, Dialog icons, and
file system icons the optional ability to use a single SVG source file
that works as both monochrome (themed by text color) or multicolor with
internal parts themed.
Pull Request: https://projects.blender.org/blender/blender/pulls/126215
Having the description blank for template list items when not editable
creates undo items that show as "Unknown Action." This PR ensure it has
a description whether editable or not.
Pull Request: https://projects.blender.org/blender/blender/pulls/126184
* Adds two helper methods, the first replacing direct access to the
PBVHVertRef i value, the second replacing the previously removed
SCULPT_active_vertex_co_get
* Removes most trivial usage of active_vert_ref(), the remaining cases
are a bit more complex and need separate PRs
Pull Request: https://projects.blender.org/blender/blender/pulls/126186
Fixed two errors when exporting to USD with Instancing enabled:
Ensuring the mesh prototype prim exists before referencing it to
avoid the "Unresolved reference prim path" error messages in the
console.
Adding the Root Prim path prefix to the prototype reference path.
Pull Request: https://projects.blender.org/blender/blender/pulls/126210
The issue here is that copying the GPU viewport back to the CPU is an expensive
operation, so doing it for every frame when dragging the eyedropper is not ideal.
Instead, copy it once at the start and keep reading from it until the user
releases the eyedropper.
Pull Request: https://projects.blender.org/blender/blender/pulls/126072