Blender Git Loki

Blender Git "temp-lineart-contained" branch commits.

Page: 4 / 66

August 16, 2021, 04:20 (GMT)
Merge remote-tracking branch 'origin/master' into temp-lineart-contained
August 16, 2021, 04:19 (GMT)
Cleanup: remove unused draw_gpencil_channel.

Code is integrated with draw_scene_channel since 2.80.
August 16, 2021, 04:19 (GMT)
Cleanup: split BKE_mesh_calc_normals_poly function in two

Remove the 'only_face_normals' argument.

- BKE_mesh_calc_normals_poly for polygon normals.
- BKE_mesh_calc_normals_poly_and_vertex for poly and vertex normals.

Order arguments logically:

- Pair array and length arguments.
- Position normal array arguments (to be filled) last.
August 16, 2021, 04:19 (GMT)
Cleanup: remove unused BKE_mesh_calc_normals_mapping functions

This supported calculating normals for MPoly array which was copied to
an MFace aligned array.

Remove the functions entirely since MFace use is being phased out and
these function isn't used anywhere.
August 16, 2021, 04:19 (GMT)
Add Extras Dropdown Menu to Constraints

Add Apply Constraint, Duplicate Constraint, and Copy To Selected
operators, and include them in a menu similar to the menu for modifiers.
The shortcuts in the extras menu are also matched to modifiers.

All the here added operators are intended to work exactly like the
analogous ones for modifiers. That means the apply operator should apply
a constraint as if it was first in the list, just like modifiers do. I
have added the same warning message as for modifiers when that happens.

The decision to use this approach of appling the constraint as if it was
first, was made for consistency with modifiers. People are already used
to how it works there. Is also provides more intricate control over the
applied transforms, then just applying all constraints up to that one.
Apply all constraints is already kinda implemented in Bake Animation.

Reviewed By: HooglyBoogly, sybren, #user_interface

Differential Revision: https://developer.blender.org/D10914
August 16, 2021, 04:19 (GMT)
Keyframe: Reduce GPU context switches.

This change reduces the GPU context switches when drawing keyframes.
In the previous situation the keyframe blocks and keyframe keys were
drawn per channel. With this patch first all the keyframe blocks are
drawn for all channels and after that the keyframe keys are collected
for all channels and send to the GPU in a single draw call.
August 16, 2021, 04:19 (GMT)
Fix NLA action cannot be unlinked in certain cases

The poll for unlinking calls `nla_panel_context` without providing an
adt pointer, and there is a check for this pointer in
`nla_panel_context` leading to never returning true if it is not
provided. (this is fine if there are tracks already, poll would succeed
in this case, `nla_panel_context` goes a different code path then)

Same call to `nla_panel_context` is also done in the beginning of the
corresponding unlink exec function (but this time providing the pointer
because it is used later), so it makes sense to do the same thing in the
poll function. Equal check is also done in the panel poll function, so
now these are all in sync.

Part of T87681.

Maniphest Tasks: T87681

Differential Revision: https://developer.blender.org/D11041
August 16, 2021, 04:19 (GMT)
Fix T89805: NLA crash without active track

Was reported for a file which does not have an active track set in
AnimData even though it was in strip twek mode (but this was accessed in
is_nlatrack_evaluatable()).

Root cause for this is not totally clear, but I assume the situation is
described as part T87681 (and is fixed in D11052).

This patch here just prevents the crash for files that are already in the
borked state.

Reviewers: sybren

Maniphest Tasks: T89805

Differential Revision: https://developer.blender.org/D12085
August 16, 2021, 04:19 (GMT)
Cleanup: Remove unused includes

I noticed this file was recompiling when adding a node.
August 16, 2021, 04:19 (GMT)
Fix T89241: 3D Text "Scale to Fit" wraps onto the second line

Disable wrapping when "scale to fit" is used, assert the error is
small so an invalid scale-to-fit value wont go by unnoticed.
August 16, 2021, 04:19 (GMT)
Cleanup: remove use of BKE_mesh_calc_normals_mapping_simple

Use BKE_mesh_calc_normals instead of
BKE_mesh_calc_normals_mapping_simple for curve modifier calculation.

This only made sense for derived-mesh which is no longer used.
August 16, 2021, 04:19 (GMT)
Mesh: replace saacos with acosf for normal calculation

The clamped version of acos isn't needed as degenerate (nan) coordinates
result in zeroed vectors which don't need clamping.
August 16, 2021, 04:19 (GMT)
Geometry Nodes: tag normals dirty after join

Under some circumstances the normals were not tagged dirty
even though they are.
August 16, 2021, 04:19 (GMT)
PyAPI: remove the .py extension requirement for startup registration

This was left over from when these scripts were loaded as modules,
where their names needed to be compatible with Pythons module naming.

Version patch existing files so text with register enabled
without a `.py` extension wont start executing on startup.

Resolves T89532.
August 16, 2021, 04:19 (GMT)
Docs: tooltip update missing from 3e775a4fc57cfd48954adcf284354312f34d5412
August 16, 2021, 04:19 (GMT)
Fix T88498: 'Clear Parent' does not clear parent_bone

Clearing the parent from the UI using the X (or from python) clears the
`parsubstr` and set `partype` back to `PAROBJECT`.

Using the Clear Parent operator would leave the `parsubstr` (and thus
`parent_bone`) untouched even though this operator claims to "clear
parenting relationship completely" (it also removes parent deform
modifiers for example).

So now, also clear `parsubstr` and set back to `PAROBJECT` [which is
default].

Maniphest Tasks: T88498

Differential Revision: https://developer.blender.org/D11503
August 16, 2021, 04:19 (GMT)
Mesh: optimize normal calculation

Optimize mesh normal calculation.

- Remove the intermediate `lnors_weighted` array, accumulate directly
into the normal array using a spin-lock for thread safety.
- Remove single threaded iteration over loops
(normal calculation is now fully multi-threaded).
- Remove stack array (alloca) for pre-calculating edge-directions.

Summary of Performance Characteristics:

- The largest gains are for single high poly meshes, with isolated
normal-calculation benchmarks of meshes over ~1.5 million showing
2x+ speedup, ~25 million polygons are ~2.85x faster.

- Single lower poly meshes (250k polys) can be ~2x slower.

Since these meshes aren't normally a bottleneck,
and this problem isn't noticeable on large scenes,
we considered the performance trade-off reasonable.

- The performance difference reduces with larger scenes,
tests with production files from "Sprite Fight" showing
the same or slightly better overall performance.

NOTE: tested on a AMD Ryzen TR 3970X 32-Core.

For more details & benchmarking scripts, see the patch description.

Reviewed By: mont29

Ref D11993
August 16, 2021, 04:19 (GMT)
Docs: note that normalize_v# functions zero out input containing nan
August 16, 2021, 04:19 (GMT)
Cleanup: code-comments

Use capitalization, remove unnecessary ellipsis.
August 16, 2021, 04:19 (GMT)
BLF: Do Not Cache Unused Rendered Glyphs

The loading of a font size or style renders bitmaps of the characters
0-255 and stores them in a cache. But glyphs 128-255 in this cache are
not accessible. What used to be ansi high-bit characters are now multi-
byte UTF-8 sequences.

Therefore this patch reduces the glyph_ascii_table size to 128 and
only caches characters 32-127, the visible portion of ASCII, which
greatly reduces the time to load a font.

See D12189 for more details.

Differential Revision: https://developer.blender.org/D12189

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