Fix the `ANIMDATA_FILTER_CASES` macro, so that layered/slotted Actions
no longer take precedence over NLA control curves. Now they're handled
with the same priority as legacy Actions were.
Pull Request: https://projects.blender.org/blender/blender/pulls/136072
Don't attempt to add region draw callbacks in background mode.
This caused by the regions runtime being null.
Even if the runtime was initialized, drawing callbacks aren't needed
in background mode.
Ref !136078
This removes the old `DrawEngineType` and use the new `DrawEngine`
virtual class instead.
This removes a lot of boilerplate functions that were only there for
legacy reason.
To this end, some engines that were based on static functions have been
refactored into `Instance` classes. This was particularly cumbersome
for the Grease pencil engine which needed some more refactoring.
The `Engine` class that is in each namespace is a workaround to isolate
the internal implementation (i.e. the `Instance`) to the engine
modules. Without this, the whole engine is getting included in each
compile unit that includes the `Instance` class. Eventually, if we get
rid of these intricate dependencies, we could remove the `Engine` class.
Pull Request: https://projects.blender.org/blender/blender/pulls/136001
When a marker exists always return the nearest instead of using an
arbitrary large threshold which caused region_position_is_over_marker to
crash when a non-empty marker list returned a null nearest marker.
Ref !136060
Face Orientation Front Color has been changed to transparent for the
default theme (8bcb714b9e). This PR makes the Blender Light theme for
the face orientation front match the default theme alpha.
Pull Request: https://projects.blender.org/blender/blender/pulls/136034
DEPENDS is not supported for post_build commands and recent
cmake versions have started emitting warnings about that.
This can be safely removed, as cmake has been silently ignoring
the keyword for years.
Add 12, 8, and 6 FPS presets often used in stylized animation,
especially in 2D/Grease Pencil animation.
12 FPS to animate on 2's, 8 FPS on 3's, 6 FPS on 4's or for
early blocking stages or storyboard.
Pull Request: https://projects.blender.org/blender/blender/pulls/135712
The poll functions for: VIEW3D_OT_edit_mesh_* operators only checked
for an edit-mode object which failed with an unhandled exception for
non-mesh objects.
- Use command line arguments to configure options such as random seed,
running operators on existing blend files & how often the file is
reset to the initial state.
- Support for generating a script file to replay the actions,
useful for creating a repeatable script for bug reports.
- Add new context setup functions for edit-mode grease-pencil & hair.
Correct the event coordinates by scaling by the pixel_size on macOS.
All the UI tests now pass on macOS.
Ref !136008
Co-authored-by: Sean Kim <SeanCTKim@protonmail.com>
The inclusion of "Add -> Image -> Mesh Plane" causes the menu search
for "Add -> Mesh -> Plane" to attempt to add the image plane.
Workaround the problem by searching for an exact match,
although I think this should be possible to search for menu items
without having to include their shortcuts, especially since these
can be platform dependent.
BLF tests for font file opening, display name, metrics, variable
weight changing, width, height, advances, etc. Also tests for current
minimal word wrapping.
Pull Request: https://projects.blender.org/blender/blender/pulls/135891
Since internally `BKE_image_add_generated` uses 4 channel colors (no
matter what depth/planes is specified), just set alpha to 1 if the
option is unchecked.
Same as what 35dd09a9ef did for `IMAGE_OT_new`
Pull Request: https://projects.blender.org/blender/blender/pulls/135972
When images in the VSE use mirror and then get rotated, they rotate in
the wrong direction.
Multiply rotation by X and Y component of mirror value (-1). This is
the same approach as used by translation.
Co-authored-by: Aradgus <ramonklauck987@gmail.com>
Pull Request: https://projects.blender.org/blender/blender/pulls/136004
Add support for using BLF to draw into an ImBuf image buffer.
Once the imbuf context has been set, draw calls for that font_id will draw into the image.
This works by binding an imbuf to BLF which is then used as the target when drawing.
```
with blf.bind_imbuf(font_id, imbuf):
blf.draw_buffer(font_id, text)
```
See the example in the Python API documentation for reference.
The following BLF API's have been added to support a Python context manager.
- `BLF_buffer_state_push`.
- `BLF_buffer_state_pop`
- `BLF_buffer_state_free`
Ref !135772
This commit allows the `WITH_UI_TESTS` CMake option to be used on all
platforms, not only Linux. The existing functionality to use the Weston
compositor was moved into the `WITH_UI_TESTS_HEADLESS` option. When
these tests are run with only `WITH_UI_TESTS`, a visible instance of
Blender is opened up for testing.
Pull Request: https://projects.blender.org/blender/blender/pulls/135889
This used custom data types before, which was misleading and didn't
scale well because the set of attribute types is different than the set
of grid types we can store. Now just use the grid data type, like how
the store named attribute node uses the attribute type.
This covers backward compatibility, but not forward compatibility.
Pull Request: https://projects.blender.org/blender/blender/pulls/135814
The main reason that didn't work before because undefined custom node groups
have the undefined `bNodeType` (and thus are ignored in various places) but are
actually still groups that can be evaluated. The fix is just to handle custom
node groups a bit more explicitly.
In the future, we may want to have a separate "undefined custom group"
`bNodetype`, but that might a be a bit bigger project.
Pull Request: https://projects.blender.org/blender/blender/pulls/135974
Fix an issue with library overrides that was caused by Action
assignments getting versioned too late in the versioning process. Now
the versioning of Action assignments (which assigns the
created-by-versioning action slots) happens in the 'after linking'
stage, as well as in the 'after setup' stage. The latter is still
necessary for the conversion of pre-2.5x animation data.
It is likely that the versioning code can now be simplified, as the
tagging for "this needs upgrading" may no longer be necessary. We're now
too close to the 4.4 release to comfortably make such bigger refactors,
though, so I'd rather keep the overall code structure as-is.
Pull Request: https://projects.blender.org/blender/blender/pulls/135988
Use a cleaner approach to the WindowManager handling in the "blendfile
loading unit test" base class, to ensure it is freed properly.
The commit following this one changes the Action versioning code, which
writes to RNA properties, which in turn sends WindowManager
notifications, which in turn have to be freed properly whenever the test
exits.
Pull Request: https://projects.blender.org/blender/blender/pulls/135988
This change fixes the remaining failing tests with SSS when using HIP-RT.
This includes crash when SSS is used on curves, and objects with motion
blur and SSS rendering black.
The root cause for both cases was the fact that traversal was always
assuming regular BVH (built for triangles), while curves and motion
triangles are using custom primitives, which requires specialized BVH
traversal.
This change includes:
- Early output from `scene_intersect_local()` for non-triangle and
non-motion-triangle primitives. This fixes `sss_hair.blend` test,
and also avoids unnecessary BVH traversal when the local intersection
is requested from curve object. The same early-output could be added
to other BVH traversal implementation.
- Use `hiprtGeomCustomTraversalAnyHitCustomStack` for motion triangles
primitives. This fixes motion blur on objects with SSS render black.
Fixes#135856
Co-authored-by: Sahar A. Kashi <sahar.alipourkashi@amd.com>
Co-authored-by: Sergey Sharybin <sergey@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/135943
Looks like a logic inversion mistake.
Not clear how bad this issue is, as other code related to image metadata
seems to expect 1024 char max size too (e.g. `MAX_METADATA_STR` define
in `ed_draw.cc`. But this is potentially a very bad issue, and the fix
seems safe enough for 4.4 still.
Should also be backported to active LTSs.
Pull Request: https://projects.blender.org/blender/blender/pulls/135983
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/135994