Age | Commit message (Collapse) | Author |
|
|
|
Previously, the code would incorrectly free the passed in custom data
layer even when `CD_ASSIGN` was not used. Now the function actually
supports assigning the data to the layer. This only fixes the case for
custom data layer types that only support a single layer like `CD_MEDGE`.
Informally reviewed by Hans Goudey.
|
|
|
|
Change the behaviour of circle select on FCurves:
- Before any key is touched, the behaviour is as it was (key included in
circle-select area → select it; otherwise → select entire curve)
- If any key has been touched, an internal option
(`use_curve_selection`) is flipped and selecting the entire curve is
disallowed.
This ensures that once a key changes selection state, it's no longer
possible to select the entire curve. This allows dragging over keys and
subsequently drag over a keyless part of the curve.
Reviewed By: RiggingDojo, troopy28
Maniphest Tasks: T101894
Differential Revision: https://developer.blender.org/D16307
|
|
This patch introduces a new `CacheMutex` which makes it easy to implement
lazily computed caches in e.g. `Curves`. For more details see `BLI_cache_mutex.hh`.
Differential Revision: https://developer.blender.org/D16419
|
|
|
|
When changing the texture paint slot index or activating a Texture Node, the texture displayed in the Image Editor changes accordingly.
This patch syncs the Image Editor when a new texture paint slot was added, which currently is not the case.
Also deduplicates some code.
|
|
|
|
Rotation and scale was done around the wrong center (always around mouse
position) in paint_draw_tex_overlay [on the other hand,
paint_draw_cursor_overlay already got the center right].
Now make the center dependent on UnifiedPaintSettings "draw_anchored".
Maniphest Tasks: T102312
Differential Revision: https://developer.blender.org/D16418
|
|
The distinction existed for legacy reasons, to easily port of Embree
intersection code without affecting the main vector types. However we are now
using SIMD for these types as well, so no good reason to keep the distinction.
Also more consistently pass these vector types by value in inline functions.
Previously it was partially changed for functions used by Metal to avoid having
to add address space qualifiers, simple to do it everywhere.
Also removes function declarations for vector math headers, serves no real
purpose.
Differential Revision: https://developer.blender.org/D16146
|
|
|
|
The color-band needs to do some special, rather awkward updating of the
UI state when certain values are changed. As @lichtwerk noted in the
report, this was done to the wrong buttons. Now lookup the proper
buttons, and don't assume that `uiItemR()` only adds a single button
(which often isn't the case).
|
|
|
|
The new Xcode 14.1 brings the new Apple Clang compiler which
considers sprintf unsafe and geenrates deprecation warnings
suggesting to sue snprintf instead. This only happens for C++
code by default, and C code can still use sprintf without any
warning.
This changes does the following:
- Whenever is trivial replace sprintf() with BLI_snprintf.
- For all other cases use the newly introduced BLI_sprintf
which is a wrapper around sprintf() but without warning.
There is a discouragement note in the BLI_sprintf comment to
suggest use of BLI_snprintf when the size is known.
Differential Revision: https://developer.blender.org/D16410
|
|
Differential Revision: https://developer.blender.org/D16305
|
|
|
|
Upon closer inspection, looks like `UI_BLOCK_NUMSELECT` was previously
set for all code paths and 99e5024e97f1 removed it from one.
|
|
|
|
|
|
|
|
Avoid accessing freed memory from dynamically allocated EnumPropertyItem
arrays. Rely on the memory being held by the iterator which isn't the
case when it was converted to a tuple.
|
|
|
|
|
|
|
|
Function casts hid casting between potentially incompatible type
signatures (using int instead of Py_ssize_t). As it happens this seems
not to have caused any bugs on supported platforms so this change is
mainly for correctness and to avoid problems in the future.
|
|
Some BPy_StructRNA methods used BPy_PropertyRNA in their function
signatures, while this didn't case any bugs, it could lead to issues
in the future.
|
|
Missed these changes in [0].
Also replace designated initializers in some C code, as it's not used
often and would need to be removed when converting to C++.
[0] e555ede626dade2c9b6449ec7dcdda22b2585fd4
|
|
Seems like the new audio channel api was not as backwards compatible as we thought.
Therefore we need to reintroduce the usage of the old api to make older ffmpeg version be able to compile Blender.
This change is only intended to stick around for two releases or so. After that we hope that most Linux distros ship
ffmpeg >=5.0 so we can switch to it.
Reviewed By: Sergey
Differential Revision: http://developer.blender.org/D16408
|
|
|
|
|
|
|
|
Make sure non-camera data is not casted to a Camera pointer.
Solution suggested by Damien Picard (@pioverfour).
|
|
Differential Revision: https://developer.blender.org/D16304
|
|
|
|
|
|
|
|
|
|
As instances are often generated geometries, we cannot rely on the data
provided by `DupliObject::ob`.
Use `DupliObject::ob_data` when possible.
This required a major refactor in the code as the output variables are
now gathered in context and easier to access.
|
|
`nearest_world_tree_co` allows null parameter, so the `index` variable
isn't really needed and doesn't even need to be initialized.
|
|
All cache needed is already stored in `Mesh.runtime`.
|
|
Use struct identifiers in comments before the value.
This has some advantages:
- The struct identifiers didn't mix well with other code-comments,
where other comments were wrapped onto the next line.
- Minor changes could re-align all other comments in the struct.
- PyVarObject_HEAD_INIT & tp_name are no longer placed on the same line.
Remove overly verbose comments copied from PyTypeObject (Python v2.x),
these aren't especially helpful and get outdated.
Also corrected some outdated names:
- PyTypeObject.tp_print -> tp_vectorcall_offset
- PyTypeObject.tp_reserved -> tp_as_async
|
|
|
|
Missed in rBff4f14b21a42.
|
|
|
|
As instances are often generated geometries, we cannot rely on the data
provided by `DupliObject::ob`.
Use `DupliObject::ob_data` when possible.
This required a major refactor in the code as the output variables are
now gathered in context and easier to access.
|
|
`nearest_world_tree_co` allows null parameter, so the `index` variable
isn't really needed and doesn't even need to be initialized.
|
|
All cache needed is already stored in `Mesh.runtime`.
|
|
This is not the case though, the modifier act explicitly on mesh edges,
if no tesselated mesh is provided, it would simpy early out and do
nothing.
Now always disable the "Apply on Spline" option with a tip that this
modifier can only smooth the tesselated curve (not the underlying curve
control points). Similar to rB1a6b51e17502.
Fixes T102060.
Maniphest Tasks: T102060
Differential Revision: https://developer.blender.org/D16386
|
|
The operator was acting on non selected items (wasnt checking SpaceFile
bookmarknr for being -1) which could end up removing items even.
Now sanatize this by introducing proper poll (which returns false if
nothing is selected).
Fixes T102014.
Maniphest Tasks: T102014
Differential Revision: https://developer.blender.org/D16385
|
|
|