Age | Commit message (Collapse) | Author |
|
Currently, the realtime compositor treat vector types as 3D vectors,
which is true for most operations. However, some operations deal with
vector types as 4D vectors that encode two 2D vectors or one 3D vector
with the last component ignored. So this patch expands vector types to
include a fourth component that is only sometimes used.
Since we already stored vectors in RGBA textures, the necessary changes
are straightforward and are mostly concerned with adjusting the Result
class.
Differential Revision: https://developer.blender.org/D16359
Reviewed By: Clement Foucault
|
|
**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
|
|
Would only appear when more than 4 asset libraries were loaded, because
small buffer optimization would hide the issue.
|
|
While relatively harmless, BLI_path_parent_dir wasn't returning failure
when passed in "./" which wouldn't succeed.
Instead of adding a ".." and normalizing, normalize the path and remove
the last directly. This is simpler than inspecting the resulting path
to see if normalize removed it or not.
Add additional tests which failed previously.
|
|
Tests for BLI_path_normalize, BLI_path_parent_dir & BLI_path_rel
were disabled on WIN32 because of complications with slash direction.
Enable these tests using character replacement to manipulate test data.
|
|
|
|
Regression in [0] on WIN32 caused joining paths {"//", "path"} to
result in "//\path".
This made the file selector show paths with a "\" prefix.
Add an exception for WIN32 where an initial path of forward slashes
is joined without a back-slash.
[0]: 8f7ab1bf46d5e8610b167180b7631ff62e718a08
|
|
|
|
|
|
The check for BLI_path_normalize having succeeded only checked for a
trailing "../" which isn't correct. This caused going up a directory
in the file selector to do nothing on directories ending with "..".
This also caused an empty path to expand into "../" because
BLI_path_extension_check didn't account for this case.
Resolve using BLI_path_name_at_index which extracts the last component
of the path without having to match the the surrounding slashes.
|
|
The logic to go up a directory (using "..") ran before stripping "/./"
from the path. This caused "/a/b/./../" to result in "/a/b/"
instead of "/a/". Now redundant characters are removed before before
checking for ".." in paths.
Include test to ensure this works as expected.
|
|
Also enable a test that was disabled with a fix FIXME comment but works.
|
|
ASAN is more often broken than working depending on the MSVC version
you have. As it is causing too many support incidents of people that
unknowingly turned ASAN on by running `make developer` and running
into issues starting blender due to the broken ASAN support in MSVC.
This commit changes the default not enable it for MSVC in the
developer profile. Devs that still want to enable it can do so though
turning WITH_COMPILER_ASAN on in their CMakeCache.txt or by running
`make developer asan`
|
|
Previously it would use a hardcoded location where the AMD driver installs it,
but Linux distributions may use other locations. Now look for both cases.
|
|
Adds a listener to the node add menu so that it refreshes as assets get
loaded asynchronously.
Followup to cf985180551d, also see 99e5024e97f1 and the previous commit.
|
|
Needed to dynamically load assets as menu items, see cf985180551d and
99e5024e97f1. The next commit will add the listener for the node add menu.
|
|
Updated the code to use the UsdGeomPrimvarsAPI class to read
and write mesh primvars instead of the now deprecated primvars
accessors in UsdGeomImageable. This will be required to build
with USD 22.11 in the future, where the deprecated functions
have been removed.
|
|
This allows us to asynchronously load items into the menu, see
cf985180551d. All menus spawned from Python using the `wm.call_menu`
operator will be affected by this. We could avoid that and only refresh
the menu we need to, but it's worth trying to get this to work as a
general menu feature.
This is a slightly risky change, so keeping an eye open for bugs.
|
|
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
|
|
UsdImagingCapsuleAdapter static functions GetMeshPoints() and
GetTopology() have been removed in USD 22.11. In anticipation
of this upcoming change, I've updated the test code to call
the corresponding virtual functions instead.
|
|
|
|
|
|
For one, paintcurves were not considered in curves sculpt mode at all
(so you couldnt draw them). This is now enabled.
And the second issue was that since curves sculpt mode uses the reguar
paint_stroke_modal() [which handles paintcurves], this was actually
excuted, freeing the PaintStroke from SculptCurvesBrushStrokeData (but
not the CurvesSculptStrokeOperation) and immediately return
OPERATOR_FINISHED from modal (resulting in a double MEM_delete of
SculptCurvesBrushStrokeData -- in both invoke and modal).
There might be better ways to handle the memory free, for now the double
freeing is prevented by setting the operator customdata to NULL (and
check for that later).
Maniphest Tasks: T101062
Differential Revision: https://developer.blender.org/D16099
|
|
There was a trailing ')' without any '(' in the generated
documentation.
|
|
This only affects Windows since Linux uses pre-compiled
OCLOC version.
|
|
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
|
|
Missing return statement in recent commit. Code is disabled by default,
so might not have been noticed.
|
|
Support layouts such as AZERTY where the shift key is held for number
keys. Text entry remains unchanged but these keys now activate shortcuts
as expected.
This matches a fix in X11 for the same problem: T47228.
|
|
|
|
|
|
|
|
Name surfaces for their use.
|
|
This isn't full multi-seat support, instead set the active seat using
pointer/tablet & keyboard enter handlers.
This means that seats beside the first aren't prevented from having
their events handled.
|
|
Fixes very rare cases where the UV Cylinder Project, UV Sphere Project
and UV From View might not set the translation correctly if the scale
is exactly 1.0.
Mainly fixed because this code might later be reused elsewhere.
|
|
|
|
|
|
Need to explicitly install __init__.pyd for the case where the install
folder is different than the build folder.
|
|
|
|
Retrieve the surface UV coordinates with the attribute API instead of
the helper function. This allows more flexibility of data types (and
domains), which is helpful especially because geometry nodes
can't write 2D vectors yet.
|
|
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.
|
|
This patch adds a placeholder for the vulkan backend.
When activated (`WITH_VULKAN_BACKEND=On` and `--gpu-backend vulkan`)
it might open a blender screen, but nothing should be visible as
none of the functions are implemented or otherwise crash on a nullptr.
This is expected as this is just a placeholder. The goal is to add shader compilation
+validation to this backend as one of the next steps so we can validate
changes to existing shaders on OpenGL, Metal and Vulkan at the same time.
Reviewed By: fclem
Differential Revision: https://developer.blender.org/D16338
|
|
Error introduced in rBa7aa0f1a0c24
Mentioned in https://pvs-studio.com/en/blog/posts/cpp/1004/
It could cause the absolute snap to the y direction to fail in
some editor.
|
|
Prefer using the native path separator for low level path functions.
|
|
Previously both slashes were considered when joining paths, meaning
slashes that were part of the path name could be stripped before joining
the path.
Prefer using the native path separator for low level path functions,
callers can always convert slashes into the expected direction if they
need. This also matches BLI_path_append behavior.
|
|
With a full SVN checkout of "../lib", updating all paths is slower
than running an update on the whole repository at once.
Also collect paths and run the update in separate passes, this avoids
some duplicate checks such as checking the svn command exists.
|
|
|
|
This is defined by a system header (xatomic.h) with MSVC.
|
|
This was because `stroke_id` was not using `vertex_start`.
But since `vertex_start` is not 1 based like it used to be, we need to add
1 to it to avoid a fragment depth of `0.0` which would be equal to the
background and not render.
|
|
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.
|