Color the interpolation icons matching the new interpolation theme
settings added in 75eaecf350
This makes a clearer connection with the lines drawn in Dope Sheet.
See PR for details and screenshots.
Pull Request: https://projects.blender.org/blender/blender/pulls/148215
We have icons that represent specific individual collections. like
Icon_Outliner_Collection for a default (uncolored) collection, and
Icon_Collection_color_x for ones with colors. For "collections" as a
general thing though we have icon_group. Sometimes we confuse the two,
for example the list of tabs to show in Properties uses a different
icon than the actual category icon. This PR fixes the complaint by
using the correct icon for each of these purposes.
Pull Request: https://projects.blender.org/blender/blender/pulls/147942
A test of using multi-color SVG icons in place of the current "vector"
(custom drawn) style we are using now. These use separate colors for
the box body versus outline, shadow, handhold. Colored by the theme
colors.
Pull Request: https://projects.blender.org/blender/blender/pulls/126307
The SVG icon outline could be over 1.0 when hovering over icons in the
outliner. This was converted to bytes and set FontBLF::shadow_color[3]
which overflowed the byte range.
Clamp the alpha before passing to BLF SVG drawing.
This adds support for packed linked data. This is a key part of an improved
asset workflow in Blender.
Packed IDs remain considered as linked data (i.e. they cannot be edited),
but they are stored in the current blendfile. This means that they:
* Are not lost in case the library data becomes unavailable.
* Are not changed in case the library data is updated.
These packed IDs are de-duplicated across blend-files, so e.g. if a shot
file and several of its dependencies all use the same util geometry node,
there will be a single copy of that geometry node in the shot file.
In case there are several versions of a same ID (e.g. linked at different
moments from a same library, which has been modified in-between), there
will be several packed IDs.
Name collisions are averted by storing these packed IDs into a new type of
'archive' libraries (and their namespaces). These libraries:
* Only contain packed IDs.
* Are owned and managed by their 'real' library data-block, called an
'archive parent'.
For more in-depth, technical design: #132167
UI/UX design: #140870
Co-authored-by: Bastien Montagne <bastien@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/133801
This PR generalizes properties for geometry (currently mesh only) attributes
found in 3D Viewport theme, namely:
- Combine "Edge Bevel" and "Vertex Bevel" into one "Bevel" property.
- Combine "Freestyle Edge Mark" and "Freestyle Face Mark" into one "Freestyle" property.
- Remove word "Edge" from Crease, Sharp, and Seam properties, to match others.
- Group all of the above together in the UI.
This is a breaking change (that will be handled with others in migration),
but doesn't introduce any visual changes in the default theme (and almost any theme).
Pull Request: https://projects.blender.org/blender/blender/pulls/146732
Color icons for Red, Green, Blue, were introduced in c13d3e2f7a. They
are translatable but currently using the default transation context
and the `TIP_()` translation macro.
R, G, B as colors should use the BLT_I18NCONTEXT_COLOR context,
and `IFACE_()` since they are not specific to tooltips.
Drop all support for animation data from Blender versions 2.49 and
older.
- The `IPO` DNA struct is deleted, as is the `IDType_ID_IP` type
definition.
- Versioning code has been removed in its entirety.
- Loading a pre-2.50 blend file will issue a warning, stating that any
animation data that was there is now lost, and that the file should
be loaded & re-saved with Blender 4.5 to properly port the data.
Note that versioning of Action assignments (as in, picking a slot)
still uses the tagging + updating all tagged assignments as a
post-processing step. This is necessary because picking the right slot
is only possible after all Actions (also those from libraries) have
been versioned. We might be able to address this as well, by upgrading
legacy → slotted Actions "on the fly" versioning these Action
assignments. If we do that, I think that would be better in a separate
PR though, as it could introduce issues by itself.
Ref: #134219
Pull Request: https://projects.blender.org/blender/blender/pulls/145188
Functions for convert between the color types and ostream support are
now outside the classes.
Many files were changed to fix cases where direct includes for headers
were missing.
Pull Request: https://projects.blender.org/blender/blender/pulls/145756
Edge and Vertex marks such as Crease, Bevel Weight, Seam, Sharp, have
specific use cases and colors assigned to them that users get familiar
with over time.
It can be hard to remember which color belong to what, this PR tries to
address this by introducing colored icons that follow the theme setting
for that edge mark/flag.
See PR for details and screenshots.
Pull Request: https://projects.blender.org/blender/blender/pulls/144075
This PR improves alignment between playhead and keyframe indicators,
especially noticeable at small UI scale sizes where we are currently
always out by one pixel. This is because keyframe icons are all odd
widths while the playhead line is an even width. This PR mostly makes
that line an odd width, with other small adjustments.
Pull Request: https://projects.blender.org/blender/blender/pulls/142904
Use the form "Processing something..." (gerund, sentence case,
ellipsis) for running jobs progress label, according to Blender's
Human Interface Guidelines.
Pull Request: https://projects.blender.org/blender/blender/pulls/141573
Several changes to make node socket symbols more consistent across
the UI:
* Explicitly use the node editor's theme when looking up the outline
color for node sockets so they are consistent across editors.
* Use the proper socket drawing function in `widget_nodesocket`,
rather than relying on the "widget base" shader to draw a colored
circle
* `uiTemplateNodesocket` now also works in non-embossed layouts.
Pull Request: https://projects.blender.org/blender/blender/pulls/136612
This removes the include `UI_interface_layout.hh` from
`UI_interface_c.hh`, and in many places this swaps the include
from `UI_interface.hh` to `UI_interface_layout.hh`.
Also, cleanups some `UI_interface.hh` includes with
`UI_interface_icons.hh` or `UI_interface_types.hh`
`UI_icon_from_idcode` is used e.g. from the Action Editor to indicate an
Action's Slot Type (and without the icon it is kinda hard to tell what
the slot is suited for...)
Before

