Commit Graph

138311 Commits

Author SHA1 Message Date
Jacques Lucke
dda4a50bf5 Geometry Nodes: add utility to access logged primitive values 2024-06-28 12:46:08 +02:00
Jacques Lucke
d367b6e4a2 Nodes: add non-const owner_tree access 2024-06-28 12:44:44 +02:00
Jacques Lucke
d819bed88f Merge branch 'blender-v4.2-release' 2024-06-28 12:27:20 +02:00
Jacques Lucke
d6bf027f38 Fix: properly handle negative scale in safe conversion to loc/rot/scale 2024-06-28 12:20:46 +02:00
Jacques Lucke
7866fcd869 Fix: convert math::Axis to vector 2024-06-28 12:16:56 +02:00
Julian Eisel
b59e009acc UI: Add function to query debug name of view items
No user visible change expected.

There's no good way to identify items from their base class which is
annoying for development/debugging. I ended up adding a helper like this
a few times, so makes sense to just add this to the API.
2024-06-28 12:14:38 +02:00
Dalai Felinto
42e66f2912 Merge remote-tracking branch 'origin/blender-v4.2-release' 2024-06-28 11:50:02 +02:00
Dalai Felinto
b528aca711 Merge remote-tracking branch 'origin/blender-v4.2-release' 2024-06-28 11:46:45 +02:00
Sybren A. Stüvel
4bff6ba655 Remove Rigify from extensions_map_from_legacy_addons.py
Rigify is now a core add-on, and no longer an extension.

Ref: !123833
2024-06-28 11:42:48 +02:00
Sybren A. Stüvel
246b317bd4 Add-on: Rigify, move meta-rigs into a 'Rigify Meta-Rigs' sub-menu
Instead of having the Rigify meta-rigs directly in the 'Add → Armature`
menu, move them into 'Add → Armature → Rigify Meta-Rigs`.

This also removes the " (Meta-Rig)" suffix from every individual
meta-rig menu item.

This serves multiple purposes:

- It's now clear that these meta-rigs come from Rigify.
- The built-in 'Single Bone' armature now has similar visual weight as
  the 'Rigify Meta-Rigs' menu item.
- Opens up the menu in a fairer way to other add-ons, to add their own
  entries in a similar way.

Pull Request: https://projects.blender.org/blender/blender/pulls/123833
2024-06-28 11:38:31 +02:00
Sybren A. Stüvel
d1e7346c63 Add-ons: Rigify, reformat code
Run `make format` to reformat the Rigify code. It now adheres to the
global Blender code style standard, rather than having its own style.

Most of the changes are simply adding spaces around operators, newlines
below docstrings, and changing some indentation.

Note that this does not reformat any stored-as-multiline-strings code
blocks.

No functional changes.

Pull Request: https://projects.blender.org/blender/blender/pulls/123833
2024-06-28 11:38:31 +02:00
Sybren A. Stüvel
09e431c511 Rigify: mark as support=OFFICIAL
Now that Rigify is part of the core add-ons, it should be marked as
officially supported.

