Age | Commit message (Collapse) | Author |
|
This patch adds the drag and drop strip previews in the VSE.
It also adds two new functions to the drag and drop API.
1. "draw_in_view" for callbacks that wants to draw elements in local viewport coordinates
2. "on_drag_start" that can be used for prefetching data only once at the start of the drag.
Reviewed By: Julian, Campbell
Differential Revision: http://developer.blender.org/D14560
|
|
When using an offset modifier on a grease pencil object, the performance
could be impacted due to the randomize option introduced by rB6a2bc40e0131.
Even if the option was not used (offset, rotation, scale set to zero), the modifier
would still compute the random transformation matrix.
The patch checks if the randomization is used and only then caluclates the matrix.
Reviewed By: #grease_pencil, antoniov
Differential Revision: https://developer.blender.org/D14553
|
|
This warning exists in gcc 9.4.0, apparently because the variable
is not used in some `constexpr` code paths.
|
|
|
|
As the default handle type in Blender is 'Auto Clamped' the Equalize
Handles operator will often appear to have no affect on the selected
keyframes on which it is run. If either of the keyframes' handle types
are 'Auto', 'Auto Clamped', or 'Vector', this patch will convert the
handles to 'Aligned'.
Reviewed By: sybren
Maniphest Tasks: T96476
Differential Revision: https://developer.blender.org/D14345
|
|
Also use back-slashes for doxy commands.
|
|
|
|
|
|
Caused by db622b5a0bea32cb3a78c0a4c7d4372a9178d27e
|
|
Use "transform" instead of "obmat", because the meshes
don't necessarily come from objects.
|
|
Since rBfa43c47c7cb8446b632a4c0f712162ba615fe51f the progress bar do not
show the compilation progress. This was misleading as users could think
it could be canceled or prevent rendering.
Now we just show how many shaders are still in the compilation queue inside
each viewport. This number is more accurate than the percentage that was
previously displayed in the progress bar.
|
|
This uses refcounter instead of double thread mutexes. This should be
more robust and avoir use after free situation.
Also remove redundant structures and the use of scene as the job owner.
|
|
|
|
Removal of the `WM_redraw_windows` call in `wm_file_write` introduced
in rB7a9cfd08a8d7415ff004809cf62570be9152273e as that can cause
crashing while saving from a script.
See D14780 for more details.
Differential Revision: https://developer.blender.org/D14780
Reviewed by Campbell Barton
|
|
Addressing the TODO from the comment isn't a priority at the moment,
and should be solved a bit more generally anyway.
|
|
The PBVH draw cache wasn't being invalidated in
all cases. It is now invalidated whenever a PBVH
node's draw buffers are freed.
|
|
At least on the Mac, `std::sort` sometimes passes the same value in the
`a` and `b` parameters.
The `true` return is only for cases where `a` is less than `b`.
|
|
|
|
rB08731d70bf66 was not properly checking if subdivision needs to be
evaluated on the CPU.
Thanks Ray Molenkamp for noticing.
|
|
This is to avoid use after free when the `GPUPass` gets compiled after the
original `GPUMaterial` used to create it was freed.
The issue was introduced by rBfa3bd17ae873
|
|
This is not performance critical so using the same global lock should not
pose any issue.
|
|
The subdivision is always recomputed on the CPU when displaying stats
if the mesh is animated which leads to bad performance.
This caches the subdivision topology counters from the draw code in the
mesh runtime and uses them for the viewport statistics.
Differential Revision: https://developer.blender.org/D14774
|
|
The crash is caused as the subdivision wrapper does not have loop
normals, which are generally computed at the end of the modifier stack
evaluation via `mesh_calc_modifier_final_normals`. (Note that they are
initially computed, but deleted by the subdivision wrapper creation.)
This records in the mesh runtime whether loop normals should have been
computed and computes them alongside the subdivision wrapper.
Differential Revision: https://developer.blender.org/D14489
|
|
|
|
There are a number of shaders, most notably grid_frag.glsl, which rely on default assignments to uniform values within shaders. This is not currently supported by the shader uniform push model implemented for the Metal backend, wherein uniform updates are pushed as a singular block of data. Any default assignment would become over-written.
As such, adding assignments of these default values in the high-level, to ensure the correct value is written for all APIs. This likely impacts Vulkan push-constants as well.
Authored by Apple: Michael Parkin-White
Ref T96261
Reviewed By: fclem
Maniphest Tasks: T96261
Differential Revision: https://developer.blender.org/D14555
|
|
surrounding functionality.
This covers implementation of the GPUTexture abstraction for the Metal backend, with additional utility functionality as required.
Some components have been temporarily disabled pending dependencies on upcoming Metal backend components, and these will be addressed as the backend is fleshed out.
One core challenge addressed in the Metal backend is the requirement for read/update routines for textures. MTLBlitCommandEncoders offer a limited range of the full functionality provided by OpenGLs texture update and read functions such that a series of compute kernels have been implemented to provide advanced functionality such as data format conversion and partial/swizzled component updates.
This diff is provided in full, but if further division is required for purposes of code review, this can be done.
Authored by Apple: Michael Parkin-White
Ref T96261
Reviewed By: fclem
Maniphest Tasks: T96261
Differential Revision: https://developer.blender.org/D14543
|
|
When more than one, consecutive, subdivision modifier is used on a Mesh,
the last subsurf modifier is used for GPU subdivision even though it
might be disabled. This is because retrieving the last subsurf modifier
in the draw code did not check whether the modifier was disabled or not.
To fix this, the session UUID of the modifier which delegated evaluation
to the GPU code is cached and used in the draw to select the right subsurf
modifier.
Differential Revision: https://developer.blender.org/D14488
|
|
|
|
Use C++ types instead of GHash to make code easier to read and simpler.
Differential Revision: https://developer.blender.org/D14758
|
|
Adds a column to the right in the Library Overrides Hierarchies view
mode to toggle editability of library overrides.
Note that making a library override non-editable currently involves
clearing all overridden properties. This is an arguable design choice,
we should probably at least warn the user before doing this.
Part of T95802.
Reviewed by: Bastien Montagne
Differential Revision: https://developer.blender.org/D14653
|
|
The code to compare buttons from the previous to the current frame, to
see if they match (an thus should keep the same state) was quite
generic, and didn't allow much flexibility/customization. For some
cases this isn't enough, and a more specific comparison is needed. Say
if some buttons don't actually store comparable data themselves, only
via the button context. This was the case in D14653.
|
|
It was possible to set context pointers for buttons via the layout, but
not for buttons in places where the layout system wasn't used (where
buttons are placed manually). This is needed for buttons in the
Outliner, see D14653.
|
|
The good thing is that this fix also makes function evaluation a bit faster.
|
|
Remove the experimental option for named attributes nodes show they are
always available.
Ref T91742
|
|
Goals:
* Better high level control over where devirtualization occurs. There is always
a trade-off between performance and compile-time/binary-size.
* Simplify using array devirtualization.
* Better performance for cases where devirtualization wasn't used before.
Many geometry nodes accept fields as inputs. Internally, that means that the
execution functions have to accept so called "virtual arrays" as inputs. Those
can be e.g. actual arrays, just single values, or lazily computed arrays.
Due to these different possible virtual arrays implementations, access to
individual elements is slower than it would be if everything was just a normal
array (access does through a virtual function call). For more complex execution
functions, this overhead does not matter, but for small functions (like a simple
addition) it very much does. The virtual function call also prevents the compiler
from doing some optimizations (e.g. loop unrolling and inserting simd instructions).
The solution is to "devirtualize" the virtual arrays for small functions where the
overhead is measurable. Essentially, the function is generated many times with
different array types as input. Then there is a run-time dispatch that calls the
best implementation. We have been doing devirtualization in e.g. math nodes
for a long time already. This patch just generalizes the concept and makes it
easier to control. It also makes it easier to investigate the different trade-offs
when it comes to devirtualization.
Nodes that we've optimized using devirtualization before didn't get a speedup.
However, a couple of nodes are using devirtualization now, that didn't before.
Those got a 2-4x speedup in common cases.
* Map Range
* Random Value
* Switch
* Combine XYZ
Differential Revision: https://developer.blender.org/D14628
|
|
The new name is `Internal Dependencies`.
* Is more inline with the general goal of the panel.
* Can also show which external objects are used in the node tree in the future.
This name was choosen in the geometry nodes submodule meeting (2022-04-25).
Differential Revision: https://developer.blender.org/D14752
|
|
|
|
The large call stack can be slightly annoying, and it's possible that
invoking TBB in this case corresponds to some overhead like
e1309030603980c6b.
|
|
This macro allows defining a default argument for when the translation
unit is compiled in C++. Otherwise (in C), the argument has to be passed
explicitly.
A couple of benefits:
* Default arguments are a nice quality-of-life feature in C++. It's
annoying if these can't be used in C++ files, just because the header
with the function declaration still needs to be C compatible.
* Adds useful information to the API declaration. E.g. that an argument
can be nullptr.
* Should help us to move to using default arguments more, helping
readability (arguably)
Used in D14653.
Reviewed By: LazyDodo
Differential Revision: https://developer.blender.org/D14654
|
|
This commit adds support for the curves object to the apply modifier
operator. A warning is added when the evaluated result of the modifier
doesn't contain any curves data.
Differential Revision: https://developer.blender.org/D14730
|
|
Implementing removal of anonymous attributes with `GeometryComponent`
instead of `Mesh` makes it more reusable for other types like curves.
|
|
Differential Revision: https://developer.blender.org/D14748
|
|
Motion paths can now be initialised to more sensible frame ranges,
rather than simply 1-250:
- Scene Frame Range
- Selected Keyframes
- All Keyframes
Reviewed By: sybren, looch, dfelinto, pablico
Maniphest Tasks: T93047
Differential Revision: https://developer.blender.org/D13687
|
|
Crashing in background mode was reported as part of T78854,
disable via the poll function to give a useful error in background mode.
|
|
Add missing check as the context override dict may have been copied
since it was assigned, also initialize the context manager with
PyType_Ready, while it didn't cause any errors - it's expected
that all types are initialized.
|
|
The pointer size was incorrectly being used instead of the float size.
|
|
|
|
Also use bool array for true/false values.
|
|
|
|
- Use filepath instead of file.
- Use relbase instead of relpath.
In both cases the new names are used more frequently throughout
exiting functions.
|