Blender Git Commits

Blender Git "soc-2021-curves" branch commits.

Page: 15 / 19

June 21, 2021, 14:31 (GMT)
Cleanup: clang-format
June 21, 2021, 14:31 (GMT)
Fix T88947: invalid normals when converting point cloud to mesh
June 21, 2021, 14:31 (GMT)
BMesh: remove unit-length edge-vector cache from normal calculation

Bypass stored edge-vectors for ~16% performance gains.

While this increases unit-length edge-vector calculations by around ~4x
the overhead of a parallel loop over all edges makes it worthwhile.

Note that caching edge-vectors per-vertex performs better and may be
worth investigating further, although in my tests this increases code
complexity with barley measurable benefits over not using cache at all.

Details about performance and possible optimizations are noted in
bm_vert_calc_normals_impl.
June 21, 2021, 14:31 (GMT)
BLI_math: Fix several division-by-zero cases.

Those were caused by various tools used on degenerate geometry, see
T79775.

Note that fixes are as low-level as possible, to ensure they cover as
much as possible of unreported issues too.

We still probably have many more of those hidden in BLI_math though.
June 21, 2021, 14:31 (GMT)
Edit Mesh: use params arg for update function, add calc_normals arg

Rename function EDBM_update_generic to EDBM_update, use a parameters
argument for better readability.

Also add calc_normals argument, which will have benefits when
calculating normals and tessellation together is optimized.
June 21, 2021, 14:31 (GMT)
BMesh: support face-normal calculation in normal & looptri functions

Support calculating face normals when tessellating. When this is done
before updating vertex normals it gives ~20% performance improvement.

Now vertex normal calculation only needs to perform a single pass on the
mesh vertices when called after tessellation.

Extended versions of normal & looptri update functions have been added:

- BM_mesh_calc_tessellation_ex
- BM_mesh_normals_update_ex

Most callers don't need to be aware of this detail by using:

- BKE_editmesh_looptri_and_normals_calc
- BKE_editmesh_looptri_and_normals_calc_with_partial

- EDBM_update also takes advantage of this,
where calling EDBM_update with calc_looptri & calc_normals
enabled uses the faster normal updating logic.
June 21, 2021, 14:31 (GMT)
BLI_math: Cleanup: Use `mul_`/`madd_` functions.

Better to avoid explicit vectors components direct manipulation when a
generic operation for whole vector exists, if nothing else it avoids
potential mistakes in indices.
June 21, 2021, 14:31 (GMT)
Cleanup: allocation size mismatch warning

While harmless, use fixed size int type for pixel data.
June 21, 2021, 14:31 (GMT)
Fix libmv new[]/delete[] mismatch
June 21, 2021, 14:31 (GMT)
Nodes: remove redundant increment node tree current socket index

`ntree->cur_index` was being incremented twice in make_socket_interface.

Reviewed By: JacquesLucke

Ref D11590
June 21, 2021, 14:31 (GMT)
Cleanup: use ATTR_RETURNS_NONNULL function attribute
June 21, 2021, 14:31 (GMT)
Cleanup: rename 'unsigned int' -> 'uint'
June 21, 2021, 14:31 (GMT)
Cleanup: use return arg prefix for ED_object_add_generic_get_opts
June 21, 2021, 14:31 (GMT)
Cleanup: Order return argument last
June 21, 2021, 14:31 (GMT)
Cleanup: redundant initialization

These were limited to obvious cases. Some less obvious cases
were kept as refactoring might make them necessary in future.
June 21, 2021, 14:31 (GMT)
Cleanup: Reduce indentation from redundant check
June 21, 2021, 14:31 (GMT)
Fix T88807: crash when there are multiple links between the same sockets

This commit does two things:

* Disallows creating more than one link from one socket to a multi socket input.
* Properly count links if there happen to be more than one link between the same sockets.

The new link counting should also be more efficient asymptotically.

Differential Revision: https://developer.blender.org/D11570
June 21, 2021, 14:31 (GMT)
Cleanup: avoid the possibility of 'enter_editmode' being left unset

While in practice this isn't an issue currently, always set
'enter_editmode' in ED_object_add_generic_get_opts
to avoid problems in the future.
June 21, 2021, 14:31 (GMT)
Fix T88515: Cycles does not update light transform from linked collections

When moving a linked collection, we seem to only receive a depsgraph update
for an empty object so the Blender synchronization cannot discriminate it
and tag the object(s) (light or geometry) for an update through
id_map.set_recalc.

This missing transform update only affects lights since we do not check
manually if the transformations were modified like we do for objects.

To fix this, add a check to see if the transformation is different provided
that a light was already created.

Reviewed By: brecht

Maniphest Tasks: T88515

Differential Revision: https://developer.blender.org/D11574
June 21, 2021, 14:31 (GMT)
Cleanup: missing include
By: Miika HämäläinenLast update: Nov-07-2014 14:18MiikaHweb | 2003-2021