Proper fix, using `RNA_def_property_enum_bitflag_sdna` to mask the
affected bitflags when setting the value, and not overwrite unrelated
other bitflags.
Also similar fix/cleanup in DataTransfer modifier, who was also using
custom setters to handle this masking, instead of defining the
properties with `RNA_def_property_enum_bitflag_sdna`.
And added some documentation to `RNA_def_property_enum_sdna` and
`RNA_def_property_enum_bitflag_sdna`, to try to make it more explicit
what they are doing and what are their expected usecases.
Use Nodes were removed in d88d4cc8 from the UI, but marked deprecated
in Python API. Since we decided to remove `world.use_nodes` and
`material.use_nodes` for the shader editor (instead of deprecating
them), we also remove `scene.use_nodes`.
This PR only replaces the deprecated `scene.node_tree` with
`scene.compositing_node_group` where necessary. #143619 will fully
remove `node_tree`
Pull Request: https://projects.blender.org/blender/blender/pulls/143578
The node uses anisotropic sampling (which is currently not supported for the
extension mode), so extension modes are only rendered in the node if any
other interpolation method, but anisotropic is selected.
Pull Request: https://projects.blender.org/blender/blender/pulls/143367
The issue was that getting the `bAnimContext` fails in the
Action Editor if there is no action. This lead to the keylist being a
nullptr and Blender crashing.
The fix is to always create the keylist, and just keep it empty in case
the anim context cannot be created.
Also fixes: #143306
Pull Request: https://projects.blender.org/blender/blender/pulls/143524
Since [0], removing degenerate points at the beginning of the hull
would re-order points so the last were moved to the beginning.
While this isn't an error, having the resulting hull *sometimes*
re-ordering it's result based on internal error correction isn't ideal.
Document that the first point in the hull has the lowest Y value and
update tests to ensure this.
Also correct the doc-string regarding the hulls cross-product
and tests this is working as documented.
[0]: 87f9fd8fb3
There are a number of issues with the "Active Vertex" mode for the Set
Pivot operator in Sculpt Mode:
1. The menu option did not require the cursor, so moving off of the mesh
and using this option would previously pick the last value in the
`SculptSession`
2. The active vertex information was not updated when this was called,
so even if the user invoked this operator with their mouse on the
mesh via the Operator Search popup, it would not use the right
position. This also means behavior would differ depending on if a
brush tool was being used or the transform tools.
To fix these issues, the relevant flags are set for the operator as a
whole, and the internal active vert information is updated prior to
being requested for this operator.
Note that this does add an extra mouse click required for calling the
operator via the Operator Search menu, but given that it only worked in
specific situations before, this is an acceptable tradeoff. Assigning a
shortcut to this operator removes this requirement, as expected.
Pull Request: https://projects.blender.org/blender/blender/pulls/143675
When VFont objects use a custom (non-default) font and reference a
character that is not contained in that font, our intention is to show
placeholder curves that represents "not found". Instead we are
currently showing the ".notdef" glyph if there is one defined inside
the font or blank space if not. This PR fixes that by altering
BLF_character_to_curves so that it returns a boolean success instead of
character advance. This way we can properly distinguish "not found"
from the return of other empty, non-advancing characters.
Pull Request: https://projects.blender.org/blender/blender/pulls/143484
Gaussian blur effect size is expressed in pixels (not ideal, but that is
what it is). It was not taking render output scale or preview proxy
size into account, resulting in much larger blur at lower render scales.
Pull Request: https://projects.blender.org/blender/blender/pulls/143627
- Some functions that took integer arguments for proxy size enums; make
them take said enums directly.
- Add get_render_scale_factor() that calculates effective render scale,
use that in places that did manual "use either scene render scale setting
or proxy size" calculation in 5 places.
- Replace previous double with float in proxy size scale factors; all
the factors are exactly representable as floats, and all the calling
places used them as floats too.
This moves most of the code to deal with syncable nodes (such as
Combine/Separate Bundle) to the nodes module. Over time it might be possible to
decentralize it more.
This also changes the caching mechanism from storing a flag on the node to
storing a map on the node editor runtime data. This simplifies the code quite
significantly and also removes the need to store any of this data in DNA.
The node tree update code now always clears this cache because before it was
missing many cases, e.g. when creating links that would connect a Combine to a
Separate Bundle node.
Pull Request: https://projects.blender.org/blender/blender/pulls/143661
As shown in the complaint, when a panel region with category tabs is
aligned to the left we are not insetting the position of the scroll
bars like we do if aligned to the right. There are two separate
fixes needed. In ED_region_panels_draw we are just not doing this for
regions on the left. And in UI_view2d_mask_from_win when sizing a
left-algined scrollbar we just use scrollbar width as xmax, when it
should be xmin + width. This means that the scroll bar will not be seen
if the mask xmin is greater than the scrollbar width.
Pull Request: https://projects.blender.org/blender/blender/pulls/141470
Add an asset shelf to the compositor node editor.
This is part of simplifying the compositing workflow:
https://projects.blender.org/blender/blender/issues/134214.
The reasoning is:
- Assets will help users get started more easily with compositing
- Assets will help keeping users within Blender and use the compositor
instead of doing post processing in a different software.
- The asset shelf is better than the asset browser because it has a
better user interface; it's easily hidable and doesn't take much space
The asset shelf is hidden by default in this PR, since we have no
assets yet.
Previously, a similar implementation was proposed for all node editors,
see https://projects.blender.org/blender/blender/pulls/110589.
We didn't move forward with this PR for the following reasons:
- For geometry nodes, no concrete use case was known/proposed
- The PR didn't intend to actually show the asset shelf, only
implement the possibility that it can be shown in node editors
Known Issues:
- Can't hide the asset shelf if region overlap is off: #129737
Pull Request: https://projects.blender.org/blender/blender/pulls/138983
This is a continuation of #140705. It changes more menu node options to be input
sockets. It also changes the order of the input sockets in a few cases to make
the node look a bit better.
Forward and backward compatibility is preserved.
Pull Request: https://projects.blender.org/blender/blender/pulls/142220
After resizing screen data an additional redraw is needed so gizmos
are refreshed without `G_TRANSFORM_WM` being set which causes some
gizmos not to display.
This code was not meant to be changed to system ID properties, it was
explicitly looking for custom properties before resolving the RNA path.
There are tests for this functionality, but because the versioning copies
the ID properties to the system ID Properties, it worked for existing
properties but not newly created ones.
Pull Request: https://projects.blender.org/blender/blender/pulls/143574
**How to reproduce:**
1. Assign a node tree to the scene compositing node group in Python
2. Notice how the node tree has the wrong user count
Example:
```python
C.scene.compositing_node_group = \
D.node_groups.new("ntree", "CompositorNodeTree")
print(C.scene.compositing_node_group.users) # returns 0
```
Pull Request: https://projects.blender.org/blender/blender/pulls/143577
Mistake in 7276b2009a, where iterator over StructRNA properties was
changed to iterate over the new system IDProps, instead of the existing
(now 'custom data'-only) user IDProps.
System IDProps do not need to be handled in this iterator, as they are
expected to already be processed through their wrapping RNA properties.
- In various VSE related DNA structs, indicate which enums they use
as comments,
- Add enum types for the enums that were untyped,
- Move Wipe effect enums to DNA header for clarity, since they are
serialized values,
- Reduce SeqRetimingKey size from 40 bytes to 32 bytes; there
was too much unnecessary padding.
- Rename some enums SEQUENCE_ -> STRIP_ where relevant.
- Rename wipe enums DO_MEOW_WIPE -> SEQ_WIPE_MEOW
Pull Request: https://projects.blender.org/blender/blender/pulls/143565
In vertex weight proximity modifier, `proximity_geometry` shares the
same DNA variable as `proximity_flags`, which brings interference when
setting these two properties at the same time. Now separated
`proximity_geometry` access in RNA with a separated set function so it
only changes the relevant flags.
Pull Request: https://projects.blender.org/blender/blender/pulls/143405
Right-clicking on a File Browser item shows a context menu that
(usually) includes a submenu "External". The items on that work
correctly when selected from the menu, but will not work correctly if
you create a keyboard shortcut directly to the item. This PR removes
the use of a filepath property on these, instead having each operate
on the currently-selected File Browser item.
Pull Request: https://projects.blender.org/blender/blender/pulls/134819