The goal is to make it possible to have more or less reliable way
to perform performance comparisons of changes in algorithms used
in dynamic topology.
This change allows to run Blender with the following arguments:
blender --log "sculpt.detail,pbvh.bmesh" --log-level 2
and see timing of dynamic topology flood-fill operation, as well as
individual timings of edge subdivision/collapsing.
Pull Request: https://projects.blender.org/blender/blender/pulls/114099
Regression from [0] where the key-map was attempting to load preferences
for key-map items for add-on operators which were not yet defined.
Resolve by postponing keymap updating until after loading add-ons.
[0]: 6de294a191
The main goal of this patch is to turn `node.inputs[...]` and `node.outputs[...]` into
the main way to lookup sockets on a node. Currently, it's used for that sometimes,
but often it is not, because it does not work in all cases. More specifically, it does
not work when a node has multiple sockets with the same name but different
identifiers, which is relatively common.
This patch proposes to make the string lookup more convenient, more useful and
less prone to breaking after changes in Blender.
This is achieved by changing how the lookup works:
* First, it tries to find an available socket with an identifier that matches the given
key. This is checked first, it makes sure that every socket can be accessed by its
identifier. The identifier matching is currently disabled in some nodes where we
want to change identifiers soonish.
* If that didn't work, it tries to find an available socket with a matching name. This
is often convenient because it generally matches what can be seen in the UI.
Furthermore, it's also necessary to avoid breakage with old usages of this lookup
function.
* If both options above didn't work, it checks whether the given key matches any
socket name/identifier that the node used to have in the past, but has been
renamed for whatever reason. This mainly exists to avoid breaking scripts by certain
kinds of changes in the future. This is not included in this patch.
Note, previously, string lookup would also find unavailable sockets. This is disabled
now, because the way we handle unavailable sockets internally is likely to change.
Therefor, any use of unavailable sockets might break (unavailable != hidden). For
the time being, it's still possible to find unavailable sockets by iterating over all sockets.
This change has a small chance to break existing scripts because the behavior
changes for some inputs in some nodes. However, for the cases where the function
is used in practice, I don't really expect any breakage.
This patch also allows us to give a better answer to reports like #113106.
Pull Request: https://projects.blender.org/blender/blender/pulls/113984
Due to missing logic reflection probe updates where not always
performed. There were multiple artifacts:
* Lookdev Worlds where Black Until the Scene world was rendered.
Issue was that the lookdev world didn't initialized its atlas
coordinates.
* Lookdev world should only retrigger reflection probe update when
material is compiled
* When world is updated, reflection probes should be updated; this
might require a redraw when reflection probe draw passes aren't
updated this sample.
Pull Request: https://projects.blender.org/blender/blender/pulls/114064
No functional changes.
Changing old C code to C++ by returning a `Vector` from `ANIM_setting_get_rna_values`.
This reduces the argument count for that function and simplifies the code.
Pull Request: https://projects.blender.org/blender/blender/pulls/113931
It's possible to encounter a true 1-channel image if it's coming
directly from, say, a float-value AOV or similar.
This was not accounted for and would cause issues when saving the image
out to a 3 or 4 channel format (wrong values) or when saving out to
another 1 channel format (unnecessary usage of luminance weight values).
Pull Request: https://projects.blender.org/blender/blender/pulls/111577
Last key is drawn on the right edge of the strip, but that is end of
the frame, which it should be bound to. Because of this, drawing code
and operators must consider, that this key is always displaced.
This was not done in 86a0d0015a and caused issues like #113755 that was
fixed incorrectly.
Own mistake in d47ceb53f8
The old calls to `BLI_array_staticdeclare` were deceptive. Because no
appends were done after declaration, to actually use the array, the
variables remained null. Effectively `nullptr` was always being passed
in here.
Pull Request: https://projects.blender.org/blender/blender/pulls/114049
The issue was that a node was supposed to propagate an anonymous
attribute that is only created further to the right in the tree. This does not
during inferencing, where uses of fields can only come to the right of its
creation. Note, all fields coming out of the repeat input/output node are
new field sources during inferencing.
Now, only field sources that are passed from the outside into the repeat zone
can be propagated from the repeat output to the repeat input node.
Solving this also showed another issue where anonymous attributes are
not properly propagated through a repeat zone where there is no link between
the repeat input and output node. In such cases, data is still propagated between
those two nodes when the number of iterations is zero.
The way we handled activation of view item buttons (which are placed
underneath other buttons) would leave that button in an active state,
giving it priority on the next event handler run. Instead we want to
cleanly exit the button after activation, so that the overlapped chevron
icon can be recognized as hovered again.
Also limit this to mouse press events, since otherwise the tree view
item would toggle the collapsed state on both the press and the release
event.
This should fix one of the remaining crashes while drawing.
The issue was that we would try to write to an out-of-bounds
memory location.
This fixes the issue and also cleans up the code a bit more,
adding more comments and using better names.
The drawing plane was at the world origin not the object origin.
This still needs to use the correct drawing plane in the future,
but it's a good step in the right direction.
Choosing "Mark as Asset" from the context menu of the ID selector (ID
template) would always use the selected objects instead of the ID set in
the ID selector. This is because since f22e2bab72, multiple selected IDs
have priority over a single active ID (to give batch editing priority),
and the 3D view context exposes both.
Adds variants of the mark and clear asset operators that only work on a
single ID ("id" context member). Context menus for buttons representing
an ID use this instead. Using an operator property resulted in too
complicated code. Plus the poll function would succeed in cases where
the operator wouldn't be able to succeed. Separate operators keep things
simple and more reliable.
This node supports either a Layer or a Layer Group name as input,
and outputs a selection field for it.
Known limitations to be addressed separately:
* We are not warning/keeping track of the named layers.
* There is no lookup for layers (groups) yet.
Ref !113908.
Pull Request: https://projects.blender.org/blender/blender/pulls/113908
Known limitations to be addressed separately:
* We are not warning/keeping track of the named layers.
* There is no lookup for layers (groups) yet.
Ref !113908.
This field supports either a Layer, or a Layer Group name as input,
and outputs a selection.
The nodes that use this should add the name to the list of Named
Dependencies of the node-tree.
Ref !113908.
This was caused by the framebuffer incorrectly being recreated
using a byte buffer. From now on, always use the input format
or guess the format based on the output bitdepth.
Pull Request: https://projects.blender.org/blender/blender/pulls/114061
This is because `TRANSFORM_OT_edge_slide` has `OPTYPE_DEPENDS_ON_CURSOR`
flag set. Due to this, invoke call to loop-cut operator was not sent
from function `WM_operator_name_call_ptr_with_depends_on_cursor`.
Since `edge slide` operator does not depend on actual cusor position, we
can remove this operator flag to fix the problem.
Pull Request: https://projects.blender.org/blender/blender/pulls/113140