Age | Commit message (Collapse) | Author |
|
Error exposed by ba49345705a3. Code just assumed that the tree-element
pointed to a real ID, but this is often not the case, and the ID pointer
contains completely different data. E.g. before ba49345705a3, it would
be a pointer to one of the `Main` listbases, so this code would have
undefined behavior. Now the pointer is null for elements in the "Current
File" element, causing a null-pointer dereference rather than undefined
behavior (that just happened to virtually always result in the intended
code path).
|
|
This implements the spherical brush and different falloff
modes for the Snake Hook brush.
Differential Revision: https://developer.blender.org/D14408
|
|
The indirect library data icon was just a grayed out version of the
regular one. This graying out is now done in code, so the icon can be
removed from the SVG. Note that the icon is still defined as
`ICON_LIBRARY_DATA_INDIRECT` (or `LIBRARY_DATA_INDIRECT` in BPY).
|
|
Use the pass-through matching the view3d.select operator.
|
|
The lines paint mask IBO extraction was not implemented for GPU subdivision.
For it to work, we also now need to preserve the subdivision loop to
subdivision edge map, which until now was overwritten to store coarse edges
(the map to coarse edges is still preserved).
Also the paint flag stored in the 4th dimension of the loop normal buffer
was not properly set for flat shaded faces, leading to other kind of
artefacts and render issues.
|
|
|
|
The problem was when the stroke had less weights that the total number of vertex groups.
The API checked the total number of groups, but this is not required because `BKE_defvert_find_index` returns NULL is the vertex group index does not exist.
|
|
partial overrides of a same hierarchy.
If creating partial hierarchy overrides (from the outliner e.g.), that
need to create extra overrides, those could be re-created everytime,
leading to very bad situation where there would be several overrides of
the same reference ID in the same override hierarchy.
This fix makes it so that existing overrides in a given hierarchy will
always be re-used in case other overrides are added to the hierarchy.
|
|
Replaces old-style memzero-style of call with zero-initializer.
Allows to shorten typical initialization code to a single line:
Object foo = blender::dna::shallow_zero_initialize<Object>()
This will allow to more easily convert designated initializer
which is often used to fill object with zeroes to the explicit
function calls:
MyDNAStruct foo = {};
will be translated to
MyDNAStruct foo = blender::dna::shallow_zero_initialize<MyDNAStruct>();
Differential Revision: https://developer.blender.org/D14486
|
|
Previously, those methods would destruct and reconstruct
the data structure. While that was more simple in initial
implementation, it has some downsides which are not resolved:
* Already allocated memory is lost. So new memory would have
to be allocated when the data structure is refilled.
* The clearing process itself was slower because it did unnecessary
work.
|
|
Use shallow_copy, no need in copy_memory.
The latter appeared as some last minute solution for a compilation
warning on Friday.
|
|
This simplifies debugging, and can help improve performance
by making it easier for the compiler.
More optimization might still be possible by using `__restrict` in
a few places.
|
|
|
|
Value-initialization has the potential to be more efficient.
Also, the code becomes simpler.
|
|
Value initialization differs from default-construction in that it
also zero-initializes trivial types.
|
|
Regression in [0] which removed a special check when tweak events ended.
Add a similar check for drag events that runs drag is disabled in the
main event handling loop.
[0]: 4986f718482b061082936f1f6aa13929741093a2
|
|
Caused by oversight in 0e38002dd5dd. Constant x/y value was used to
calculate transition instead of pixel x/y coords.
|
|
Since e49bf4019b49, animation is handled explicitly. Split operator
wasn't updated.
Re-use backup-duplicate-restore animation functions, that other
operators use for splitting.
|
|
Regression in [0] error iterating over pose bones which only used the
active-object, also follow the same logic as edit-mode for using the
local-matrix.
[0]: d052169e7e4b84b5d621fcbf15b187a4951f1f70
|
|
Regression in [0], also use pad buffer by 1 instead of 2 which is no
longer needed as the trailing slash is no longer added
after allocating the string.
0682af0d63a44b050d57bdaf7699e364a311d711
|
|
This is meant to allow using C++ data structures in this file
as a performance improvement. Particularly `Vector` instead
of `ListBase` for `duplilist`. This changes builds on all
platforms on the buildbot.
|
|
This is meant to allow using C++ data structures in this file
as a performance improvement. Particularly `Vector` instead
of `ListBase` for `duplilist`. This change builds and passes
tests on all platforms on the buildbot.
|
|
Also correct an enum value from review of D14475.
|
|
This is meant to allow using C++ data structures in this file
as a performance improvement. Particularly `Vector` instead
of `ListBase` for `duplilist`.
Differential Revision: https://developer.blender.org/D14475
|
|
If the `Automatic Constraint` modifier was activated while an axis
constraint was already set, the orientation used would be the default
orientation of the mode and not that of the scene.
This was because the `initSelectConstraint` function was not called in
this case and the `Automatic Constraint` mode was enabled by other
indirect means.
So the solution is to call `initSelectConstraint` in either case and
remove these "indirect means" of enabling `Automatic Constraint`.
|
|
Contrary to the initial intention (in rB9916e0193c36), `TREDRAW_SOFT`
flag, when isolated, is not cleared in `transformApply` and therefore is
used in the `drawTransformApply` callback which basically recalculates
the `transformation` which finally clears the flag.
So remove the `drawTransformApply` callback so `transformApply` is not
called when unnecessary.
Differential Revision: https://developer.blender.org/D14430
|
|
`SNAP_ONLY_ACTIVE` was implemented in order to be used in the Knife tool,
but the project did not go ahead.
|
|
The solution supposedly listed all cases that `absolute grid snapping`
was supported. But it ignored some occasions like: Editing Surface
objects, Texture Space.
List now only the cases where this feature should not be supported.
|
|
This makes the flow clearer and avoids many `else` conditions.
|
|
The Library Overrides display mode is meant to show overridden
properties from the current file only, not library overrides in
data-blocks that just were linked in. The upcoming Hierarchies view mode
for Library Overrides will also display linked in data-blocks that have
overrides in the source file (but not the individual overridden
properties), see T95802.
|
|
This was a mistake in the conditional structure introduced in 4b35d6950d4f
This commit also adds a new type of snap exclusion: `SNAP_NOT_EDITED`.
Thanks to @Ethan1080 for pointing out the error.
|
|
Following the logic is not necessary to check the mouse button because the status has changed before.
|
|
|
|
|
|
Crashed e.g. FBX exporter.
Mistake in rB0c33e84020deca.
|
|
|
|
Relying on checks for the assignment of return arguments isn't so
clear especially when there are multiple return arguments.
|
|
Python 3.10's syntax errors can specify a range.
Use this for text editor error selection.
|
|
Names filename/filepath/fn were used interchangeably.
|
|
This broke between 3.0 and 3.1, upgrading to Python 3.10 seems the
likely cause as this code didn't change.
|
|
Reduces noise in D9752, no functional change as PyErr_NormalizeException
doesn't do anything when there is no exception set.
|
|
Also rename DNA struct members.
|
|
|
|
See T85728
|
|
See T85728
|
|
In preparation for supporting packing of UDIM tiled textures, this patch
refactors a small portion of image.cc. The refactor should lead to less
duplicate code now and when Tiled images are added in the near future.
This patch is based on the prior work done for D6492 where it was
requested this part be split and can be summarized as follows:
- `load_sequence_single` is removed and merged with `load_image_single`
- `image_load_sequence_file` is removed and merged with `image_load_image_file`
Reviewed By: lukasstockner97
Differential Revision: https://developer.blender.org/D14327
|
|
On Windows/MSVC this gives a minor (~20%) speedup presumably due to a faster float/int formatter. On macOS (Xcode13), this gives a massive speedup, since snprintf that is in system libraries ends up spending almost all the time inside some locale-related mutex lock.
The actual exporter code becomes quite a bit smaller too, since it does not have to do any juggling to support std::string arguments, and the buffer handling code is smaller as well.
Windows (VS2022 release build, Ryzen 5950X 32 threads) timings:
- Blender 3.0 splash scene (2.4GB obj): 4.57s -> 3.86s
- Monkey subdivided level 6 (330MB obj): 1.10s -> 0.99s
macOS (Xcode 13 release build, Apple M1Max) timings:
- Blender 3.0 splash scene (2.4GB obj): 21.03s -> 5.52s
- Monkey subdivided level 6 (330MB obj): 3.28s -> 1.20s
Linux (ThreadRipper 3960X 48 threads) timings:
- Blender 3.0 splash scene (2.4GB obj): 10.10s -> 4.40s
- Monkey subdivided level 6 (330MB obj): 2.16s -> 1.37s
The produced obj/mtl files are identical to before.
Reviewed By: Howard Trickey, Dalai Felinto
Differential Revision: https://developer.blender.org/D13998
|
|
Left over from rBaab5ac25f2c2e6fbc50f9fb352e71ef0ae0ba2f1
|
|
A user asked for this increase. The performance lags when reaching
the upper limit of this number of segments, but if you need that
many segments, I guess you are willing to wait.
|
|
|