Age | Commit message (Collapse) | Author |
|
|
|
Previously, the code would incorrectly free the passed in custom data
layer even when `CD_ASSIGN` was not used. Now the function actually
supports assigning the data to the layer. This only fixes the case for
custom data layer types that only support a single layer like `CD_MEDGE`.
Informally reviewed by Hans Goudey.
|
|
This patch introduces a new `CacheMutex` which makes it easy to implement
lazily computed caches in e.g. `Curves`. For more details see `BLI_cache_mutex.hh`.
Differential Revision: https://developer.blender.org/D16419
|
|
|
|
The new Xcode 14.1 brings the new Apple Clang compiler which
considers sprintf unsafe and geenrates deprecation warnings
suggesting to sue snprintf instead. This only happens for C++
code by default, and C code can still use sprintf without any
warning.
This changes does the following:
- Whenever is trivial replace sprintf() with BLI_snprintf.
- For all other cases use the newly introduced BLI_sprintf
which is a wrapper around sprintf() but without warning.
There is a discouragement note in the BLI_sprintf comment to
suggest use of BLI_snprintf when the size is known.
Differential Revision: https://developer.blender.org/D16410
|
|
|
|
|
|
Seems like the new audio channel api was not as backwards compatible as we thought.
Therefore we need to reintroduce the usage of the old api to make older ffmpeg version be able to compile Blender.
This change is only intended to stick around for two releases or so. After that we hope that most Linux distros ship
ffmpeg >=5.0 so we can switch to it.
Reviewed By: Sergey
Differential Revision: http://developer.blender.org/D16408
|
|
|
|
This is not the case though, the modifier act explicitly on mesh edges,
if no tesselated mesh is provided, it would simpy early out and do
nothing.
Now always disable the "Apply on Spline" option with a tip that this
modifier can only smooth the tesselated curve (not the underlying curve
control points). Similar to rB1a6b51e17502.
Fixes T102060.
Maniphest Tasks: T102060
Differential Revision: https://developer.blender.org/D16386
|
|
|
|
Use the node topology cache and avoid modifying the node tree
in a non-threadsafe way to improve the predictability of using
the helper function. Replaces the implementation from
e0d40471364aafca967b6ebd52.
|
|
5060f26f500997232aa1033c3d5
|
|
|
|
|
|
These functions provided little benefit compared to simply setting
the function pointers directly.
|
|
Since these values are only ever 0/1, use bool type.
|
|
|
|
|
|
Currently there are both "EDGERENDER" and "EDGEDRAW" flags, which are
almost always used together. Both are runtime data and not exposed to
RNA, used to skip drawing some edges after the subdivision surface
modifier. The render flag is a relic of the Blender internal renderer.
This commit removes the render flag and replaces its uses with the
draw flag.
|
|
|
|
Regression in [0], however the primary purpose of that code was to
cycle away from the active object (behavior which was intentionally
removed, see: T96752).
This broke weight-paint + pose-selection (Ctrl-LMB)
when the GPU depth picking preference was disabled.
Causing selection to pick the mesh object instead of the pose bones.
This de-selected the armature, making the pose bones unselectable
instead of selecting the pose bone as intended.
Adding the old code back (restricting it to weight-paint mode)
fixes the bug but reintroduces fairly involved logic unnecessarily.
Instead, prioritize bone selecting when in weight-paint & pose mode
(previously this was only done in pose-mode).
[0]: b1908f2e0b23988627772f6a6d968d8351dca6d7
|
|
|
|
The regression is caused by D13824 0f89bcdbebf5.
This fix follows the code from Sybren (D7785) to make object-mode
drivers from shapekey value to work. This intuitively makes sense
since the D13824 made the edit mode evaluation and ownership follow
the object mode more closely.
Differential Revision: https://developer.blender.org/D16380
|
|
The non-deprecated API dates back to 2017, so it should be safe
to simply migrate to it.
Fixes verbose error prints, making it easier to see actual issues.
Differential Revision: https://developer.blender.org/D16370
|
|
This reverts commit 666135c32af3032d1e6c62ee953d65f399da7d0f.
|
|
|
|
|
|
* BLENDER_VERSION_CYCLE set to beta
* Update pipeline_config.yaml to point to 3.2 branches and svn tags
* Update and uncomment BLENDER_VERSION in download.cmake
|
|
In high poly meshes the reprojections after remesh can become slow.
This parallelizes reprojection of face sets, paint mask and vertex paint.
It also adds flags to disable dependency graph updates on
setting remesh options to remove UI lag.
Profiling of remeshing a 3.4M poly mesh (in sculpt mode):
Before: 19.6s
After: 8.7s
Differential Revision: https://developer.blender.org/D15638
|
|
The goal is to improve clarity and readability, without
introducing big design changes.
Follows the recent obmat to object_to_world refactor: the
similar naming is used, and it is a run-time only rename,
meaning, there is no affect on .blend files.
This patch does not touch the redundant inversions. Those
can be removed in almost (if not all) cases, but it would
be the best to do it as a separate change.
Differential Revision: https://developer.blender.org/D16367
|
|
The position attribute might not exist when the mesh is empty, which may
be another problem, but there is no need to count on it here.
|
|
**Problem**
Currently multiple input sockets are created when a new node group is
made from selected nodes. Some of these are linked from the same source.
It is not convenient to sort out and remove multiple input sockets that
represent the same input. These inputs usually have meaningless names
like 'value', 'x', etc.
**Solution**
Create common input sockets for each link starting from the same input.
Move links inside the new group's node tree and reroute it to connect
the common input socket to the original nodes. This is done by building
up a mapping between the incoming link sources to the input interfaces
created for them. The input interfaces are reused by the rest of the
links having the same source.
This patch also changes the way the input sockets get their names.
Output socket names of the group nodes usually are specific and are
given consciously. Use the output socket names from group nodes instead
of the inputs where the links point to.
Differential Revision: https://developer.blender.org/D15802
|
|
As described in T92474 and T91650, this patch adds two features to the
sample curve node. First is an index input, to allow choosing the curve
to sample for each point. Second is a custom field input, which is
evaluated on the control points of the curve and then sampled like the
other outputs. There is an "All Curves" option for the old behavior
which takes the length of all curves into account.
For invalid curve indices, the node outputs zeros (default values).
Invalid lengths and factors are clamped.
There have been various discussions about splitting the node up more,
but this is an intuitive combination of options and will work well
enough for current use cases. The node could still be generalized more
in the future.
Keep in mind that the source field is evaluated on curve control points,
not the evaluated points used for sampling. This is necessary so that
fields like "Index" work as expected.
Differential Revision: https://developer.blender.org/D16147
|
|
|
|
Needed to dynamically load assets as menu items, see cf985180551d and
99e5024e97f1. The next commit will add the listener for the node add menu.
|
|
This patch builds on the work from bdb57541475f to add node group
assets directly in the node editor add menu. Assets are added after
separators to distinguish them, but otherwise they look like any other
node. The catalog trees from all configured libraries are used to build
the menu hierarchy. Only catalogs with matching asset types are used
though.
There are a few limitations of this initial version. For now this only
supports geometry nodes. Support for other built-in node systems just
requires some refactoring of the corresponding add menu though. Lazy
loading will be added in a followup commit. For now there is a label
the first time the menu is opened.
Like the search menu integration, re-saving asset library files in 3.4
is required, if it hasn't been done already.
Implementation wise, there is a some ugly code here. A lot of that is
because the asset system isn't complete. The RNA API doesn't work well
yet, and the system isn't built to interact with multiple libraries at
once. It's also ugly because of the way we combine automatic menu
generation with builtin menus. As noted in a code comment, these two
systems could be merged completely so that the menus for builtin nodes
are also generated in the same way.
Differential Revision: https://developer.blender.org/D16135
|
|
|
|
Motivation is to disambiguate on the naming level what the matrix
actually means. It is very easy to understand the meaning backwards,
especially since in Python the name goes the opposite way (it is
called `world_matrix` in the Python API).
It is important to disambiguate the naming without making developers
to look into the comment in the header file (which is also not super
clear either). Additionally, more clear naming facilitates the unit
verification (or, in this case, space validation) when reading an
expression.
This patch calls the matrix `object_to_world` which makes it clear
from the local code what is it exactly going on. This is only done
on DNA level, and a lot of local variables still follow the old
naming.
A DNA rename is setup in a way that there is no change on the file
level, so there should be no regressions at all.
The possibility is to add `_matrix` or `_mat` suffix to the name
to make it explicit that it is a matrix. Although, not sure if it
really helps the readability, or is it something redundant.
Differential Revision: https://developer.blender.org/D16328
|
|
|
|
|
|
Use the newly added node topology cache to find the node that contains
a socket rather than looping through all nodes every time. The change
improves performance of drawing a some large node trees by 2-3x.
|
|
There were two problems:
* The stroke was deleted if the last point was selected. Now
the stroke is flipped because is faster.
* If the second point was selected, the first point was removed
because the internal api, removed one point strokes by
default. This was done becaus ethe tools that used this API
did not need one point strokes as result. Now this optional
and keep one point strokes.
|
|
BLI_path_slash_ensure was appending to fixed sized buffers without
a size check.
|
|
When pushing down an Action to a new NLA track, the track is now named
after the Action.
|
|
|
|
* External engines do not use the PBVH and need slower depsgraph updates.
* Final depsgraph tag after stroke finishes was missing for sculpt color
painting, caused missing updates for other viewports as well as any
modifiers or nodes on other objects using the colors.
|
|
Updates for cursor could cause the paint data to be continuously refreshed,
which is pretty cheap by itself, but not when it starts tagging the depsgraph.
The paint slot refresh code ideally should not be doing depsgraph tags at all,
but checking if there were changes at least avoids continuous updates.
|
|
The bug has existed since crasy space was implemented.
rBbf8a26b7453d made the error even worse as the
`modifiers_disable_subsurf_temporary` function, which works like a
toggle, did not temporarily re-enable subsurf.
The main problem is that the derived mesh is modified but not marked as
dirty at the end.
|
|
Internal links are run-time/derived data. Therefore it is not necessary
to load them from .blend files where invalid internal links may be stored.
They will be regenerated after a node tree is loaded anyway.
|