Age | Commit message (Collapse) | Author |
|
Also hyphenate 'mouse-move' use doxy sections in render_update.c &
move function comment from the header to the source.
|
|
The multi-function network system was able to compose multiple
multi-functions into a new one and to evaluate that efficiently.
This functionality was heavily used by the particle nodes prototype
a year ago. However, since then we only used multi-functions
without the need to compose them in geometry nodes.
The upcoming "fields" in geometry nodes will need a way to
compose multi-functions again. Unfortunately, the code removed
in this commit was not ideal for this different kind of function
composition. I've been working on an alternative that will be added
separately when it becomes needed.
I've had to update all the function nodes, because their interface
depended on the multi-function network data structure a bit.
The actual multi-function implementations are still the same though.
|
|
Avoid API misuse that caused leaks in T90791 &
2788b0261cb7d33a2f6f2978ff4f55bb4987edae.
|
|
This function only makes sense for undo which doesn't
initialize the meshes ID. Otherwise BKE_id_free should be used.
|
|
Error in 2788b0261cb7d33a2f6f2978ff4f55bb4987edae.
|
|
It wasn't obvious this didn't free the memory of the mesh it's self
leading to memory leaks.
|
|
|
|
|
|
Packedfiles need some special attention when writing Image to disk.
Source: D12242, Jeroen Bakker (@jbakker), thanks.
|
|
Several pure runtime data in this ID type were not properly cleared by
write/read processes.
Note that the initial undo step (the one leading back to initial read
file state) is still forcing re-load of image, for some reasons.
Common investigation together with Jeroen Bakker (@jbakker), thanks. See
also D12242.
|
|
callbacks.
This was not really useful, and added estra useless steps in case and ID
should not actually be written.
Further more, it prevented clearing the usercount on write, which can be
cause a false positive 'chanhged' detection in undo/redo case.
|
|
This patch exposes the Cycles Alembic Procedural through the MeshSequenceCache
modifier in order to use and test it from Blender.
To enable it, one has to switch the render feature set to experimental and
activate the Procedural in the modifier. An Alembic Procedural is then
created for each CacheFile from Blender set to use the Procedural, and each
Blender object having a MeshSequenceCache modifier is added to list of objects
of the right procedural.
The procedural's parameters derive from the CacheFile's properties which are
already exposed in the UI through the modifier, although more Cycles specific
options might be added in the future.
As there is currently no cache controls and since we load all the data at the
beginning of the render session, the procedural is only available during
viewport renders at the moment. When an Alembic procedural is rendered, data
from the archive are not read on the Blender side.
If a Cycles render is not active and the CacheFile is set to use the Cycles Procedural,
bounding boxes are used to display the objects in the scene as a signal that the
objects are not processed by Blender anymore. This is standard in other DCCs.
However this does not reduce the memory usage from Blender as the Alembic data
was already loaded either during an import or during a .blend file read.
This is mostly a hack to test the Cycles Alembic procedural until we have a
better Blender side mechanism for letting renderers load their own geometry,
which will be based on import and export settings on Collections (T68933).
Ref T79174, D3089
Reviewed By: brecht, sybren
Maniphest Tasks: T79174
Differential Revision: https://developer.blender.org/D10197
|
|
Originally D11886 by @ghaspias with minor edits applied.
|
|
Embedded IDs (root nodetrees, master collection, etc.) pointer itself is
not editable, but their content may be overridden.
LibOverride code is supposed to know how to handle those embedded IDs.
|
|
Removes the artificial requirement that UDIM tile sets start at 1001.
Blender was already capable of handling sparse tile sets (non-contiguous
tiles) so the restriction around starting at 1001 was unnecessary in
general.
This required fixing a few UDIM-related python bugs around manually
updating the `tile_number` field on images as well. See the differential
for details. No script changes are necessary but they will now work,
correctly, in many more cases.
Differential Revision: https://developer.blender.org/D11859
|
|
There was an unreported bug that switch direction would not switch the order of the vertex group weights. This caused join to do it wrong as well.
Changed to use `BLI_array_reverse` function here to reverse both the normal points and the weights, therefore simplifying the code.
Differential Revision: https://developer.blender.org/D12251
|
|
This patch adds the missing ability to keep the vertex groups when converting to a grease pencil object. This is increadible useful to create rigged grease pencil objects which move together with rigged meshes.
Differential Revision: https://developer.blender.org/D12249
|
|
|
|
When adding a range of tiles, the operator could incorrectly calculate
the end_tile. It would not account for the start_tile itself and the
IMA_UDIM_MAX value was 1 too small. This is most noticeable when
attempting to fill the entire supported range of tiles.
Differential Revision: https://developer.blender.org/D11857
|
|
Would cause crashes in files that had lingering invalid sound sequences around.
For example our tests/render/volume/fire.blend test file.
|
|
|
|
The duration and start time for audio strips were not correctly read in
audaspace.
Some video files have a "lead in" section of audio that plays before the
video starts playing back. Before this patch, we would play this lead in
audio at the same time as the video started and thus the audio would not
be in sync anymore.
Now the lead in audio is cut off and the duration should be correctly
calculated with this in mind.
If the audio starts after the video, the audio strip is shifted to
account for this, but it will also lead to cut off audio which might not
be wanted. However we don't have a simple way to solve this at this
point.
Differential Revision: http://developer.blender.org/D11917
|
|
Before we didn't encode the audio up until the current frame.
This lead to us not encoding the last video frame of audio.
Reviewed By: Richard Antalik
Differential Revision: http://developer.blender.org/D11918
|
|
We didn't flush audio after encoding finished which lead to audio
packets being lost.
In addition to this the audio timestamps were wrong because we
incremented the current audio time before using it.
Reviewed By: Richard Antalik
Differential Revision: http://developer.blender.org/D11916
|
|
|
|
Add color data type comparison for meshes, adding it as
part of comparing meshes with geometry nodes applied.
Reviewed By: JacquesLucke
Differential Revision: https://developer.blender.org/D12192
|
|
liboverride-resynced libs.
This extra info is not always needed/convinient to use, and requires
special attention to free the list, so allow not generating it.
|
|
Add a debug-only check regarding consistency of the cache (mapping from
objects to their bases) for a given ViewLayer.
Issues can happen otherwise when some code does remapping of objects,
and forgets to call `BKE_main_collection_sync_remap()` (which clears
those caches) instead of `BKE_main_collection_sync()`.
|
|
This reverts commit 41e650981861c2f18ab0548e18851d1d761066ff.
This broke "CubeMaskFirst" test.
Any value even slightly outside the [-1.0..1.0] range
caused the result to be nan, which can happen when calculating
the dot-product between two unit length vectors.
|
|
This was left over from when these scripts were loaded as modules,
where their names needed to be compatible with Pythons module naming.
Version patch existing files so text with register enabled
without a `.py` extension wont start executing on startup.
Resolves T89532.
|
|
The clamped version of acos isn't needed as degenerate (nan) coordinates
result in zeroed vectors which don't need clamping.
|
|
This supported calculating normals for MPoly array which was copied to
an MFace aligned array.
Remove the functions entirely since MFace use is being phased out and
these function isn't used anywhere.
|
|
Use BKE_mesh_calc_normals instead of
BKE_mesh_calc_normals_mapping_simple for curve modifier calculation.
This only made sense for derived-mesh which is no longer used.
|
|
Use capitalization, remove unnecessary ellipsis.
|
|
Remove the 'only_face_normals' argument.
- BKE_mesh_calc_normals_poly for polygon normals.
- BKE_mesh_calc_normals_poly_and_vertex for poly and vertex normals.
Order arguments logically:
- Pair array and length arguments.
- Position normal array arguments (to be filled) last.
|
|
Optimize mesh normal calculation.
- Remove the intermediate `lnors_weighted` array, accumulate directly
into the normal array using a spin-lock for thread safety.
- Remove single threaded iteration over loops
(normal calculation is now fully multi-threaded).
- Remove stack array (alloca) for pre-calculating edge-directions.
Summary of Performance Characteristics:
- The largest gains are for single high poly meshes, with isolated
normal-calculation benchmarks of meshes over ~1.5 million showing
2x+ speedup, ~25 million polygons are ~2.85x faster.
- Single lower poly meshes (250k polys) can be ~2x slower.
Since these meshes aren't normally a bottleneck,
and this problem isn't noticeable on large scenes,
we considered the performance trade-off reasonable.
- The performance difference reduces with larger scenes,
tests with production files from "Sprite Fight" showing
the same or slightly better overall performance.
NOTE: tested on a AMD Ryzen TR 3970X 32-Core.
For more details & benchmarking scripts, see the patch description.
Reviewed By: mont29
Ref D11993
|
|
Under some circumstances the normals were not tagged dirty
even though they are.
|
|
Disable wrapping when "scale to fit" is used, assert the error is
small so an invalid scale-to-fit value wont go by unnoticed.
|
|
Was reported for a file which does not have an active track set in
AnimData even though it was in strip twek mode (but this was accessed in
is_nlatrack_evaluatable()).
Root cause for this is not totally clear, but I assume the situation is
described as part T87681 (and is fixed in D11052).
This patch here just prevents the crash for files that are already in the
borked state.
Reviewers: sybren
Maniphest Tasks: T89805
Differential Revision: https://developer.blender.org/D12085
|
|
Add Apply Constraint, Duplicate Constraint, and Copy To Selected
operators, and include them in a menu similar to the menu for modifiers.
The shortcuts in the extras menu are also matched to modifiers.
All the here added operators are intended to work exactly like the
analogous ones for modifiers. That means the apply operator should apply
a constraint as if it was first in the list, just like modifiers do. I
have added the same warning message as for modifiers when that happens.
The decision to use this approach of appling the constraint as if it was
first, was made for consistency with modifiers. People are already used
to how it works there. Is also provides more intricate control over the
applied transforms, then just applying all constraints up to that one.
Apply all constraints is already kinda implemented in Bake Animation.
Reviewed By: HooglyBoogly, sybren, #user_interface
Differential Revision: https://developer.blender.org/D10914
|
|
|
|
|
|
function.
|
|
Idea for 3.0 is to disable all functionality that isn't well polished
and focus on those parts first. Starting with poses.
* Adds a new experimental option "Extended Asset Browser", replacing
"Asset Browser".
* Unlike the previous option, this isn't enabled by default anymore.
This didn't work well in practice and caused plenty of confusion.
* "Mark as Asset" and "Clear Asset" are hidden if the option is
disabled.
* Same for the category selection in the Asset Browser.
* Always show display the "Only Assets" option in the File Browser while
browing inside .blend files. That way you can hide data-blocks that
are not pose assets.
* The Asset Library setup UI in the Preferences is always visible now,
it's needed for pose library access.
Addresses T90181, T90180 and T90300.
Differential Revision: https://developer.blender.org/D12120
|
|
ID data-blocks that could be accessed from Python and weren't freed
using BKE_id_free_ex did not release the Python reference count.
Add BKE_libblock_free_data_py function to clear the Python reference
in this case.
Add asserts to ensure no Python reference is held in situations
when ID's are copied for internal use (not exposed through the RNA API),
to ensure these kinds of leaks don't go by unnoticed again.
|
|
This function doesn't free the collection, only it's memory.
|
|
Done at the request of Sergey.
|
|
Added the comparison of non-generic attributes with generic
attributes in the same loop to avoid issues with different
order in layer->types of the two meshes.
Reviewed By: JacquesLucke
Differential Revision: https://developer.blender.org/D12149
|
|
Caused by {rB37570a73170e}.
Above commit wasnt taking into account that at this point the link could
still be NULL.
Maniphest Tasks: T90564
Differential Revision: https://developer.blender.org/D12180
|
|
|