- By default on Linux the directory would be "/usr/share/" with
"fonts" as the filename, now fonts is always treated as a directory.
- Correct the path for linked library fonts using a relative path.
In order to better identify which is the normal of the point
(see #108711), it is interesting to identify which is the closest bone.
So, instead of testing the snap at each point and then each bone line,
test the bone lines first and after identifying the closest one, test
its points.
With the nearest bone identified, we can use its normal instead.
`sctx` can be accessed internally.
And `clip_planes_enable` makes it clearer what this method does.
Also note that this function had been accidentally removed for Cameras.
This wasn't covered by my other tests because in usually the geometry output
that anonymous attributes are propagated to is the first output, thus the index
was 0. In this case it didn't make it difference whether the `.index_range()` call
was there are not.
This reverts commit ef9d9c6856. Actually probably better to leave
this in, since it may be used by normal computation even if seemed to
work ok in tests.
The root of the bug was wrong edges, but it wasn't necessary to compute
corner edges at all and this was unnecessarily added in 16fbadde36.
Ref #109161
The old subsurf DerivedMesh code creates an edge layer
without initializing it, which makes the proper lazy initialization
of the edge layer later think that it's already finished. To avoid that,
remove the edges when creating the DerivedMesh at first.
Similar to 85bd64ece4
This was due to a wrong mapping of tools in the toolbar.
The fix makes sure that the correct selection tools are used for the
old grease pencil objects.
In order to accomplish this properly, the new grease pencil objects
use their own edit mode context.
This way the two objects are cleanly seperated.
The node title was translated in two steps: first using the
BLT_I18NCONTEXT_ID_NODETREE context, and if that failed, using the
default context.
As far as I could find, the only node using this intentionally is the
Frame node, but its title is only displayed in the Add Menu.
However, at least one node has a bad translation because its name was
extracted independently with the NodeTree context: the compositing
Scale node uses a translation which is only appropriate in a vector
math context.
This commit removes the double translation step. If needed by
translators, a translation context in the node RNA could be introduced
at a later time.
Pull Request: https://projects.blender.org/blender/blender/pulls/108241
The Select Similar UV operator defined multiple enum item arrays, and
returned one depending on current mode in the enum function
uv_select_similar_type_itemf().
The operator prop's enum items used only the vertex items, which
resulted in several items never being extracted because they were
dynamically generated instead of exposed to the RNA.
This commit groups all items in a single array so that they are
exposed, but uses the enum function to filter them.
Issue reported by Satoshi Yamasaki (@SatoshiYamasaki) in #43295.
Pull Request: https://projects.blender.org/blender/blender/pulls/108994
By removing the extra complete check/remapping of ID pointers in undo
case, ebb5643e59 merely revealed how broken the 'undo_preserve' code of
Scene was.
It cumulated a flock of issues, all more or less related to ID pointers:
* 'source of truth' should be the _old_ data (toolsettings), not the new
one, since this is the one kept at the end of the process;
* In some cases, some paint data may exist in one, but not the other
of the two 'old' and 'new' toolsettings data.
* Since this data is preserved to its latest version accross undos, its
ID pointers can become completely unrelated to these read from the
undo memfile, _even when the Scene itself is detected as unchanged_!
This implies that:
+ undo_preserve code has to be called even when there is no liblinking
(when the ID is detected as unchanged and re-used 'as-is').
+ Using existing ID addresses to find/validate an ID pointer in
undo_preserve process is like playing Russian roulette - invalid
memory access and crash is guaranteed at some point or another.
Use `session_uuid` value instead to ensure a valid ID pointer is set
(or null in case none can be found).
NOTE: while these issues also exist in previous releases (including both
latest LTSs), they were hidden by the code later in `setup_app_data`,
preventing any crash to happen. So backporting this fix would be far too
risky for a very minimal benefit imho.
Needed to simplify upcomming fix in Scene undo_preserve code.
NOTE: also renamed 'private' macro parameter names to follow C++ classes
convention (one trailing `_`, instead of one or two leading `_` - the
two `__` leading ones are triggering complains from IDE regarding reserved
identifier names when the relevant macros are used in C++ files).
No expected behavior changes with this commit.
This affected only vector and color inputs. The issue was that those were
expected to be stored as float-array properties. However, when setting them
from python using `modifier["Input_X"] = [1, 2, 3]` the array type becomes
either `int` or `double`, but not `float`. A workaround was to use
`modifier["Input_X"][:] = [1, 2, 3]` as this changes the property inplace.
Now `int` and `double` arrays are also understood by the modifier.
Pull Request: https://projects.blender.org/blender/blender/pulls/109203
This suffix is only preferred when the non-const version does more
work than the const version of a method (e.g. because it may duplicate
data because of implicit sharing).
The definition of `test_projected_vert_dist` has been moved to
`Nearest2dUserData::snap_point`, and the parameters accessed within the
object have been removed from the function.
Additionally, the definition of `test_projected_edge_dist` has been
moved to `Nearest2dUserData::snap_edge`, and the parameters accessed
within the object have been removed from the function.
This commit deduplicates the code for:
- Creating local projection matrix;
- Creating local clip planes;
- Testing BoundBox snap distance.
These common codes are repeated for each type of object
(Empty, Camera, Armature, Curve, Mesh, Editmesh...).
Now they have been unified in the creation of `Nearest2dUserData`.
This patch adds support for node previews in the realtime compositor.
Only node operations have previews for now. Shader nodes likes the
MixRGB node does not have previews implemented yet due to required
sizable changes in the node compiler.
Depends on: #108900.
Pull Request: https://projects.blender.org/blender/blender/pulls/108904
This patch adds support for bNodeInstanceKey to DerivedNodeTree. The
keys are computed and cached in the DContext at construction time, and
various utilities are added to return the instance keys of contexts,
nodes, as well as find the active context in the tree.
Pull Request: https://projects.blender.org/blender/blender/pulls/108900