Historically tracks and reconstruction for motion tracking camera
object were stored in the motion tracking structure. This is because
the data structures pre-dates object tracking support, and it was
never changed to preserve compatibility.
Now the compatibility code supports more tricks and allows to change
the ownership without breaking any compatibility. This is what this
change does: it moves tracks from motion tracking structure to the
motion tracking camera object, and does it in a way that no
compatibility is broken.
One of the side-effects of this change is that the active track is
now stored on motion tracking object level, which allows to change
active motion tracking object without loosing active track. Other
than that there are no expected user-level changes.
The function is already doing a lot of memory indirections and
sub-optimal lookups, so for the simplicity and robustness of the
system might as well just do copy-on-write update.
This adds a vulkan backend to GHOST. The code was extracted from the
tmp-vulkan branch. The main difference with the original code is that
GHOST isn't responsible for fallback. For Metal backend there is already
an idea that the GPU module is responsible for the fallback, not the system.
For Blender we target Vulkan 1.2 at the time of this patch.
MoltenVK (needed to convert Vulkan calls to Metal) has been added as
a separate package.
This patch isn't useful for end-users, currently when starting blender with
`--gpu-backend vulkan` it would crash as the `VBBackend` doesn't initialize
the expected global structs in the GPU module.
Validated to be working on Windows and Apple. Linux still needs to be tested.
Reviewed By: fclem
Differential Revision: https://developer.blender.org/D13155
The refactor in f1c0249f34 incorrectly placed the material index
remapping before the transfer of generic attributes. Now that the
material index is a generic attribute, it was overwritten.
This resolves some issues with correlation artifacts at higher sample counts.
Fix T101356, correlation issues in new PMJ pattern.
Differential Revision: https://developer.blender.org/D16561
The node level was an indication of how deep the node was in the tree.
It was only used for detecting link cycles. Now that the node topology
cache from 25e307d725 exists, this calculation can be removed
completely.
The level calculation was quadratic and very slow on larger node trees.
In the mouse house file with a few thousand nodes, it took 23ms on
every single update. Another benefit is storing slightly less runtime
data, though this was only 2 bytes per node.
Differential Revision: https://developer.blender.org/D16566
Instead of generating a dependency sorted node list whenever evaluating
texture or EEVEE/viewport shader nodes, use the existing sorted array
from the topology cache. This may be more efficient because the
algorithm isn't quadratic. It's also the second-to-last place to
use `node.runtime->level`, which can be removed soon.
Differential Revision: https://developer.blender.org/D16565
Commit c8dd33f5a37b6a6db0b6950d24f9a7cff5ceb799 in OSL changed behavior of
parameters that reference each other and are also overwritten with an
instance value. This is causing the "NormalIn" parameter of a few OSL nodes
in Cycles to be set to zero somehow, which should instead have received the
value from a "node_geometry" node Cycles generates and connects automatically.
I am not entirely sure why that is happening, but these parameters are
superfluous anyway, since OSL already provides the necessary data in the
global variable "N". So this patch simply removes those parameters (which
mimics SVM, where these parameters do not exist either), which also fixes
the rendering artifacts that occured with recent OSL.
While this fixes built-in shader nodes, custom OSL scripts can still have
this problem.
Ref T101222
Differential Revision: https://developer.blender.org/D16470
Remove `private:` from the PBVHFaceIter. This is not really a C++
class, and the C++ code generates a lot of warnings about unused
fields.
Also mark function static and run clang-format.
Fixes point cloud selection by using new draw call.
Reviewed By: fclem
Maniphest Tasks: T102659
Differential Revision: https://developer.blender.org/D16501
Fixes point cloud selection by using new draw call.
Reviewed By: fclem
Maniphest Tasks: T102659
Differential Revision: https://developer.blender.org/D16501
When attempting to load contents of a .blend, the code would just assume
if the number of added items is 0, that means it's not a .blend (but a
directory, although the previous commit fixed that part already).
However there may be situations where a .blend file simply doesn't
contain anything of interest to be added (e.g. when listing assets
only), so have a proper "none" value for this.
When loading asset libraries, there would be a bunch of "non-existent
directory" prints because we were calling a function to list directory
contents on .blend file paths. Make sure the path actually points to a
directory.
Some nodes, like Combine Color or the math nodes, label sockets
differently depending on the mode to be more descriptive.
`uiTemplateNodeView` now also uses this dynamic label rather than the
socket's name for labeling in the UI so the shown labels always match
the ones on the node itself.
Reviewed By: Hans Goudey
Differential Revision: http://developer.blender.org/D16563
You can install several versions of blender side by side and all
of them will try to create a "Blender" shortcut, which if already
exists the msi installer throws a warning about.
This change adds the blender version number to the desktop and start
menu shortcuts, side steps the problem and it's easier to tell the
various blender versions apart.
Rewrite the edge split code to operate directly on Mesh instead
of BMesh. This allows for the use of multi-threading and makes
the node around 2 times faster. Around 15% of the time is spent
just on the creation of the topology maps, so these being cached
on the mesh could cause an even greater speedup. The new node
gave identical results compared to the BMesh version on all the
meshes I tested it on (up to permutation of the indices).
Here are some of the results on a few simple test cases:
(Intel i7-7700HQ (8 cores) @ 2.800GHz , with 50% of edges selected)
| | 370x370 UV Sphere | 400x400 Grid | Suzanne 4 subdiv levels |
| ----- | ----------------- | -------------- | --------------------- |
| Mesh | 89ms | 111ms | 76ms |
| BMesh | 200ms | 276ms | 208ms |
Differential Revision: https://developer.blender.org/D16399
The "Activate Same Type Next/Prev" and "Find Node" operators pan
the view to the newly selected node if it's outside of the view. This
simplifies that check and improves it in the case where the node
is only partially visible-- now it pans in while it didn't before.
The previous code was quadratic; it looped over every link for every
node. For one large node tree I tested the operator took 20ms. On the
same node tree it now takes less than 1ms.
The change replaces the current building of the "dependency list"
on every call with a use of the topology cache from 25e307d725.
PaintMaskFloodMode is supposed to be an alias
of eSelectOp. paint_intern.h now includes
ED_select_utils.h and simply assigns the
relevent members of eSelectOp to PaintMaskFloodMode's
members.
This patch adds basic face iterators to the sculpt API. The interface is similar to the existing vertex iterators. It's not C++ (though it does mark private fields in PBVHFaceIter as private if compiling under C++).
Example:
```
PBVHFaceIter fd;
BKE_pbvh_face_iter_begin(pbvh, node, fd) {
/* Face reference and face index */
PBVHFaceRef face = fd->face;
int face_index = fd->index;
/* Can read and modify hide flag if it exist (it may not) */
if (fd->hide) {
*fd->hide ^= true; /* toggle hide */
}
/* Can read and modify face set if it exists */
if (fd->face_set) {
*fd->face_set = something;
}
/*Can read vertices*/
for (int i=0; i<fd.verts_num; i++) {
float *co = SCULPT_vertex_co_get(ss, fd.verts[i]);
}
}
BKE_pbvh_face_iter_end(fd);
```
Reviewed By: Brecht Von Lommen and Hans Goudey
Differential Revision: https://developer.blender.org/D16225
Ref D16225
If compositing uses renderlayers, and a camera was missing in the
associated scenes, the error message also referred to the scene the comp
tree was in (not the scene of the renderlayer -- which can potentionally
be different).
This was confusing and is now rectified.
Maniphest Tasks: T102514
Differential Revision: https://developer.blender.org/D16542