Blender Git Loki

Blender Git "lineart-shadow" branch commits.

Page: 5 / 76

December 8, 2021, 06:53 (GMT)
Cleanup: Remove unused code

This is very old and is unlikely to be useful in the near future.
December 8, 2021, 06:53 (GMT)
Cleanup: Use references in node editor, other improvements

This helps to tell when a pointer is expected to be null, and avoid
overly verbose code when dereferencing. This commit also includes
a few other cleanups in this area:
- Use const in a few places
- Use `float2` instead of `float[2]`
- Remove some unnecessary includes and old code
The change can be continued further in the future.
December 8, 2021, 06:53 (GMT)
Cleanup: Use LISTBASE_FOREACH macro
December 8, 2021, 06:53 (GMT)
Create generic modal functions from GRAPH_OT_decimate

This patch extracts the modal functions from GRAPH_OT_decimate
and makes them generic so they can be reused by future operators

Reviewed by: Sybren A. St�vel
Differential Revision: https://developer.blender.org/D9326
Ref: D9326
December 8, 2021, 06:53 (GMT)
Compositor: Migrate most nodes to new socket builder API

This patch leaves a out a few nodes:

- Group Nodes
- Image input node
- File output node
- Switch View
- Cryptomatte

These nodes above are a bit more complicated and should be worked on individually.

Differential Revision: https://developer.blender.org/D13266
December 8, 2021, 06:53 (GMT)
Fix (unreported): off-by-one error when setting curve handles

The problem is that `current_mask` can become `selection.size()`.
The loop could also be refactored to break out of it when the end
of the selection is reached. This can be done separately.
December 8, 2021, 06:53 (GMT)
Geometry Nodes: use array instead of map in GeometrySet

`GeometrySet` contains at most one component of each type.
Previously, a map was used to make sure that each component
type only exists once. The overhead of a map (especially with
inline storage) is rather large though. Since all component types
are known at compile time and the number of types is low,
a simple `std::array` works as well.

Some benefits of using `std::array` here:
* Looking up the component of a specific type is a bit faster.
* The size of `GeometrySet` becomes much smaller from 192 to 40 bytes.
* Debugging a `GeometrySet` in many tools becomes simpler because
one can easily see which components exists and which don't
December 8, 2021, 06:53 (GMT)
Cleanup: Migrate all shader nodes to c++

This will be useful in the future to use the new socket builder API

Aditional changes:

- Declare variables where initialized
- Do not use relative includes

Differential Revision: https://developer.blender.org/D13465
December 8, 2021, 06:53 (GMT)
Cleanup: Add missing include

Fixes compilation errors after rBd5efda72f501
Re sorted some includes.
December 8, 2021, 06:53 (GMT)
Cleanup: clang-tidy: modernize-redundant-void-arg

This change follows up on recent c --> c++ conversions
December 8, 2021, 06:53 (GMT)
Cleanup: Remove unnecessary node type callbacks for drawing

Currently there are a few callbacks on `bNodeType` that do the same
thing for every node type except reroutes and frame nodes. Having a
callback for basic things complicates code and makes it harder to
understand, and reroutes and frames are special cases in larger way.

Arguably frame nodes shouldn't even be drawn like regular nodes,
given that it adds a case of O(N^2) looping through all nodes.
"Unrolling" the callbacks makes it easier to see what's happening,
and therefore easier to optimize.

Differential Revision: https://developer.blender.org/D13463
December 8, 2021, 06:53 (GMT)
Cleanup: Remove unnecesary node type draw callback

As a followup to 338c1060d5d7, apply the same change to the node
drawing callback. This helps to simplify code when the complexity
of a callback isn't necessary right now.
December 8, 2021, 06:53 (GMT)
Cleanup: Remove unused next and prev pointers in bNodeType
December 8, 2021, 06:53 (GMT)
Shader Nodes: Declare nodes in their own namespace

Follow up on rB1df8abff257030ba79bc23dc321f35494f4d91c5

This puts all static functions in geometry node files into a new
namespace. This allows using unity build which can improve
compile times significantly

- The namespace name is derived from the file name.
That makes it possible to write some tooling that checks the names later on.
The filename extension (cc) is added to the namespace name as well.
This also possibly simplifies tooling but also makes it more obvious that this namespace is specific to a file.
- In the register function of every node, I added a namespace alias namespace `file_ns = blender::nodes::node_shader_*_cc`;.
This avoids some duplication of the file name and may also simplify tooling, because this line is easy to detect.
The name `file_ns` stands for "file namespace" and also indicates that this namespace corresponds to the current file.

In the future some nodes will be split up to separate files and given their own namespace
This will allow function names to be simplified similar to rBfab39440e94

Reviewed By: HooglyBoogly

Differential Revision: https://developer.blender.org/D13480
December 8, 2021, 06:53 (GMT)
Fix T93732: Snap Cursor not working after changing Add Object settings

`g_data_intern.state_default.gzgrp_type` is a very specific member and
cannot be set to default.
December 8, 2021, 06:53 (GMT)
Fix T93388: dropping object on grid in orthogonal view misses the floor plane

`ED_view3d_win_to_3d_on_plane` does not use the `clip_start` and
`clip_end` values of the scene, so the `do_clip` option can be misleading
especially in the orthographic view where the `clip_start` is negative.

For now, don't use the `do_clip` option in orthographic view.
December 8, 2021, 06:53 (GMT)
Cleanup: remove some temp dev asserts in new link/append code.

No longer needed now that all code uses that new
BKE_blendfile_link_append module, and that instantiation code in
BLO_readfile has been removed.
December 8, 2021, 06:53 (GMT)
Fix T93707: Dragging the tweaked NLA strip causes crash

Earlier code assumed that the active strip was on the active track. This
commit detects when this assumption doesn't hold, and adds a more thorough
search of the active strip.
December 8, 2021, 06:53 (GMT)
Fix T93611: Curve modifier crash in editmode in certain situations

Caused by {rB3b6ee8cee708}

Above commit was trying to get the vertexgroup from the mesh that is
passed into `deformVertsEM` (but that can be NULL).
When can it be NULL, when is is non-NULL?
`editbmesh_calc_modifiers` only passes in a non-NULL mesh to
`deformVertsEM` under certain conditions:
- a non-deform-only modifier is handled currently
- a non-deform-only modifier preceeds the current modifier
- a deform-only modifier preceeds the current modifier (and the current
one depends on normals)

So the passed-in mesh cannot be relied on, now get the vertex group from
the context object data (like it was before the culprit commit).

Related commit: rB8f22feefbc20

Maniphest Tasks: T93611

Differential Revision: https://developer.blender.org/D13487
December 8, 2021, 06:53 (GMT)
cmake: fix linking with WITH_X11_XF86VMODE and bfd

Fix typos in the variables of the Xxf86vm libray to fix link failure
with bfd. These variables are defined in platform_unix.cmake.

Reviewed By: zeddb

Differential Revision: https://developer.blender.org/D12911
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021