Goals of the refactor:
* Simplify adding (named) graph inputs and outputs.
* Add ability to refer to a graph input or output with an index.
* Get rid of the "dummy" terminology which doesn't really help.
Previously, one would add "dummy nodes" which can then serve as input
and output nodes of the graph. Now one directly adds input and outputs
using `Graph.add_input` and `Graph.add_output`. There is one interface
node that contains all inputs and another one that contains all outputs.
Being able to refer to a graph input or output with an index makes it
more efficient to implement some algorithms. E.g. one could have a
bit span for a socket that contains all the information what graph
inputs this socket depends on.
Pull Request: https://projects.blender.org/blender/blender/pulls/112474
Characters with an unknown width (control characters for e.g.)
caused word wrap not to work properly, the text cursor was out of sync
with the displayed text.
Use BLI_str_utf8_char_width_safe which is the convention for the
text editor.
- Restore the selection if auto-closing a selection fails.
- Simplify auto-close selection by ordering the selection.
- Call text_update_line_edited on the selection when auto-closing
a selection to ensure formatting is recalculated for the region.
- Internal changes needed to support multi-byte auto-closing
although this is still limited to ASCII at the moment.
Entering non ascii characters would truncate the code-point to char
when passing it to text_closing_character_pair_get(), which could then
match bracket values. Resolve by checking the characters are ascii.
It wasn't possible to select the position between two tab characters
with the mouse cursor in the UI. Don't handle characters with an unknown
width as combining.
Follow up to [0] which changed this for cursor motion.
[0]: bc51449ff1
Change to handling of control characters in [0] caused tests to fail,
now the cursor no longer skips over control characters,
update test to account for this.
[0]: bc51449ff1
Since [0] modal transform in the 3D viewport caused key-maps to be
rebuilt by the event system. Creating a temporary copy for
ViewOpsData_Utility flagged the key-map as outdated.
This could crash (resolved by [1] - for the most-part), but would still
rebuild the whole key-map, adding unnecessary overhead.
This would also reset the KMI_EXPANDED flag, causing transform
to hide key-map items when using Blender with the key-map editor open.
Add a function to temporarily suppress key-map updates.
While not ideal, full support for temporary key-maps that behave
differently to user key-maps is a bigger project for something
that's only needed in one place.
[0]: 017d4912b2
[1]: 9a0eaa2062
- Add IDP_EnsureProperties,
- Remove create_if_needed argument from IDP_GetProperties.
Split access & creation so intention reads more clearly without
looking up function arguments.
* Add icon to "Reset Color Ramp" (same used by Reset to Default Value)
* Add icon to "Flip Color Ramp" (sideways arrows, similar to invert
vertex groups).
* Add separators after stops distribution operators, and before
reset since they have pretty different purposes.
This is a light weight solution to passing in some extra context into
a lazy-function that is invoked by the graph executor.
The new functionality is used by #112421.
This makes the code for creating a lazy-function for the body
of a zone more reusable. Currently, it is only used by the repeat
zone, but in the future the same could be used for simulations
and for-each zones.
By storing a raw pointer instead of a `Span`, we save 16 bytes
per node state. I measured a ~5% speedup in my setup with
a simple repeat zone.
5c450aea05 added some additional asserts to check for valid
indices. Generally, index-errors in this area lead to wrong
behaviors of geometry nodes very quickly.
This finalize the implementation of the screen space tracing
for EEVEE-Next.
Refractive objects can now have screen space reflection too
and self reflect.
This keeps the feedback radiance buffer principle of the
Classic EEVEE so that we still get infinite bounces by default.
There are some conflict with refraction tracing and ambient
occlusion nodes. Materials using screen space refraction will
not be able to detect occlusion from any refractive surface using
screen space refraction including itself.
They also won't be visible to screen space reflections from other
materials *not* using screen space refraction.
This should be added to the list of limitations for now.
Note that the current approach to feed the radiance is to copy
the radiance buffer. This has the nice property of only containing
the currently rendered objects and not project transparent objects
or other non-yet rendered object onto the depth behind them.
Pull Request: https://projects.blender.org/blender/blender/pulls/112341
There are many small allocations when the graph executor is
initialized (e.g. all the node/sockets have to be allocated). Those
were already combined into a few allocations by making use
of `LinearAllocator`. However, even better performance can be
achieved by making one larger allocation and then using
preprocessed offsets into that buffer.
I measured up to 20% speedup in geometry nodes with a simple
repeat zone.
Currently, we create a logger for every compute context that is evaluated,
even when we don't actually log anything in that context (due to other
optimizations). Now, the logger is not created eagerly anymore.
This can be especially benefitial when there are many compute contexts
that should not log anything, e.g. if there is a repeat zone with many iterations.
In an extrem case I measured a speedup for the modifier evaluation
from 24ms to 14ms.
This adds an optional uiBut callback that allows creating a tooltip
line-by-line with specified style and color in any order. It also
allows adding images as well to create very informative tooltips.
Pull Request: https://projects.blender.org/blender/blender/pulls/105905
Display the modal keymap in the status bar for modal operators that
are called within macros. Most notably, the keymap for the transform
operator is displayed when it's called as part of the duplicate,
extrude, or loopcut operators or when moving nodes.
Pull Request: https://projects.blender.org/blender/blender/pulls/108027
Remove `es_ES` language.
Rename `uz_UZ` to `uz_UZ@latin`
Rename `zh_CN` to `zh_HANS`
Rename `zh_TW` to `zh_HANT`
Add support for lowercase chars in `country` part of the locale code
(although in the end it is not needed, since `boost::locale` backend
does not supports lowercase 'country' part in locales identifiers
currently) .
Related to https://projects.blender.org/infrastructure/blender-projects-platform/issues/65
The `ScopedModifierTimer` would work for "real" curve modifiers, but was
skipping geometry node modifiers.
Now move it up so geometry node modifiers are included.
Pull Request: https://projects.blender.org/blender/blender/pulls/112420
This allows for better multi threading because work can be moved to
other threads while waiting for the ico sphere to be generated.
Most other nodes don't need this, because they use `parallel_for`
internally, which sends the hint as well.
Changes the `asset_poll()` and `draw_context_menu()` methods for asset
shelves to use the `AssetRepresentation` type, instead of `AssetHandle`.
The latter should be removed, so it's better to avoid using it in the
asset shelf BPY to avoid future compatibility breakage. This is possible
now with d421ebac5e.
Previously Python code would require the hacky `AssetHandle` type and
query the ID type through the file data it contained (like
`asset_handle.file_data.id_type`). We want to get rid of `AssetHandle`.
With this commit we can change asset shelf methods like
`AssetShelf.asset_poll()` to take an `AssetRepresentation` instead of
`AssetHandle`, since the ID type is currently the only relevant part.
This is much nicer and won't require breaking compatibility in future to
deprecate `AssetHandle`.
When inserting a bone collection via a library override, make sure that
the reverse pointers (from the bones in the collection to the collection
itself) are also added. These are used for the "given the active bone,
which collections is it in?" kind of queries.
When showing a list of bone collections in the M/Shift+M menus, only show
those bone collections that can be assigned to. Bone collections from
linked armatures are hidden, because they're read-only anyway.
It would probably be better to still show these read-only collections,
but not sure how that can be done with the current code.