Introduces a strategy pattern for the implementation of the various
armature drawing modes. Instead of having to `switch (arm->drawtype)`
(or `if`/`else if`/`else` chains) everywhere, one function is used to
select the appropriate `ArmatureBoneDrawStrategy` subclass.
In the future this class could be expanded even further. Currently there
are still places where there are explict checks for the draw type,
making it cumbersome to add new types. For now I feel it's already a
good enough move forward; future extensions can be done in later PRs.
No functional changes.
Pull Request: https://projects.blender.org/blender/blender/pulls/106232
Even if a text datablock was "used" by in the Text Editor, it would be
lost after save/reload if no fake user is set.
This is not in line with other datablocks if they are used by an editor
(e.g. images, clips, masks etc.).
Now handle this with `IDWALK_CB_USER_ONE` (instead of `IDWALK_CB_NOP`)
in `id_refcount_recompute_callback` >
`BKE_screen_foreach_id_screen_area` which re-ensures a user is set.
(Bit on shaky ground here, but this seems like this is how this is
handled for other editors "consuming" a datablock).
Pull Request: https://projects.blender.org/blender/blender/pulls/110344
This was an oversight on the license headers copyright pass [1].
Also since the manual reference is generated by this script
we can update the copyright year every time.
[1] - 8f109712ee
Change the `makesdna` error message from:
```
Align struct error: Bone color
```
to:
```
Align struct error: Bone::color (starts at 180 on the native platform; 180 % 8 = 4 bytes)
```
This has a few advantages:
- The colon notation (`Bone::color`) makes it easier to recognise that this is about a specific struct field.
- It makes it clear that this is about the start/offset of the inner struct.
- It includes the math the check is actually doing, providing concrete information on how to change the code to fix the issue.
Pull Request: https://projects.blender.org/blender/blender/pulls/110291
While these warnings point to real errors in the code,
PyMethodDef are an exception where functions with different numbers
of arguments are all cast to the same function type.
Clipping should use `clipr`instead of `curr`.
`clipr` is for value clipping while `curr` is for curve view clipping,
misuse of these two can lead to output value being clipped by
viewing range. Now fixed.
Pull Request: https://projects.blender.org/blender/blender/pulls/106164
Support `--verbose compile,edit_actions` (one or both can be selected),
to output the compiler output of each edit and the text (before/after).
This replaces existing hard-coded values.
Other minor changes:
- Print the file-path for each edit for better context.
- Print skipped edits when multiple edits are passed in so other
edits might be applied separately are listed.
This replaces the trilinear interpolation with manually
placed samples to avoid most light leak.
Add two new parameters to bias the sampling position:
- Normal bias
- View bias
Move the irradiance smoothing parameter per grid.
Pull Request: https://projects.blender.org/blender/blender/pulls/110312
request from Thomas, to update the licensing document he needs
a list of all dependencies their versions and their homepage.
for all deps hosted on github the script will do its best to
figure out the landing page, for all others DEPNAME_HOMEPAGE
will have to be set in versions.cmake
To ensure this information is always supplied, the script will
error out with a fatal error informing whoever is working on
the builder to supply this information.
Pull Request: https://projects.blender.org/blender/blender/pulls/109013
Implementation of the hard eraser for grease pencil.
The tool "cuts" the strokes, meaning it removes points that are inside the eraser's radius, while adding points at intersections between the eraser and the strokes.
Note that this does not implement the "Stroke" and "Dissolve" mode of the eraser yet.
Pull Request: https://projects.blender.org/blender/blender/pulls/110063