Blender Git Loki

Blenderin Git "master"-kehityshaaran kommitit.

Page: 317 / 5574

April 8, 2021, 09:31 (GMT)
LibOverride: Add a new 'leftover' flag to ID.

This flag is set for liboverride IDs that are detected as no longer
needed by resync process, while having been user-edited, so
auto-handling code cannot silently delete them.

Exposing those to users will be part of the new incoming Override
Outliner view.

Part of D10855.
April 8, 2021, 09:24 (GMT)
Cleanup: modernize-use-equals-default

This was missing from rB19dfb6ea1f6745c0dbc2ce21839c30184b553878.
April 8, 2021, 09:07 (GMT)
Cleanup: enable modernize-use-equals-default check

This removes a lot of unnecessary code that is generated by
the compiler automatically.

In very few cases, a defaulted destructor in a .cc file is
still necessary, because of forward declarations in the header.

I removed some defaulted virtual destructors, because they are not
necessary, when the parent class has a virtual destructor already.

Defaulted constructors are only necessary when there is another
constructor, but the class should still be default constructible.

Differential Revision: https://developer.blender.org/D10911
April 8, 2021, 06:36 (GMT)
Fix T87267: Texture Paint stencil texture not drawing

Typo in {rBafcfc6eb0842}.

Maniphest Tasks: T87267

Differential Revision: https://developer.blender.org/D10915
April 7, 2021, 21:03 (GMT)
Fix T87274: Curve 2D resets to 3D on reload

This code is incompatible with .blend files from subversion 16 and 17.

The ideal would be to create a new subversion when landed rBf674976edd88.

But for now, due to the delay, moving the code to the previous subversion
can solve it.
Revision 79ba4fd by Hans Goudey
April 7, 2021, 20:49 (GMT)
Cleanup: Rename function, switch order of arguments

The function name was not very specific, this makes it clearer that it
works on instances rather than only real geometry. Also use `r_`
prefix for the return argument.
Revision 1a8db9e by Hans Goudey
April 7, 2021, 18:23 (GMT)
Geometry Nodes: Rename grid output UV attribute

During review of D10730 it was discovered that the "uv" name causes
issues for cycles, which uses it as a default internal data name. While
that could be fixed in the future, there was no particular reason to use
"uv" instead of "uv_map", so we use the latter instead here, which
is consistent with the lowercase naming scheme chosen for attributes.
Revision 22ba85b by Hans Goudey
April 7, 2021, 18:15 (GMT)
Geometry Nodes: Greatly improve speed of some mesh primitives

Some of the BMesh primitive operators have a lot of overhead due to the
fact that they use other operators like extrusion, removing doubles,
and rotation, to build each shape rather than filling arrays directly.

Implementing the primitives directly with the Mesh data structure is
much more efficient, since it's simple to fill the result data based
on the known inputs. It also allows also skip the conversion from BMesh
to Mesh after the calculations.

Speed matters more for procedural operations than for the existing
operators accessible from the add menu, since they will be executed
every evaluation rather than once before a destructive workflow.

| Shape | Before (ms) | After (ms) | Speedup (x times faster) |
| -------- | -------------| ------------| -------------------------|
| Cylinder | 1.1676 | 0.31327 | 3.72 |
| Cone | 4.5890 | 0.17762 | 25.8 |
| Sphere | 64213.3 | 13.595 | 4720 |

The downside of this change is that there will be two implementations
for these three primitives, in these nodes and in `bmo_primitive.c`.
One option would be re-implementing the BMesh primitives in terms of
this code, but that would require `BMesh` to depend on `Mesh`, which
is currently avoided. On the other hand, it will be easier to add new
features to these nodes like different fill types for the top and the
bottom of a cylinder, rings for a cylinder, and tagging the output with
boolean attributes. Another factor to consider is that the add mesh
object operator could be implemented with these nodes, just providing
more benefit for a faster implementation.

As a future cleanup, there is room to share code that generates the
"rings" topology between different nodes that generate meshes.

Differential Revision: https://developer.blender.org/D10730
April 7, 2021, 16:44 (GMT)
Fix T87263: Animation decorator not working on Grease Pencil Build modifier Factor value

When having a checkbox and a value both in one row together with an
animation decorator it is questionable whether the decorator should act
on animating the checkbox or the corresponding value. At the moment,
usage in modifiers does not seem to be very consistent:

Here the animation decorator works for animating the checkbox:
- `Build` (greasepencil) > `Factor` (this was reported and is changed in
this patch to act on the value instead of the checkbox)
- `DataTransfer` > `Topology Mapping` > `Max Distance` (this I guess
should also act on the value instead of the checkbox)
- `Edge Split` > `Edge Angle` (questionable)
- `Mirror` > `Merge` (questionable)
- `Screw` > `Merge` (questionable)
- `Wireframe` > `Crease Edges` (questionable)