After

Discovered while investigating #140618
Pull Request: https://projects.blender.org/blender/blender/pulls/140658
This prevents the use of unaligned data types in
vertex formats. These formats are not supported on many
platform.
This simplify the `GPUVertexFormat` class a lot as
we do not need packing shenanigans anymore and just
compute the vertex stride.
The old enums are kept for progressive porting of the
backends and user code.
This will break compatibility with python addons.
TODO:
- [x] Deprecation warning for PyGPU (4.5)
- [x] Deprecate matrix attributes
- [x] Error handling for PyGPU (5.0)
- [x] Backends
- [x] Metal
- [x] OpenGL
- [x] Vulkan
Pull Request: https://projects.blender.org/blender/blender/pulls/138846
When an icon is drawn with both lowered opacity and a border shadow
(used to increased contrast in Light theme), it will look darker
because more of the dark shadow is visible through the icon. This PR
fixes this by scaling the shadow by the opacity.
Pull Request: https://projects.blender.org/blender/blender/pulls/139610
The conversion from int to float is not supported natively
so it ends up happening beforehand on the CPU or as a
step before the vertex buffer can be used. It's better to just
upload floats in the first place.
Related to:
- 1e1ac2bb9b
- 617858e453
Pull Request: https://projects.blender.org/blender/blender/pulls/138855
Adding three icons to represent panning, rotate, and zoom gestures
and using them for status bar event icons for
GHOST_kTrackpadEventScroll, GHOST_kTrackpadEventRotate, and
GHOST_kTrackpadEventMagnify.
Pull Request: https://projects.blender.org/blender/blender/pulls/138569
We have an icon type called ICON_TYPE_VECTOR that are dynamically drawn
at runtime. These are created in icon_draw_size, which takes float
positions, but their callbacks all use integers instead. Truncating so
early in the process takes away flexibility to draw these at more ideal
sizes or to center them better. The complaint is a situation where we
mix ICON_TYPE_VECTOR for the colored collections and ICON_TYPE_SVG_MONO
for the white ones. Even though they both ultimately just draw the same
SVG icon the former way truncates position and size so there are times
they won't exactly line up.
Pull Request: https://projects.blender.org/blender/blender/pulls/132338
This implements bundles and closures which are described in more detail in this
blog post: https://code.blender.org/2024/11/geometry-nodes-workshop-october-2024/
tl;dr:
* Bundles are containers that allow storing multiple socket values in a single
value. Each value in the bundle is identified by a name. Bundles can be
nested.
* Closures are functions that are created with the Closure Zone and can be
evaluated with the Evaluate Closure node.
To use the patch, the `Bundle and Closure Nodes` experimental feature has to be
enabled. This is necessary, because these features are not fully done yet and
still need iterations to improve the workflow before they can be officially
released. These iterations are easier to do in `main` than in a separate branch
though. That's because this patch is quite large and somewhat prone to merge
conflicts. Also other work we want to do, depends on this.
This adds the following new nodes:
* Combine Bundle: can pack multiple values into one.
* Separate Bundle: extracts values from a bundle.
* Closure Zone: outputs a closure zone for use in the `Evaluate Closure` node.
* Evaluate Closure: evaluates the passed in closure.
Things that will be added soon after this lands:
* Fields in bundles and closures. The way this is done changes with #134811, so
I rather implement this once both are in `main`.
* UI features for keeping sockets in sync (right now there are warnings only).
One bigger issue is the limited support for lazyness. For example, all inputs of
a Combine Bundle node will be evaluated, even if they are not all needed. The
same is true for all captured values of a closure. This is a deeper limitation
that needs to be resolved at some point. This will likely be done after an
initial version of this patch is done.
Pull Request: https://projects.blender.org/blender/blender/pulls/128340
Add support for a 5th modifier key called "hyper",
this is a modifier supported on Wayland & X11 although
other platforms could support an additional modifier too.
Both GNOME and KDE can map CapsLock to Hyper.
Other compositors can use the XKB_DEFAULT_OPTIONS environment variable.
This allows users to have an additional modifier for their own use
that doesn't conflict with other keys.
Ref !136340
Some of the existing logic checked that modifiers were KM_MOD_HELD,
other logic checked the value wasn't KM_NOTHING or KM_ANY.
Simplify checks by comparing against KM_MOD_HELD in all cases
as this won't be set to other values.
This adds icons for ICON_RGB_RED, ICON_RGB_GREEN, and ICON_RGB_BLUE
that display with those colors. This does not remove the existing
monochrome ICON_COLOR_* icons. This also allows the translation of
the "R", "G", "B" characters shown, for languages that prefer color
words that do not start with these.
Pull Request: https://projects.blender.org/blender/blender/pulls/136154
The general idea is to keep the 'old', C-style MEM_callocN signature, and slowly
replace most of its usages with the new, C++-style type-safer template version.
* `MEM_cnew<T>` allocation version is renamed to `MEM_callocN<T>`.
* `MEM_cnew_array<T>` allocation version is renamed to `MEM_calloc_arrayN<T>`.
* `MEM_cnew<T>` duplicate version is renamed to `MEM_dupallocN<T>`.
Similar templates type-safe version of `MEM_mallocN` will be added soon
as well.
Following discussions in !134452.
NOTE: For now static type checking in `MEM_callocN` and related are slightly
different for Windows MSVC. This compiler seems to consider structs using the
`DNA_DEFINE_CXX_METHODS` macro as non-trivial (likely because their default
copy constructors are deleted). So using checks on trivially
constructible/destructible instead on this compiler/system.
Pull Request: https://projects.blender.org/blender/blender/pulls/134771
Move the code dealing with converting float3 to GPU normals
out of the vertex format header into a separate header. Use a
proper C++ namespace and remove duplication by only using
the more recently added C++ templated conversions.
Most of the diff comes from the removal of the indirect includes
from GPU_vertex_format.hh. A lot of files ended up mistakenly
depending on that.
Pull Request: https://projects.blender.org/blender/blender/pulls/134873
The "Red Alert" color is currently hard-coded, which causes problems in
themes. It also has an Enum value of 0, which precludes using this
value as "unset". We also use Error, Warning, and Info colors that are
part of the Info Editor. This PR moves these out of the Info Editor
and into the "State" part of the theme. And then makes TH_REDALERT use
the TH_ERROR color.
Pull Request: https://projects.blender.org/blender/blender/pulls/131127
Show a dimmed loading icon while previews are being loaded in a
background thread. The asset shelf and asset/file browsers do this
similarly already.
This is implemented in drawing code, so the loading icon will always
appear when an in-progress preview is being drawn. I experimented with
doing this in `ui_def_but_icon()`, but this won't update correctly with
popups that don't support full refreshing.
This also makes any normal icon that is drawn as preview use the normal
icon size. These icons are usually made for smaller sizes and look very
outblown when displayed at the size of a preview. Yet it's useful to
sometimes pass a normal icon. E.g. for the asset shelf we would already
draw the data-block type icon in place of the preview if there was no
preview to display, and we'd use the normal, smaller size already.
Larger can still be drawn differently.
I don't know of any current cases this would affect though.
Pull Request: https://projects.blender.org/blender/blender/pulls/133880
When loading preview images from disk, we'd first scale them to the
standard preview image size (in `icon_copy_rect()`) and then scale them
again to the drawing size when eventually drawing to screen. The first
scaling would happen on the CPU, which is slow, and without filtering.
Now the image is stored in its original size and only scaled when
drawing, which uses scaling on the GPU with mipmaps and bi-linear
filtering. While a bit more blurry, the resulting image has less
artifacts and represents the original image better. Keeping the images
unscaled means memory footprint is bigger, we could cap the size if
necessary.
Noticed while working on #131871. Asset shelf previews would have more
artifacts than before.
See pull request for comparisons.
Pull Request: https://projects.blender.org/blender/blender/pulls/133559