Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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.
|
|
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.
|
|
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.
|
|
|
|
|
|
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.
|
|
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.
|
|
This is a convenience when one needs to often change the current framebuffer
and avoid the overhead of creating many Main/Simple passes.
|
|
Was caused by uvs not being sourced from the correct buffer.
|
|
This allows using drawcalls with non default vertex range.
These calls will be culled like any other instance by the GPU culling
pipeline. But they will not be batched together since the vertex range
is part of the group.
|
|
Copying and appending is unnecessarily verbose with each call having to
pass in the buffer size.
|
|
Avoid copying the string then calling BLI_path_slash_ensure afterwards.
|
|
BLI_path_slash_ensure was appending to fixed sized buffers without
a size check.
|
|
Regression in [0], accessing the path from the file selector relied on
BLI_join_dirfile adding a trailing "/" when the filename was empty.
[0]: 9f6a045e23cf4ab132ef78eeaf070bd53d0c509f
|