Age | Commit message (Collapse) | Author |
|
This introduces a new `UI_MT_button_context_menu` class which is
registered at startup. Addons can append/prepend draw functions to this
class, in order to add their custom context menu entries.
The new class replaces the old `WM_MT_button_context` class, thus
requiring a small change in addons using this feature. This is done
because addons were previously required to register the class
themselves, which caused addons to override each other's context menu
entries.
Now the class registration is handled by Blender, and addons need only
append their draw functions. The new class name ensures that addons
using the old method don't override menu entries made using the new
class.
Menu entries added with the legacy `WM_MT_button_context` class are
still drawn for backwards compatibility, but this class must not be used
going forward, as any addon using it still runs the risk of having its
menu entries overridden, and support for the legacy class is subject to
removal in a future version.
Reviewed By: campbellbarton
Maniphest Tasks: T100423
Differential Revision: https://developer.blender.org/D15702
|
|
Case where object was directly linked and not owned by a linked
collection was not properly handled, added some level of support for it
now.
Note that the behavior may not always be ideal in cases where the linked
object would be linked in many different local collecitons, hard to get
best solution always from this Editor given limited hierarchy data
available here.
|
|
Could lead to crahses in some cases, with outliner drawing code
accessing freed ID data in its tree.
|
|
backport of python PR 31735 [1]
[1] https://github.com/python/cpython/pull/31735
|
|
This behavior is now implicitely controlled by the 'Make' operations,
based either on context or selected items.
|
|
The object data path item wasn't added properly.
Also remove some of the unnecessary variables and forward declarations.
|
|
handle_subversion_warning() was reporting with RPT_ERROR type, replaced
with RPT_WARNING.
RPT_ERROR would stop python scripts opening files written by newer
Blender binary with bpy.ops.wm.open_mainfile(), preventing further code
from running. This does not seem right since Blender itself still loads
the files.
Ran into this checking T100446 in 2.93.
Differential Revision: https://developer.blender.org/D15712
|
|
Matches main operations exposed in View3D and the Outliner.
|
|
|
|
|
|
Pressing escape when rendering a viewport animation would
access the freed even and crash (with ASAN enabled).
Always check the context's window before the event as this is a signal
a file was loaded or the window was closed (and it's events freed).
|
|
Constant_rate_factor mode was not updated when choosing DNxHD codec in
RNA update function.
Ensure `FFM_CRF_NONE` is set.
|
|
|
|
Loopback ID pointers should be ignored here as well, otherwise they are
very efficient at preventing proper detection of 'leaf' override IDs in
a hierarchy.
|
|
A few libraries were updated and a few added.
There are a few depedencies to intel oneAPI which I did not include, since we
refer already to Intel oneAPI already.
|
|
A few libraries were updated, a few were added, and a few were missing
from the previous license document.
|
|
This fixes missing selection updates in UV editor, both with GPU subdivision
and with the Modified Edges display option for modifiers in general.
It also fixes the UV editor incorrectly showing the cage mesh with deformed
coordinates. These are not yet supported by the UV selection system.
Changes:
* Always read selection state from the editmesh when building batches. The
flags in the evaluated mesh can be outdated as selection bypasses depsgraph
evaluation for performance, and instead may just clear the batches.
* runtime.is_original is only valid for the bmesh wrapper. The check for
building the UV cage should only use that if the mesh is a bmesh wrapper.
* Don't create cage batches for objects whose mesh is in edit mode, but that
are not themselves in edit mode, there is no need.
Differential Revision: https://developer.blender.org/D15658
|
|
|
|
Move override creation into their own menu, add entries for reset and
clear operations.
|
|
create override
Add support for the (geometry)node tree case.
Also add warning about not being implemented for other types.
|
|
Also add new outliner liboverride operators mapping to the manual,
though this is useless currently as this feature is not working in many
part of the UI, including the Outliner contextual menu.
|
|
Only object renaming was properly depsgraph-tagged, now all IDs (and
their sub-data like bones etc.) should be properly handled.
|
|
While fixing T100302 (rBd76583cb4a1) I did not realize that the
change in imported vertex order would actually matter. Turns out, it
does for morph targets / mesh shape keys. So redo the fix in a way
that does not change the vertex order. Fixes T100421.
|
|
Materials can be changed by other evaluations like geometry nodes,
now handles that kind of situation.
|
|
Node tagging needed to happen after the undo node's null check.
|
|
The auto refresh option should be ignored in this case.
|
|
When dropping file to sequencer timeline, coordinates for strip position
and overlap handling are used even if not set.
Reset internal state in on_drag_start callback and set is_modal
variable only if coordinates are updated. This way when dragging file
from external file browser, strip is added at current frame as before
modal operator was implemented.
Reviewed By: Richard Antalik
Differential Revision: http://developer.blender.org/D15333
|
|
Ensure render passes are allocated in the result prior to writing them.
Alternative could be to not write empty passes, but that is kind of
different from perspective of s one who reads the file.
Differential Revision: https://developer.blender.org/D15692
|
|
|
|
Checking for the existence of and using __GLIBC_PREREQ can't be done in the
same conditional.
Contributed by listout.
Differential Revision: https://developer.blender.org/D15690
|
|
The status bar keymap items still don't get translated because the
TIP_ translation introduced by rBe1974ae30e46 uses the wrong context:
it uses the default context, while the extraction introduced in
rB630b961f234e uses ID_WINDOWMANAGER.
Reviewed By: mont29
Differential Revision: https://developer.blender.org/D15684
|
|
This is not dynamic: it only happens when the dir is added to the
list--automatically for recent files, and by the user for bookmarks.
Entries can then be manually renamed like other dirs. They will
keep the same name if the language is changed afterwards.
Reviewed By: mont29
Differential Revision: https://developer.blender.org/D15629
|
|
|
|
I'm still not sure how the `0xFF` value came about, but it's not a
valid virtual key code.
Therefore it should not be used in `MapVirtualKey`.
|
|
In this case the array allocation would allocate an array of size zero.
This would then later lead to out of bounds memory reads.
Now the code will skip zero length allocations.
|
|
As the surface normal is calculated along with the coordinates, the
surface depth was always being used when surface orientation was set.
Therefore, even calculated, ignore the surface depth when it is not
required.
Also promote an optimization when neither orientation nor depth is required.
|
|
called in threaded context.
At least Depsgraph evaluation and liboverride diffing do process IDs in
parallel, so python code in py-defined properties should not access any
data outside of their owner ID.
Ref. T100203.
|
|
property with custom getter function.
As suggested by @brecht, use the `BPy_BEGIN`/`END_ALLOW_THREADS` macros.
Note that there may be other bits of code needing this too.
|
|
|
|
This patch causes the render buffers to be copied to the denoiser
device only once before denoising and output/display is then fed
from that single buffer on the denoiser device. That way usually all
but one copy (from all the render devices to the denoiser device)
can be eliminated, provided that the denoiser device is also the
display device (in which case interop is used to update the display).
As such this patch also adds some logic that tries to ensure the
chosen denoiser device is the same as the display device.
Differential Revision: https://developer.blender.org/D15657
|
|
|
|
|
|
Follow-up to design discussions here at the studio, add liboverride
operations into their own sub-menu, with three main entries:
- Create: Create, or enable for user editing, override hierarchies.
- Reset: Keep overrides data, but reset all local changes to the
reference linked data values.
- Clear: like reset, but also turn editable overrides back to system
overrides (aka non user editable).
Those three options can all operate either on the selected items, their
content only, or both.
Advanced operations are moved into a "Troubleshoot Hierarchy" sub-menu,
where one can resync, resync enforced, and fully delete library
overrides. Those operations always affect a whole override hierarchy,
regardless of which items are selected or not.
|
|
|
|
|
|
|
|
In complex scenes featuring thousands of connections between IDs in
their liboverride hierarchies (e.g. Heist files), the time required to
check if tree items were available (before allocated a new one) would
become insanely long (O(n^2)).
This commit brings it back to roughly a constant time, only re-checking
the whole array for unused items once in a while (once every 10k times
currently), since in almost all cases is the index after `lastused`
value is not unused, and you have reached the end of the currently used
array of items, you actually need to 'allocate' a new one anyway.
It also improves the handling of `lastused` index, in particular in
`tse_group_add_element`.
This makes switching to the Outliner override hierarchy view in Heist
scenes from virtually infinite time (more than 30mins for sure) to about
20 seconds on my machine. Still far from being effectively usable.
Note that this is only a bandaid fix anyway, root of the issue is that
this view has to deal with way too many items in its tree, current code
is not designed for that. Either outliner has to improve its tree
handling (by only building subsets of the whole tree maybe?), or we have
to cull/filter out some of the ID relationships between overridden IDs
to make this view actually usable. Maybe limit the depth of the tree?
|
|
Fix wrong assumption that 'embedded' IDs are only ever used by their
owners. This is especially not true with shape keys.
Also small optimization by adding an eraly abort when both IDs are the
same (i.e. an ID has a pointer to itself).
|
|
In some cases, there is a chance code already knows who might be the
owner of the given ID, in which case it can be more efficient to check
it first (especially in cases like embedded node trees or scene
collections, where the only other way is to loop over all possible
owners currently).
Will be used in next commit in some Outliner fix.
|
|
The use of `float` for intermediate intersection record led to some
inaccuracy which caused flickering in intersection lines. Now fixed.
|