Blender Git Loki

Blender Git commits from all branches.

Page: 303 / 2888

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)
Fix build error in release builds after recent changes
June 21, 2021, 14:31 (GMT)
Python API: option for render engines to disable image file saving

For some custom rendering engines it's advantageous not to write the image files to disk.
An example would be a network rendering engine which does it's own image writing.

This feature is only supported when bl_use_postprocess is also disabled, since render
engines can't influence the saving behavior of the sequencer or compositor.

Differential Revision: https://developer.blender.org/D11512
June 21, 2021, 14:31 (GMT)
Cleanup: clang-format
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: 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)
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)
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)
Cleanup: use return arg prefix for ED_object_add_generic_get_opts
June 21, 2021, 14:31 (GMT)
Cleanup: use ATTR_RETURNS_NONNULL function attribute
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: rename 'unsigned int' -> 'uint'
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)
Cleanup: Order return argument last
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)
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)
Fix T89001: node search not working anymore
June 21, 2021, 14:31 (GMT)
Fix object assets getting duplicated after dropping

The operator run when dropping objects would duplicate the dropped object and
place that in the scene, even though that was just appended. Addressed by
making the duplication optional for the operator. If the duplication is not
requested, the object is just added to the scene (if needed), repositioned
based on the drop location and selected (deselecting other objects).
This makes the operator work as expected when using it to drop assets.

Reviewed as part of https://developer.blender.org/D11536.

Reviewed by: Bastien Montagne
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021