Blender Git Loki

Blenderin Git "master"-kehityshaaran kommitit.

Page: 27 / 5574

Revision 70a0d45 by Hans Goudey
December 2, 2021, 02:17 (GMT)
Merge branch 'blender-v3.0-release'
Revision 594656e by Hans Goudey
December 2, 2021, 02:16 (GMT)
Fix T93525: Crash with curve/text armature bone gizmo

The problem is that drw_batch_cache_generate_requested_delayed
is called on the object, which uses the original object data type to
choose which data type to get info for. So for curves and text it uses
the incorrect type (not the evaluated mesh like we hardcoded in the
armature overlay code).

To fix this I hardcoded the "delayed" generation to only use the
evaluated mesh. Luckily it wasn't use elsewhere besides this
armature overlay system. That seems like the simplest fix for
3.0. A proper solution should rewrite this whole area anyway.

Differential Revision: https://developer.blender.org/D13439
Revision fed4fc9 by Hans Goudey
December 1, 2021, 20:08 (GMT)
Cleanup: Move node_shader_util.c to C++

This will allow using a function I've declared in a C++ header.
December 1, 2021, 19:52 (GMT)
Cleanup: compiler warning
December 1, 2021, 19:20 (GMT)
Cycles: fix bugs in point and spot light multiple importance sampling

* Spot lights are now handled as disks aligned with the direction of the
spotlight instead of view aligned disks.

* Point light is now handled separately from the spot light, to fix a case
where multiple lights are intersected in a row. Before the origin of the
ray was the previously intersected light and not the origin of the initial
ray traced from the last surface/volume interaction.

This makes both strategies in multiple importance sampling converge to the same
result. It changes the render results in some scenes, for example the junkshop
scene where there are large point lights overlapping scene geometry and each
other.

Differential Revision: https://developer.blender.org/D13233
December 1, 2021, 18:48 (GMT)
Cleanup: clarify material copying for hair and pointclouds

No functional change, just more clear this way it comes from src.
December 1, 2021, 18:40 (GMT)
Fix some shortcut keys not working on macOS with Japanese input

Differential Revision: https://developer.blender.org/D13414
Revision 128ebdb by Hans Goudey
December 1, 2021, 17:44 (GMT)
Fix: Remove incorrect asserts for empty attributes

While it is an edge case, it isn't incorrect for the attribute storage
to have a zero size, it will just return an empty span or nothing.
Revision bc48da3 by Hans Goudey
December 1, 2021, 17:36 (GMT)
Fix: Instances component does not copy attributes
December 1, 2021, 17:13 (GMT)
Cleanup: Fix errors in previous commit

After 1ef8ef4941dd there were build warnings because of unused
arguments. Also missed to change code to iterate `strips` instead of
`seqbase` in 2 functions.
December 1, 2021, 16:57 (GMT)
Geometry Nodes: deduplicate join geometry code

The Realize Instances and Join Geometry node can share most of their code.
Until now, both nodes had their own implementations though. This patch
removes the implementation in the Join Geometry node in favor of the more
general Realize Instances implementation.

This removes an optimization for avoiding spline copies. This can be brought
back later. The realize instances code has to be rewritten to support attribute
instances anyway.

Differential Revision: https://developer.blender.org/D13417
December 1, 2021, 16:11 (GMT)
Geometry Nodes: Dual Mesh Node

This node calculates the dual of the input mesh. This means that faces
get replaced with vertices and vertices with faces. In principle this
only makes sense when the mesh in manifold, but there is an option to
keep the (non-manifold) boundaries of the mesh intact.

Attributes are propagated:
- Point domain goes to face domain and vice versa
- Edge domain and Face corner domain gets mapped to itself
Because of the duality, when the mesh is manifold, the attributes get
mapped to themselves when applying the node twice.

Thanks to Leul Mulugeta (@Leul) for help with the
ascii diagrams in the code comments.

Note that this does not work well with some non-manifold geometry,
like an edge connected to more than 2 faces, or a vertex connected to
only two faces, while not being in the boundary. This is because there
is no good way to define the dual at some of those points. This type
of non-manifold vertices are just removed for this reason.

Differential Revision: https://developer.blender.org/D12949
December 1, 2021, 15:36 (GMT)
Geometry Nodes: Generalized Compare Node

Replace compare floats node with a generalized compare node. The node
allows for the comparison of float, int, string, color, and vector.

