Age | Commit message (Collapse) | Author |
|
As noted in T80164, there are quite a few area of Blender where the
"Reset to Default Value" operator in button context menus doesn't work.
Modifiers are one of them, because the DNA defaults system was never
set up for them.
Additionally, this should make modifier versioning easier. Whenever a
new field is added it should be automatically initialized to the
default value.
I had to make some ordering changes in the following modifiers to work
around an error with `-Wsign-conversion` in the macros:
- Solidify Modifier
- Corrective Smooth Modifier
- Screw Modifier
Some modifiers are special cases and are skipped in this commit:
- Data Transfer Modifier
- Cloth Modifier
- Fluid Modifier
- Softbody Modifier
Differential Revision: https://developer.blender.org/D8747
|
|
|
|
Bug and fix has been found by dfelinto, thanks.
|
|
|
|
This was already changed for Material nodetrees on duplication in
rBa75ac18638f4.
Since it is not obvious from the UI how change World actions - and to be
consistent with Material actions, it is best to copy the action as the
default behavior.
So use generic BKE_id_copy functions with LIB_ID_COPY_ACTIONS flag [which
also enables us to get rid of `BKE_world_copy`]
Note: taking the User Preference `USER_DUP_ACT` into account here (for
both material and world actions) could be a followup step.
Maniphest Tasks: T81248
Differential Revision: https://developer.blender.org/D9046
|
|
Those actions are full proper IDs and should therefore not be affected
by flags used to duplicate 'owner' ID own data.
|
|
|
|
Most collection operations should not be allowed when either the scene
or the parent collection are linked or liboverrides.
This commit adds more stricter checks in both polling and execution
aspects of several related operators.
Fix T81282: Crash on instance to scene of a collection of a linked scene.
|
|
The convention is to keep inactive settings editable even if they are grayed
out for having no effect due to other settings.
|
|
Now Wintab is not initialized when starting Blender with the tablet API
preference set to native, since that disables Windows Ink.
Note that changing the tablet API requires restarting Blender for changes
to take effect. This serves as a stopgap to allow use of Windows Ink until
runtime API switching is merged.
Differential Revision: https://developer.blender.org/D9051
|
|
The warning:
runtime error: addition of unsigned offset to 0x61a0000b22d8
overflowed to 0x61a0000b22b8
Fix T81340 (partially)
Reviewed By: campbellbarton
Maniphest Tasks: T81340
Differential Revision: https://developer.blender.org/D9063
|
|
Based on D9069 by @ankitm.
|
|
- Rename `find_elem` to `elem_offset` (matching `elem_exists`).
- Remove unused `SDNA_StructMember` return argument.
- Return an offset instead of a pointer which was being converted
back into an offset by one caller,
in this case there was no way to tell the difference between
and element that doesn't exist and a struct member
at the start of the array.
Resolves UBSan warning raised in T81340.
|
|
This is not an appropriate category for workspaces.
Mistake in 7f564d74f9ed. My intention was probably to add it to the
"Miscellaneous" category.
|
|
Error in 9b6c5268bc20. Also move variable declaration to where it's
used to reduce confusion.
|
|
It looks like this code was left over from tabbed panels in the
properties editor. It wasn't used anywhere except for in one line of
the horizontally-aligned panel code that was recently removed.
Differential Revision: https://developer.blender.org/D8651
|
|
Instead of indenting the entire functional block, check for the error
case and the supported case early to make the code more readable.
|
|
This adds an option to smooth UV boundaries including corners, and renames the
available options to None / Keep Corners / All.
Ref D8413
|
|
This adds the option to either smooth the entire boundary, or to keep
corners sharp, for the Subdivision Surface and Multiresolution modifiers.
This mainly helps with compatibility with other software. The default
behavior remains to smooth the entire boundary.
Differential Revision: https://developer.blender.org/D8485
|
|
This makes subdivision surfaces compatible with the old subdivision
surface modifier and other applications that do not use the limit surface.
This option is available on the Subdivision Surface modifier.
Differential Revision: https://developer.blender.org/D8413
|
|
Implemented Brown-Conrady lens distortion model with 4 radial and
2 tangential coefficients to improve compatibility with other software,
such as Agisoft Photoscan/Metashapes, 3DF Zephir, RealityCapture,
Bentley ContextCapture, Alisevision Meshroom(opensource).
Also older programs: Bundler, CPMVS.
In general terms, most photogrammetric software.
The new model is available under the distortion model menu in Lens
settings.
For tests and demos check the original patch.
Reviewed By: sergey
Differential Revision: https://developer.blender.org/D9037
|
|
Cleanup old tracker task format to the new. e.g: [#34039] to T34039
Ref D8718
|
|
Some of the naming was quite misleading.
|
|
Fixed description of K2 coefficient. It is second coefficient
Reviewed By: Blendify
Differential Revision: https://developer.blender.org/D9050
|
|
|
|
|
|
This is already the most widely used convention.
Use this so `make check_spelling_c` will ignore all email addresses.
|
|
|
|
|
|
The "UI_panel_set_expand_from_list_data" doesn't need to be in the
public API since it's just called every time an instanced panel is added.
This commit just sets the expansion automatically and adjusts some
naming to account for the moved function.
|
|
It's necessary to check if the panels are active before accessing their
data. Thanks to @ankitm for reporting this.
|
|
|
|
Before this change, when users switch from edit mode to sculpt mode, the
entire mesh would be visible. Even if in the edit mesh mode part of it was
set to invisible.
With this change the visibility is preserved, by creating a separate face set
for the visible and invisible parts of the mesh and setting their initial visibility.
Implementation details: This adds a function to initialize a new Face Set
datalayer taking the current mesh visibility into account which is stored
in the ME_HIDE flag of the vertices.
Reviewed By: sergey
Differential Revision: https://developer.blender.org/D8901
|
|
This tool projects all vertices to the right of the plane defined by the
line gesture towards the plane. By doing this, this tool can create cuts
and plane surfaces in the mesh without modifying the geometry or using
boolean operations, so it is much faster than bisecting the mesh for
cases where the geometry was going to be remeshed afterwards.
Added as experimental as it does not have icon.
Reviewed By: sergey, Severin
Differential Revision: https://developer.blender.org/D9021
|
|
|
|
The Python API document of gpu.select.load_id does not follow rst format.
c.f. https://docs.blender.org/api/current/gpu.select.html
This patch fixes it.
Reviewed By: Blendify
Differential Revision: https://developer.blender.org/D8547
|
|
Alternative solution to https://developer.blender.org/D8546
|
|
See
https://www.sphinx-doc.org/en/master/usage/restructuredtext/domains.html#info-field-lists
|
|
This took more than a day to fully investigate and understand, one of
the reasons being that the probability of the issue to show up was
extremely low, and subjected to very specific random factors.
Root of the issue is that, in some very rare cases, a newly read ID
might get the exact same memory address as the one it had when the blend
file was saved.
In that case, `BKE_workspace_active_set` would return immediately, since
the pointer to the active workspace would remain unchanged. But that
lead to having an unset NULL active layout pointer, which would crash
when attempting to get e.g. the active screen.
For the record, I ran into this when running a specific build (master
with one flag added to the `LIB_ID_CREATE` ones, with value `1 << 3`),
using a specific set of options (`--background --factory-startup -noaudio`),
and passing the .blend file from T80090 as argument.
|
|
Remove the attempt to update the active layout pointers of each window
from whithin `direct_link_workspace`.
This piece of code was a nonsense for at least to critical reasons:
* Do not, never, ever, access data from another datablock within the
direct_link_... functions. Just don't. Don't try to be smart.
* Since it was trying (and failing) to update the active layout of every
window for every workspace, it was effectively setting those
`act_layout` pointers to NULL (remapping can only ever happen once,
trying to remap and already remapped new pointer is bound to fail in
any case).
Luckily (and funnily), this piece of code was actually harmless, since
setting the active layout would be overridden/redone later, in
`lib_link_windowmanager`, when updating their `workspace_hook` in
`lib_link_workspace_instance_hook`.
Note that the similar horror with `WorkSpaceDataRelation->parent` (which
points at a window) is kept for now, because that one is needed. Hope to
refactor it soon though.
|
|
Although I haven't seen this cause any visible errors, there is some
incorrect handling for setting panel expansion during search:
- Properly check if child panel is active first
- Don't stop traversal at headerless panels that could theoretically
have children
|
|
Add an option to disable Alembic vertex interpolation.
Bump subversion from 5 to 6.
Alembic stores mesh samples at specific time keys; when a frame in
Blender maps to a timecode between two samples, Blender will interpolate
the mesh vertex positions. This interpolation only happens when the mesh
has a constant topology, but sometimes this was not detected properly
when the vertices change order, but the number of mesh elements remains
the same. This would result in a mesh with jumbled up vertices (T71981).
With this patch, users have the ability to disable vertex interpolation.
An alternative would be to have better detection of topology changes,
but that that'll cause a considerable slowdown.
Maniphest Tasks: T71981
Differential Revision: https://developer.blender.org/D9041
|
|
This modifier can only be added to Volume objects. It takes a mesh
as input and generates a "density" grid near the surface or in
the enclosed volume.
Ref T73201.
Reviewers: brecht
Differential Revision: https://developer.blender.org/D9032
|
|
Previously, one could only select a volume object in the outliner
or by clicking on the object origin. This patch allows you to click
on the actual volume.
Furthermore, the generated (invisible) mesh that is used for
selection is also used to draw an outline for the volume object now.
Reviewers: brecht
Differential Revision: https://developer.blender.org/D9022
|
|
When loading large files that are more than a couple weeks old
(such that DNA has changed in that time), a significant amount of
time is spent in `DNA_struct_reconstruct`. This function takes a struct
in the old layout and creates a struct in the new layout from it.
This was slow because it was computing the diff between the struct
layouts every time a struct is updated. Now the steps for the struct
reconstruction is computed only once per struct. This information is
then used to actually reconstruct all structs that changed.
I measured about 10-20% speedup when loading Spring files.
E.g. `10.6s -> 8.7s` for `06_055_A.anim.blend` in BKE_blendfile_read`.
This percentage varies a lot based on the number of blocks that have
to be reconstructed and how much DNA has changed since they have
been written. In none of my tests was the new code slower than the
old code.
Reviewers: campbellbarton
Differential Revision: https://developer.blender.org/D8959
|
|
|
|
The data layout remains exactly the same..
This change just gives all the elements in `SDNA->structs` names,
making it more comfortable to work with the data.
Reviewers: campbellbarton
Differential Revision: https://developer.blender.org/D8926
|
|
on top in the Image Editor"
This reverts commit 085329f114beb904ed3ef0c8ec6894ee26916704.
It didn't render rendered viewport overlays correctly.
|
|
|
|
Add a dependency graph relation Force Object Animation → Scene Rigid
Body World Rebuild. This ensures that the rigid body world is rebuilt
when a force object is re-tagged for animation updates.
The extra relation doesn't add any new calculations when the animation
is running, as the Time Source node already had a relation to the
scene's `RIGIDBODY_REBUILD` node.
The relation is created directly to the `RIGIDBODY_REBUILD` Operation. I
would have liked to target the containing Component instead. However,
that has the `RIGIDBODY_SIM` operation as entry node, which isn't enough
to actually fix T80121.
Reviewers: Sergey
Differential Revision: https://developer.blender.org/T80121
|