Here the animation decorator works for animating the value:
- `VertexWeightEdit` > `Group Add/Remove Threshold`
- `Decimate` > `Symmetry`

So in this patch only the behavior in the greasepencil Build modifier UI
is changed, since I think it is quite obvious that one would more often
use the decorator for animating the factor value than for animating the
checkbox.

Maniphest Tasks: T87263

Differential Revision: https://developer.blender.org/D10910
Revision 554d921 by Julian Eisel
April 7, 2021, 16:04 (GMT)
UI: Remove confusing "Unset" context menu entry

This was added in 37b82a2d260e, doesn't have much purpose and doesn't even do
anything in the vast majority of cases. It only affects custom properties. So
at the very least it shouldn't be shown for regular RNA property buttons. But
even for cases where it may do something, we couldn't find a good use-case. If
this operator has use-cases with some add-ons, the add-ons can expose it
differently, e.g. with a little 'x' icon next to the button, like it's done in
the keymap editor.

So removing the context menu entry now. Should this turn out to be a problem,
it can be brought back but much more selectively (only where it actually does
something). Or we could combine it with "Reset to Default".

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

Reviewed by: Brecht Van Lommel, Hans Goudey
April 7, 2021, 14:54 (GMT)
Fix T86463: Colored collection icons don't scale with zoom level

This patch fixes the issue in T86463 that colored collection icons in
the collection search box don't scale according to the zoom level.

The issue was caused by the drawing function for the colored
collection icons not allowing to change the size of the icons.
This patch addresses that by scaling the icon based on the drawing
width.

Reviewed By: #user_interface, natecraddock, Severin

Differential Revision: https://developer.blender.org/D10708
Revision 02a7289 by Hans Goudey
April 7, 2021, 14:12 (GMT)
Fix T87264: Button to remove physics modifier doesn't work

This is caused by rB9f323e9bf79f. When hover shortcuts are used,
we cannot use the modifier from the context (which will be the
active modifier), or they won't be hover shortcuts anymore!

There didn't use to be an editor-level "modifier" context variable,
which is why this worked before.

The fix is simple, just specify the modifier name for this particular
remove button.

Differential Revision: https://developer.blender.org/D10870
Revision 15670eb by Ankit Meel
April 7, 2021, 09:50 (GMT)
Cleanup: Fix pessimizing move warning.
Revision 2fbee45 by Hans Goudey
April 7, 2021, 05:32 (GMT)
Fix T87195: Boolean node multi-input socket only accepts one link

The default insert link callback for nodes was trying to move the
existing link away, since it didn't properly handle multi-input sockets
(though the problem wasn't exposed for the join node). We can basically
skip all of this "moving existing links" for multi-input sockets, unless
we are at the link limit.
Revision fd0a009 by Hans Goudey
April 7, 2021, 05:26 (GMT)
Cleanup: Various cleanup of node link handling functions

Use LISTBASE_FOREACH macro, rename variables, comment formatting,
simplification of logic, etc.
Revision e0a1a2f by Hans Goudey
April 6, 2021, 21:02 (GMT)
Geometry Nodes: Bounding Box Node

This commit adds a simple node to output the min and max of an
axis-aligned bounding box for the input geometry, as well a rectangular
prism mesh created from these values for convenience.

The initial use case for this node is a "bounding box boolean", where
doing the boolean with just a bounding box could be signigicantly
faster, for cases like cutting a hole in a wall for a window. But it's
easy to imagine other cases where it could be useful.

This node supports mesh and point cloud data right now, volume support
will come as a separate patch. Also note that there is plenty of room
to improve the performance of this node through parallelization.

Differential Revision: https://developer.blender.org/D10420
April 6, 2021, 17:02 (GMT)
Geometry Nodes: Use distance units for socket values

This adds the property subtybe `PROP_DISTANCE` where appropriate.

Differential Revision: https://developer.blender.org/D10900
April 6, 2021, 15:01 (GMT)
Fix T87236: crash reading file with grease pencil palettes

Caused by typo in {rB76689e851700}.

Since Palettes and bGPDpalette are not the same size, this would not
only cause a crash in versioning code, but could only go downhill from
here on.

Maniphest Tasks: T87236

Differential Revision: https://developer.blender.org/D10903
April 6, 2021, 13:49 (GMT)
BLI: return pointer to added resource

Without this, the caller often has to get the pointer to the
resource before adding it to the resource scope.
April 6, 2021, 13:41 (GMT)
Fix T86889: Rotation with top plane view glitches

The `InputAngle` function uses a flawed algorithm to fix precision issues.

This commit refactor the logic of that function by using BLI utilities.

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