The datatypes support the following operators:
Float, Int: <, >, <=, >=, ==, !=
String: ==, !=
Color: ==, !=, lighter, darker
(using rgb_to_grayscale value as the brightness value)

Vector Supports 5 comparison modes for: ==, !=, <, >, <=, >=
Average: The average of the components of the vectors are compared.
Dot Product: The dot product of the vectors are compared.
Direction: The angle between the vectors is compared to an angle
Element-wise: The individual components of the vectors are compared.
Length: The lengths of the vectors are compared.

Differential Revision: https://developer.blender.org/D13228
Revision f8dd03d by Hans Goudey
December 1, 2021, 14:27 (GMT)
Cleanup: Store instances id attribute with other attributes

Now that we can store any dynamic attribute on the instances component,
we don't need the special case for `id`, it can just be handled by the
generic attribute storage. Mostly this just allows removing a bunch
of redundant code.

I had to add a null check for `update_custom_data_pointers` because
the instances component doesn't have any pointers to inside of
custom data.

Differential Revision: https://developer.blender.org/D13430
Revision fd84183 by Paul Golter / Jeroen Bakker
December 1, 2021, 13:58 (GMT)
Add layer and pass index parameters to rna_Image_gl_load

This patch adds a layer_idx and pass_idx parameter to the rna_Image_gl_load function. It exposes both to the Python API as optional parameters.
This allows python scripters to specifiy which layer and pass they want to load in to an OpenGL texture. Right now image.gl_load() always takes the first layer and first pass.
This is limiting when working with multilayer openEXRs.

With this patch scripters can do something like this:

```
pass_idx = area.spaces.active.image_user.multilayer_pass
layer_idx = area.spaces.active.image_user.multilayer_layer
image.gl_load(frame=0, layer_idx=layer_idx, pass_idx=pass_idx)
```

As the parameters are optional and default to 0, it should not break existing code.

Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D13435
December 1, 2021, 11:49 (GMT)
Cleanup: Remove seq->tmp_flag DNA member

Commit f0d20198b290 used this field to flag rendered strips which were
queried by `SEQ_query_rendered_strips()`. Then operators iterate all
strips and checks state of `seq->tmp_flag`.

Use collection returned by `SEQ_query_rendered_strips` directly.
There should be no functional changes.

This commit adds functions `all_strips_from_context` and
`selected_strips_from_context` that provide collection of strips based
on context. Most operators can use this collection directly.
There is already `seq->tmp` DNA field, but is should not be used unless
absolutely necessary. Better option is to use human readable flag.
Best is to not use DNA fields for temporary storage in runtime.
December 1, 2021, 11:46 (GMT)
Color adjustments for splash for Blender 3.x series

Tweaks by Andy Goralczyk.
December 1, 2021, 11:44 (GMT)
Fix T92561: unstable particle distribution with Alembic files

When enabling or disabling a Mesh Sequence Cache modifier of an Object
with a hair particle system, the hair would switch positions. This is
caused because original coordinates in Blender are expected to be
normalized, and toggling the modifier would cause the usage of different
orco layers: one that is normalized, and the other which isn't.

This bug exposes a few related issues:
- if the Alembic file did not have orco data,
`MOD_deform_mesh_eval_get`, used by the particle system modifier, would
add an orco layer without normalization
- `MOD_deform_mesh_eval_get` would also ignore the presence of an orco
layer (e.g. one that could have been read from Alembic)
- if the Alembic file did have orco data, the data would be read
unnormalized

To fix those various issues, original coordinates are normalized when
read from Alembic and unnormalized when written to Alembic; and a new
utility function `BKE_mesh_orco_ensure` is added to add a normalized
orco layer if none exists on the mesh already, this function derives
from the code used in the particle system.

Reviewed By: brecht

Maniphest Tasks: T92561

Differential Revision: https://developer.blender.org/D13306
Revision fd22404 by Julian Eisel
December 1, 2021, 11:19 (GMT)
Cleanup: Use int8 type rather than char for buffer

Indicates that this is just a buffer with an element size of 8 bit, not
a displayable/printable string buffer.
December 1, 2021, 10:38 (GMT)
Fix errors in user preferences after 2.8 hack removal

How to reproduce it:
* Open User Preferences.
* Got to Add-ons tab.

Issue introduced on d723e331f155

Reported via chat by Pedro Alcaide (povmaniac).
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021