Pull Request: https://projects.blender.org/blender/blender/pulls/123833
2024-06-28 11:38:31 +02:00
Nathan Vegdahl
3ad753e9f4 Fix: make foot roll rigs work again in Blender 4.2 and later (#4)
The fix is to set local-space Limit Rotation constraints to use the
legacy behavior from pre-4.2.  The legacy behavior isn't meaningful/
useful for other spaces, so we leave those constraints alone.

This is one part of a two-part fix for blender/blender#123105.  The other part
is blender/blender#123361, which adds the Legacy Behavior option to the Limit
Rotation constraint.

Reviewed-on: https://projects.blender.org/extensions/rigify/pulls/4
Reviewed-by: Sybren A. Stüvel <sybren@blender.org>
2024-06-28 11:38:31 +02:00
Demeter Dzadik
8d4cc5d998 Remove CloudRig as a promoted feature set (#1)
CloudRig is no longer a Rigify feature set. I re-wrote it as a standalone add-on.

Reviewed-on: https://projects.blender.org/extensions/rigify/pulls/1
Reviewed-by: Alexander Gavrilov <angavrilov@noreply.localhost>
2024-06-28 11:38:31 +02:00
Alexander Gavrilov
f5ac944658 Fix: Rigify Apply Toggle Pole to Keyframes clears out IK keyframes
Fix bug where the "Apply Toggle Pole to Keyframes" operator would erase
keyframes.

This was caused by f61d27b735622b940521024554aadcfc52ea76cf. The
solution was offered by Alexander Gavrilov in
https://projects.blender.org/blender/blender-addons/issues/105301#issuecomment-1187067

Fixes blender/blender-addons#105301
2024-06-28 11:38:31 +02:00
Sybren A. Stüvel
541e3aae25 Add-ons: Move Rigify into addons_core
Move Rigify from the external add-ons repository into
`scripts/addons_core`.

This commit adds Rigify, from the latest revision in [the add-ons
repo][addons]. It contains work by the following authors:

  202 Alexander Gavrilov
   67 Campbell Barton
   58 Nathan Vegdahl
   31 Lucio Rossi
   24 Demeter Dzadik
   10 Brecht Van Lommel
    8 Dalai Felinto
    7 Bastien Montagne
    7 Sybren A. Stüvel
    5 Damien Picard
    4 meta-androcto
    3 Ines Almeida
    2 Jonathan Smith
    2 ZanQdo
    1 Aaron Carlisle
    1 Andrej730
    1 Hans Goudey
    1 Luca Bonavita
    1 Patrick Huang
    1 Sergey Sharybin
    1 Thomas Dinges

For the full history see the read-only [add-ons repository][addons].

Rigify has existed briefly as an extension on the extensions platform,
and commits were made to Rigify's extension repository (which is
different from the above-mentioned add-ons repository). That repository
will be deleted soon. Its commits that actually changed Rigify will be
committed as followups to this commit. Some commits were necessary to
turn the add-on into an extension; those will be ignored, as they're no
longer relevant.

[addons]: https://projects.blender.org/blender/blender-addons/src/rigify

Ref: !121825

Pull Request: https://projects.blender.org/blender/blender/pulls/123833
2024-06-28 11:38:31 +02:00
Falk David
270c4fad48 Fix #123876: Crash using eyedropper tool
Caused by 6967255906.
The code was assuming that `UI_context_active_but_prop_get`
would return a valid button.
This simply checks if the returned value is not `nullptr`.

Pull Request: https://projects.blender.org/blender/blender/pulls/123879
2024-06-28 11:33:58 +02:00
Dalai Felinto
51e68fe0ed Cleanup: make format 2024-06-28 11:31:54 +02:00
Dalai Felinto
84f11da63a UI: Extensions: Fix spacing between Install and Menu
This was originally introduced on c6e452d865.

A subsequent Cleanup commit (c3d18854f3) changed this further,
increasing the gap a few extra pixels.

Since no functional/visual change should ever come with a cleanup commit
I'm treating this small regression as a bug, fixed by this commit.

There was something right about c3d18854f3, and one of the align=True
is indeed not needed.
2024-06-28 11:29:49 +02:00
Nathan Vegdahl
c83727f0bd Anim: add functions for asserting Project Baklava phase-1 invariants
This is implemented as an overloaded function,
`assert_baklava_phase_1_invariants()`, with variants for `Action`, `Layer`, and
`Strip`.

The invariants asserted are those that are specific to phase 1 and which will
later be lifted as more features (such as animation layers, additional strip
types, etc.) are added. The intention is for this to serve as a kind of todo
marker for later phases *and* to help ensure that the phase-1 invariants
currently hold at runtime.

In addition to adding the overloaded function itself, this commit also uses it
in a couple of places in the keyframing code.  Upcoming work on the keyframing
code will be using it more.

This is based on a discussion with @dr.sybren.

Pull Request: https://projects.blender.org/blender/blender/pulls/123830
2024-06-28 11:06:34 +02:00
Damien Picard
92c026c39b I18n: Fix multi-context message extraction regex
The BLT_I18N_MSGID_MULTI_CTXT() macro allows extracting a single
message into up to 16 different contexts. The regex to do that was
slightly wrong because it did not account for the macro potentially
ending with a ",".

The contexts for "New" were also sorted.

Pull Request: https://projects.blender.org/blender/blender/pulls/123793
2024-06-28 10:42:47 +02:00
Nathan Vegdahl
cae1faec12 Refactor: bundle fcurve lookup/creation parameters in a struct
This is a follow up to #123022 to clean up the resultant verbose parameter
passing.  We add a new struct `FCurveDescriptor` that contains the parameters
needed for either looking up or creating an fcurve, and that in turn is passed
down the keyframing call chains where fcurve lookup/creation needs to be done.

Pull Request: https://projects.blender.org/blender/blender/pulls/123486
2024-06-28 09:39:51 +02:00
Harley Acheson
bea0c5c914 UI: Small Modifications to Some Icons
Slight editing changes to 11 icons. Mostly alignment and position fixes

Pull Request: https://projects.blender.org/blender/blender/pulls/123874
2024-06-28 07:42:17 +02:00
Campbell Barton
ac8da6c72e Extensions: move junction_module to a private location
bpy_extras is part of the public API where as the junction_module
is part of the internal implementation of extensions.
Move to "_bpy_internal".
2024-06-28 14:30:11 +10:00
Sean Kim
549d6fb573 Cleanup: Sculpt: Add assert on span size for helper method
Pull Request: https://projects.blender.org/blender/blender/pulls/123872
2024-06-28 06:25:47 +02:00
Campbell Barton
d0a3d629b9 Merge branch 'blender-v4.2-release' 2024-06-28 14:21:22 +10:00
Campbell Barton
80f07e3f26 Cleanup: simplify the tags drawing function
Tags share logic between extensions & add-ons, simplify the method
used for both kinds of panels to share a draw function.
2024-06-28 14:18:52 +10:00
Campbell Barton
dbe3956c76 Merge branch 'blender-v4.2-release' 2024-06-28 14:10:47 +10:00
Campbell Barton
1043b273d5 Extensions: hide the extensions add-on unless debugging extensions 2024-06-28 14:08:56 +10:00
Campbell Barton
2fd7db0633 Extensions: hide the extensions add-on unless debugging extensions 2024-06-28 14:05:52 +10:00
Campbell Barton
60a5ef492c Merge branch 'blender-v4.2-release' 2024-06-28 13:42:43 +10:00
Campbell Barton
37ae9d5fc4 Fix #123827: Extension cannot be uninstalled if symlinked
In the case of user managed files we can't rely on paths to remove
being directories, they could be symbolic links as developers may point
to their own repository. While unlikely the paths to remove could
be files too.

Use a wrapper for shutil.rmtree(..) that handles symlinks & files,
use when removing paths that are expected to be directories from user
managed locations.
2024-06-28 13:40:37 +10:00
Harley Acheson
4ef2381ce3 Cleanup: UI: Remove Unused Icon Texture Drawing Code
About 330 lines of code removed that supported the old
ICON_TYPE_COLOR_TEXTURE icon drawing.

Pull Request: https://projects.blender.org/blender/blender/pulls/123868
2024-06-28 05:25:18 +02:00
Campbell Barton
0167dd08fc Merge branch 'blender-v4.2-release' 2024-06-28 12:04:13 +10:00
Campbell Barton
9d10b88f37 Cleanup: remove unnecessary icon scanning on startup
Blender was performing a redundant scan for icons on startup (200 files)
remove this since it adds small but unnecessary overhead.

Part of !123870
2024-06-28 11:53:44 +10:00
Campbell Barton
d77ebc41de Cleanup: remove icon file lists & unused functions
On started Blender was scanning icons for PNG's to display in the theme menu
which hasn't been available since early 2.x days.

Also remove some other unused icon functions.

Pull Request: https://projects.blender.org/blender/blender/pulls/123870
2024-06-28 03:38:25 +02:00
Hans Goudey
1ede471ba2 Cleanup: Remove unnecessary namespaces, pass math types by value
Also remove meaningless const in function declarations.
2024-06-27 17:52:16 -04:00
Sean Kim
868fed96c9 Cleanup: Sculpt: Remove unused sculpt clay brush code
Removal was missed in 0bc7631693.

Pull Request: https://projects.blender.org/blender/blender/pulls/123866
2024-06-27 23:50:58 +02:00
Harley Acheson
4d84940253 UI: File Browser File Type Icons Use Shader Outline
In the File Browser we sometimes show tiny icons at the bottom-left of
items. This PR draws these using the shader's outline mode rather than
overprinting them twice.

Pull Request: https://projects.blender.org/blender/blender/pulls/123865
2024-06-27 23:48:38 +02:00
Lukas Stockner
6967255906 Color management: Support white balance as part of the display transform
This implements a von-Kries-style chromatic adaption using the Bradford matrix.
The adaption is performed in scene linear space in the OCIO GLSL shader, with
the matrix being computed on the host.

The parameters specify the white point of the input, which is to be mapped to
the white point of the scene linear space. The main parameter is temperature,
specified in Kelvin, which defines the blackbody spectrum that is used as the
input white point. Additionally, a tint parameter can be used to shift the
white point away from pure blackbody spectra (e.g. to match a D illuminant).

The defaults are set to match D65 so there is no immediate color shift when
enabling the option. Tint = 10 is needed since the D-series illuminants aren't
perfect blackbody emitters.

As an alternative to manually specifying the values, there's also a color
picker. When a color is selected, temperature and tint are set such that this
color ends up being balanced to white.
This only works if the color is close enough to a blackbody emitter -
specifically, for tint values within +-150. Beyond this, there can be ambiguity
in the representation.
Currently, in this case, the input is just ignored and temperature/tint aren't
changed. Ideally, we'd eventually give UI feedback for this.

Presets are supported, and all the CIE standard illuminants are included.

One part that I'm not quite happy with is that the tint parameter starts to
give weird results at moderate values when the temperature is low.
The reason for this can be seen here:
https://commons.wikimedia.org/wiki/File:Planckian-locus.png
Tint is moving along the isotherm lines (with the plot corresponding to +-150),
but below 4000K some of that range is outside of the gamut. Not much can
be done there, other than possibly clipping those values...

Adding support for this to the compositor should be quite easy and is planned
as a next step.

Pull Request: https://projects.blender.org/blender/blender/pulls/123278
2024-06-27 23:27:58 +02:00
Harley Acheson
9ae237d0b4 UI: Allow Discretionary Use of Icon Outline
Icons can have contrasting outlines, but currently this can only happen
for some icons and when the theme setting "Icon Border" is greater than
zero. This change shows them in the same situations but also allows
them to be shown when needed. For special situations like having an
icon overlay on an icon, or for the icons in the corners of File
Browser preview items, etc.  In a nutshell this allows UI_icon_draw_ex
to honor its outline argument, rather than ignoring it unless the theme
setting was also set.

Pull Request: https://projects.blender.org/blender/blender/pulls/123863
2024-06-27 23:00:53 +02:00
Jesse Yurkovich
5c7821fd79 imbuf: Add regression test for PSD
Make use of recently added PSD test files to ensure loading works
correctly when we update our library dependencies.

Pull Request: https://projects.blender.org/blender/blender/pulls/123861
2024-06-27 22:34:36 +02:00
Jesse Yurkovich
45c03764bf imbuf: Add PSD test files 2024-06-27 12:57:30 -07:00
Falk David
8f64329c79 Refactor: Use newer attribute API in create_liquid_geometry
The `create_liquid_geometry` still used the older attributes
API to write the velocities.
This replaces the use of `BKE_attribute_new` with
the newer attribute API.
No functional changes expected.

Pull Request: https://projects.blender.org/blender/blender/pulls/123854
2024-06-27 20:39:30 +02:00
Sergey Sharybin
d16eac9cee Merge branch 'blender-v4.2-release' 2024-06-27 19:57:51 +02:00
Sergey Sharybin
9e4d9295f0 Fix: Compilation error of fribidi on macOS
Fribidi uses Meson, which auto-detects presence of ccache and uses it
when found. This could cause incorrect compilation results when doing
a cross-compilation to different platforms on the same machine.

Pass the typical configuration environment to the Meson setup, which
takes care of specifying deployment targets and architecture as the
compiler flags, preventing ccache from using result from a different
architecture.

This is similar to the Meson setup used for Harfbuzz and Epoxy.

Pull Request: https://projects.blender.org/blender/blender/pulls/123828
2024-06-27 19:56:46 +02:00
Hans Goudey
e1ca54c52a Fix #123768: Sculpt: Crash on undo with multires 2024-06-27 13:54:01 -04:00
Anthony Roberts
39fe42fcac Windows: 4.2 Library incremental (OIIO+OIDN)
Updating as per #118455, new versions of OIIO and OIDN

Pull Request: https://projects.blender.org/blender/blender/pulls/123851
2024-06-27 19:22:51 +02:00
Falk David
a0f0a4dd49 Cleanup: Remove BKE_attribute_allow_procedural_access
This function was already replaced by `bke::allow_procedural_attribute_access`.
Removes the rest of the usages.

Pull Request: https://projects.blender.org/blender/blender/pulls/123852
2024-06-27 19:20:04 +02:00
Miguel Pozo
baf07c22bd Revert "Fix #123794: Crash when UDIMs have gray and color tiles"
This reverts commit 095e78bd28.
2024-06-27 19:15:55 +02:00