Caused by 40ac21e5a5 [does not remember/resore the previous ScrArea &
ARegion anymore].
Without this, the operator reporting might get confused by using the
wrong area/region, so added back
NOTE: I tried to just notify `NC_SPACE | ND_SPACE_INFO_REPORT` in
`screen_opengl_render_end` (same as in `wm_operator_finished` >
`wm_operator_register`), but to no avail...
Think this is quite good pratice to leave us with the original area/
region anyways though.
Thx @brecht for improvements (restoring in `screen_opengl_render_init`
already, also taking care of restoring in some early out cases)
Co-authored-by: Brecht Van Lommel <brecht@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/135394
For this to work, we have to take into account handles in TransVert as
well.
Behavior is the same as in legacy curves (meaning that if the control
point itself is selected, the handles are ignores).
Part of #133448 (same thing for grease pencil, which I plan to also make
part of TransVert, but better solve for Curves first, so we can share
code here).
Pull Request: https://projects.blender.org/blender/blender/pulls/134945
The compositor backdrop is still visible even after a new completely
different file is loaded. This is because compositor contexts cache
things like the backdrop, and contexts are stored on interactive
compositor renders, which are not freed until Blender is closed. To fix
this, we cleanup the interactive compositor renders that were created
upon file load.
Pull Request: https://projects.blender.org/blender/blender/pulls/135390
`OpenSubdiv_Buffer` is a wrapper that was introduced at the time
that Blender couldn't use CPP directly. It contains a pointer to
a VertBuf and callbacks to use GPU module on that buffer.
This PR replaces OpenSubdiv_Buffer with `blender::gpu::VertBuf` and
removes the wrapper.
NOTE: OpenSubdiv tests are added to blender_test executable to make the
library dependencies not to complicated.
Pull Request: https://projects.blender.org/blender/blender/pulls/135389
Add this operator to the dropdown menu to the right of the attribute list
for curves and point cloud geometries. For these geometry types the
operator can run in edit mode too, unlike meshes.
This was caused by the normals not being available (default to
`vec3(0)`) which produced `NaN`s down the line after the
unsafe normalize. Changing to `safe_normalize` fixes the issue.
- Avoid redundant computaiton of curve type index masks
- Parallelize index buffer build (always add space for a cyclic segment)
- Avoid overhead of GPU index buffer "add vert" utilities
- Add utility for consistent order of point and handle data
- Make some variable names more consistent
- Avoid mixing multiple abstraction levels in the same function
threading::parallel_for implements its own check to avoid
threading when the data length is below the grain size, and
its overhead is lower anyway, since it doesn't use a function
call for every element.
Pull Request: https://projects.blender.org/blender/blender/pulls/135316
Part of #134755 / #134766.
Previously operators to create or remove previews would only work on the
active asset/data-block. From feedback this can be quite an
inconvenience, e.g. when curating asset libraries for sharing or
production environments.
This change makes it so the following operators (all available in the
asset browser side-bar) create or remove the preview on the whole
selection:
- Generate Preview (refresh icon)
- Generate Preview from Object
- Remove Preview
Loading preview images from disk doesn't support this yet.
Pull Request: https://projects.blender.org/blender/blender/pulls/135267
Add a new function `bke::animdata::prop_is_animated()` that returns
whether an RNA path + array index is animated by anything. This covers
the assigned Action, NLA Action strips, and drivers.
This function is now used in the determination whether the visibility
of a GreasePencil layer is animated.
The easiest way to implement this with the existing F-Curve-visiting
logic was to call `adt_apply_all_fcurves_cb()`. However, that function
did not allow the callback function to signal "stop looping, I found
what was I was looking for", so I extended it to do just that. I don't
expect the extra conditions to significantly slow down the other uses,
as the branch predictor will very likely optimise for the "returning
true" case for those calls that simply visit everything.
Pull Request: https://projects.blender.org/blender/blender/pulls/135317
The issue was that during playback, the evaluated Grease Pencil ID
is not being copied again for re-evaluation. This meant that the
adjustments get re-applied over and over again.
Ideally, we would restore the drawing pointers before modifiying them
again, but this is a bit trickier to implement.
To fix this issue for now, we do the layer adjustments during object
data evaluation. Using the geometry set for modifier evaluation
means that we copy the data and apply the adjustments for every
object.
In the future this can be optimized to only happen once per
Grease Pencil ID (in `BKE_grease_pencil_eval_geometry`).
Pull Request: https://projects.blender.org/blender/blender/pulls/135387
Replace `bNodeInstanceHash` with a `Map`. Move it to the node tree
runtime data. Simplify some code by removing the tag from the hash
value and collecting unused previews directly. Then just remove a
bunch of code that's now unused.
Note that texture node previews haven't been working for a while
anyway, and the experimental shader node previews seem to use
a different system (this one is a remnant of Blender Internal).
Pull Request: https://projects.blender.org/blender/blender/pulls/135310
Code in readfile that copies over brush assets (and related data) from
the old Main to the new one cannot use the namemap reliably, due to how
the linked IDs of the library get temporarily spread between both Mains.
Since in theory there should be no need for name uniqueness processing
in this case anyway, for now disable the relevant code when the library
is re-used.
NOTE: Issue reported in #135315, revealed by recent refactor in
00f406c34c and 16e552298c.
NOTE: This fix is a bit hackish, but seems to be the simplest most
straight-forward way to address the problem. More invasive solution can
be investigated if this proves to still be problematic.
NOTE: While 4.4 also has the same invalid handling, this PR should
likely not be ported to it, as previous BKE_main_namemap code was more
permissive with such invalid behaviors, and there is no known bad
consequences in practice.
Pull Request: https://projects.blender.org/blender/blender/pulls/135362
The transform gizmo in the sequence editor does not show highlights properly for rotation, when hovering over it or while dragging it.
This patch has no further side effects on operators that use the 2d cage gizmo without rotation such as the crop gizmo and the viewer (transform) gizmo in the compositor.
Pull Request: https://projects.blender.org/blender/blender/pulls/135065