102796 Commits

Author SHA1 Message Date
Pablo Vazquez
bae4d00e2a UI: Use gray color for float sockets in nodes
The shade is too close to RGBA sockets.

Related to T82689
2021-01-13 17:17:54 +01:00
Hans Goudey
7d749720ad UI: Use capital letters for X Y and Z axes
Also add another comma and use plural "axes".
2021-01-13 10:13:00 -06:00
Hans Goudey
8df0268e2b Geometry Nodes: Rename "Rotate Points" to "Point Rotate"
This is consistent with the other node names, giving (almost) all of the
nodes in the "Point" category the same prefix.
2021-01-13 10:10:25 -06:00
Hans Goudey
80578a9d54 Geometry Nodes: Rename boolean input sockets
"Geometry A" becomes "Geometry 1", just to be more consistent
with other nodes.
2021-01-13 10:00:20 -06:00
Julian Eisel
2771dfd563 UI: Revert design changes to data-block selector for the 2.92 release
Partially reverts 2250b5cefee7.

Removing the user count and fake user count icons was controversial (which was
expected) and there are a few further changes needed, that won't make it in
time for the release, see D9946.
While there is a design to bring back the user count and fake user indicators,
a new design idea was proposed that the UI team wants to follow. This came too
late for the 2.92 release, the new design is targeted at the 2.93 release now.
Meanwhile, UI team decision was to simply revert the design changes.

The new design is being worked on in https://developer.blender.org/T84669.

Note that this commit does not revert some internal changes done in
2250b5cefee7. Namely the introduction of `ed_util_ops.c` and data-block
operators in there. These will still be needed in the new design.
2021-01-13 15:31:02 +01:00
Hans Goudey
ad4202a14f Cleanup: Remove unecessary namespace prefixes 2021-01-13 08:29:03 -06:00
Hans Goudey
89f490932f Geometry Nodes: Enable exposing object and collection sockets
This patch allows connecting wires for object and collection socket
types to the "Group Input" node, which exposes them to be adjusted
in the modifier.

Thanks to @angavrilov's recent work in rB8964c02348f6, it is now
possible to edit pointer IDProperties in the interface when they are
drawn with `uiItemPointerR`.

This patch is composed of a few changes:
  - Add code to create pointer properties in the modifier settings for
    object and collection sockets, and also to draw them in the UI.
  - Also search through the modifier's `IDProperty` settings to find IDs
    used by the modifier.
  - Change the setting's UI layout to support the change.

Differential Revision: https://developer.blender.org/D10056
2021-01-13 08:13:57 -06:00
Eric Bickle
55c56f1ffb Fix T79356: Improved icons for MSIX builds
Fixed an issue that was causing the app icon to render with a
'plated' background color in the taskbar and other areas of Windows.

Updated all app icons in Microsoft Store package to match Microsoft's
design recommendations.

Added multiple scales for app icons for high resolution displays.

Added high contrast app icons.

Reviewed By: pablovazquez, jmonteath

Maniphest Tasks: T79356

Differential Revision: https://developer.blender.org/D9681
2021-01-13 14:42:05 +01:00
Jeroen Bakker
5f411f7f38 Revert "Fix T79356: Improved icons for MSIX builds"
This reverts commit 78011d712dc311768a501b31917f2eef27af753b.
2021-01-13 14:31:52 +01:00
Eric Bickle
78011d712d Fix T79356: Improved icons for MSIX builds
Fixed an issue that was causing the app icon to render with a
'plated' background color in the taskbar and other areas of Windows.

Updated all app icons in Microsoft Store package to match Microsoft's
design recommendations.

Added multiple scales for app icons for high resolution displays.

Added high contrast app icons.

Reviewed By: pablovazquez, jmonteath

Maniphest Tasks: T79356

Differential Revision: https://developer.blender.org/D9681
2021-01-13 13:32:00 +01:00
Jacques Lucke
d985751324 Geometry Nodes: improve Point Distribute node
This greatly simplifies the Point Distribute node. For a poisson disk
distribution, it now uses a simpler dart throwing variant. This results
in a slightly lower quality poisson disk distribution, but it still
fulfills our requirements: have a max density, minimum distance input
and stability while painting the density attribute.

This new implementation has a number of benefits over the old one:
* Much less and more readable code.
* Easier to extend with other distribution algorithms.
* Easier to transfer more attributes to the generated points later on.
* More predictable output when changing the max density and min distance.
* Works in 3d, so no projection on the xy plane is necessary.

This is related to T84640.

Differential Revision: https://developer.blender.org/D10104
2021-01-13 12:44:17 +01:00
Jacques Lucke
ed1042ee06 Geometry Nodes: cleanup attribute usage
Now that typed attribute wrappers don't need to own the
attribute anymore, many `std::move` calls can be removed.
2021-01-13 12:27:38 +01:00
Sergey Sharybin
76fd41e9db Depsgraph: Remove redundant copy-on-write operations
This change removes copy-on-write operations from ID nodes which do not
need copy-on-write.

Should be no functional changes, as before the copy-on-write operation
would do nothing for those nodes anyway.
2021-01-13 12:13:35 +01:00
Sergey Sharybin
0f95f51361 Fix T83411: Crash when using a workspace/layout data path in a driver
Building IDs which are not covered by copy-on-write process was not
implemented, which was causing parameters block not present, and, hence
causing crashes in areas which expected parameters to present.

First part of this change is related on making it so Copy-on-Write is
optional for ID nodes in the dependency graph.

Second part is related on using a generic builder for all ID types
which were not covered by Copy-on-Write before.

The final part is related on making it so build_id() is properly
handling ParticleSettings and Grease Pencil Data. Before they were not
covered there at all, and they need special handling because they do
have own build functions.

Not sure it worth trying to split those parts, as they are related to
each other and are not really possible to be tested standalone. Open
for a second opinion though.

Possible nut-tightening is to re-organize build_id() function so
that every branch does return and have an assert at the end, so that
missing ID type in the switch statement is easier to spot even when
using compilers which do not report missing switch cases.

As for question "why not use default" the answer is: to make it more
explicit and clear what is a decision when adding new ID types. We do
not want to quietly fall-back to a non-copy-on-write case for a newly
added ID types.

Differential Revision: https://developer.blender.org/D10075
2021-01-13 12:13:34 +01:00
Brecht Van Lommel
2cd091e9c7 Fix Cycles not taking into account CYCLES_SHADER_PATH for finding stdcycles.h
Contributed by howetuft.

Differential Revision: https://developer.blender.org/D9973
2021-01-13 12:12:36 +01:00
Jesse Y
dc170a6d67 Fix: popout windows are sized incorrectly on high DPI screens
There should be a conversion to native pixel size as expected by GHOST at the
window manager level, the dimensions at screen level do not need a conversion.

Differential Revision: https://developer.blender.org/D9976
2021-01-13 12:12:36 +01:00
Alexander Gavrilov
8964c02348 RNA: allow editing pointer IDProperty values from the UI.
Currently it is not possible to edit bare IDProperty pointer
values which are not explicitly defined through python via
UI fields. This is likely mostly because, unlike numeric values,
pointers aren't marked PROP_EDITABLE by default. However there
are also some bugs in the RNA code that need fixing.

The Geometry Nodes modifier uses bare properties to store
input settings for the node group it wraps, so supporting
Object and Collection sockets requires editable pointers.

This patch marks bare IDProperties editable, and ensures
that changing ID pointers rebuilds the dependency graph.
A type check is needed because an IDPROPERTY PointerPropertyRNA
can actually wrap a group value rather than an ID pointer.

Making pointers editable is not likely to accidentally
affect UI fields that were not intended to be editable,
because a simple `layout.prop` cannot determine which
datablocks to display in the menu and remains read-only.

The PROP_NEVER_UNLINK flag is also removed: it seems it
was added because the edit field that couldn't produce
a menu to set the pointer used to still display the unlink
button, but that seems not to be the case anymore.

Actual support for Object & Collection inputs in the modifier
is added in D10056, which can be used to test this code.

Differential Revision: https://developer.blender.org/D10098
2021-01-13 14:09:31 +03:00
Alexander Gavrilov
8185d07ace RNA: fix a crash when setting bare IDProperty pointers.
The rna_idproperty_check call should be done before accessing
the prop pointer so that it can detect IDProperty values and
replace them with the actual PointerPropertyRNA object.

Ref D10098
2021-01-13 14:09:31 +03:00
Jeroen Bakker
38df935c09 Fix T84646: Compositor: In Blender 292 "Set Alpha" node is undefined
Incorrect version code introduced by 9dbea1db66da would not check inside
node groups.
2021-01-13 12:07:26 +01:00
Julian Eisel
aed5b88ec1 Asset System: Disable Asset Browser as experimental feature
The Asset Browser will be disabled and not available for the 2.92 release. In
alpha/beta builds, there will be an "Asset Browser" option under Preferences >
Experimental, if the developer extras are enabled.
Note that this also disables related UI elements (e.g. "Mark Asset" buttons,
Preferences settings for asset libraries, etc.).

The code is still in master of course, development and testing will continue
there. But there simply needs to be too much polishing and fixing before the
2.92 release, plus there are some design decisions to be reevaluated.

Check the milestone 1 project to follow ongoing work:
https://developer.blender.org/project/view/124/
2021-01-13 11:10:17 +01:00
Robert Guetzkow
27b78c9c94 Compositor: "Save as Render" for the file output node
This commit adds the "Save as Render" feature to the file output node,
that allows to disable the application of the configured view transform
and other color management settings on the image. If disable it uses
the standard view transform instead. This feature was originally
suggested in T83842 and is part of the color management improvements
task in T68926. With this feature it is possible to toggle the
application of the color management settings for each input socket
of the File Output node individually.

Reviewed By: brecht

Maniphest Tasks: T68926, T83842

Differential Revision: https://developer.blender.org/D9921
2021-01-13 11:04:02 +01:00
Jacques Lucke
614bd239f8 Geometry Nodes: support optional ownership for typed attributes
This will simplify some code in an upcoming commit and will be
useful for T83793.
2021-01-13 10:48:39 +01:00
Campbell Barton
7b68d0679e Cleanup: rename enum for event value items
This contains all value items (with overlapping values),
name this to make it clear it contains all items.
2021-01-13 19:58:57 +11:00
Campbell Barton
7af8271c34 Fix WM_event_print error printing tweak events value 2021-01-13 19:56:49 +11:00
Campbell Barton
ba44919601 Fix Event.value RNA access with tweak event types
Accessing event.value would return unrelated values such as
PRESS, RELEASE, CLICK... etc. instead of NORTH, SOUTH... etc.
2021-01-13 19:56:40 +11:00
Sebastián Barschkis
0b711e6758 Fluid: Updated Mantaflow source files
Includes minor fixes / cleanups from the viscosity plugin.
2021-01-13 09:49:38 +01:00
Hans Goudey
3f7c294a95 Mix modifiers test after commit to bevel modifier defaults
{rB6b5e4ad5899d} neglected to update the modifier tests to reflect
the fact that the default limit method is no longer "NONE".
2021-01-12 23:54:46 -06:00
Campbell Barton
97a6b3ceee Cleanup: use single quotes for enum literals 2021-01-13 16:41:12 +11:00
Campbell Barton
37c5552742 Fix memory leak with image drag and drop
Dragging an image from the file selector into the sequencer
was leaking memory.

Regression in b5d778a7d4072bfb091198a2094890157a6d017b.
2021-01-13 16:23:14 +11:00
Philipp Oeser
5d99199880 Fix T83084: Smart UV Project inverts the resulting UVs
Caused by 850234c1b10a828678f1b91001f2731db807f7e2,

Flip the normal to avoid flipped projection.
2021-01-13 13:37:14 +11:00
Campbell Barton
92826a921c Cleanup: spelling 2021-01-13 13:21:29 +11:00
Campbell Barton
bc58425862 Cleanup: clang-format, trailing space 2021-01-13 13:15:22 +11:00
Hans Goudey
b9e02eace6 UI: Clarify the property name of "F-Curve Visibility"
"F-Curve Visibility" is a bad UI label for a property that only affects
the display of unselected F-Curves. This commit clarifies the property
name by making it more specific with the word "Unselected", and by using
the word "Opacity". "F-Curve" is redundant in the UI label anyway because
it is included in the panel title.

Resolves T82587

Differential Revision: https://developer.blender.org/D10027
2021-01-12 19:14:57 -06:00
Hans Goudey
6b5e4ad589 Bevel Modifier: Use angle limit method by default
This right click select post outlines the reasons to make "Angle" the
default limit method: https://blender.community/c/rightclickselect/BVfbbc/
In short: Beveling every single edge rather than just sharp edges is
rarely the desired behavior, and the placement of the property in the UI
makes it easy to see the property's importance and toggle it.

Differential Revision: https://developer.blender.org/D8961
2021-01-12 18:55:27 -06:00
Hans Goudey
719bea0d6d Geometry Nodes: Output the most complex attribute data type
In order to avoid losing information, it sometimes makes sense for the
output attribute type to depend on the types of the input attributes.

Such a function already exists, `attribute_data_type_highest_complexity`,
it just needs to be used in a few more places. The change for the attribute
compare node is just so the code there uses the same code style as in the
attribute mix node.

Addresses part of T83793
Differential Revision: https://developer.blender.org/D10099
2021-01-12 14:03:35 -06:00
Aaron Carlisle
6c15b70279 UI: Update Clip Tracking menus
- Add operators that previously could only be found in panels
- Re order menus to match other menus
- Organize Code

|Before|After|
|{F9493583}|{F9493584}|
|{F9493585}|{F9493586}|
|{F9493588}|{F9493590}|
|{F9493591}|{F9493592}|

Reviewed By: sergey, sebastian_k, #motion_tracking

Differential Revision: https://developer.blender.org/D9781
2021-01-12 14:45:20 -05:00
Hans Goudey
bf5d45fd99 Cleanup: Fix incorrect function name
The function used "domain" incorrectly where it meant "data type".
2021-01-12 11:47:51 -06:00
Sergey Sharybin
abbc43e4e4 Fix T84397: Creating and removing many objects very quickly causes a crash
The root of the issue was caused by the dependency graph using ID pointer
to map evaluated state from old depsgraph to new one upon relations update.
This was failing when IDs were re-allocated rapidly: was possible that
Object ID's evaluated state assigned to Mesh and vice versa.

Now depsgraph uses Session UUID to identify which IDs to restore evaluated
state to. The session UUID is stored in the IDNode, so that id_orig is not
dereferenced on depsgraph update since the ID might be freed.

The root of the issue is identified by Campbell, original patch was done
by Bastien, thanks! Also thanks to Oliver and Ray and everyone else for
testing!
2021-01-12 17:16:48 +01:00
Jeroen Bakker
957e292c58 Fix T64953: Add cryptomatte meta data to file output node.
This change will try to add meta data when using a multilayered open
exr file output node in the compositor. It adds the current scene meta
data and converts existing cryptomatte keys so it follows the
naming that is configured in the file output node.

This change supports the basic use-case where the compositor is
used to output cryptomatte layers with a different naming scheme to
support external compositors. In this case the Multilayered OpenEXR
files are used and the meta data is read from the render result.

Meta data is found when render layer node is connected with the
file output node without any other nodes in between. Redirects and empty
node groups are allowed.

The patch has been verified to work with external compositors.
See https://devtalk.blender.org/t/making-sense-of-cryptomatte-usage-in-third-party-programs/16576/17

See patch for example files.

Reviewed By: Sergey Sharybin

Differential Revision: https://developer.blender.org/D10016
2021-01-12 16:24:26 +01:00
Sybren A. Stüvel
c3b68fa7b1 Fix T81965: Library-Override Not able to edit Keyframe properties
Fix keyframe properties not being editable when animating a
library-overridden datablock.

The problem was that RNA pointers were created based on the datablock
affected by the animation (for example an Object), instead of the
datablock that contains the FCurve itself (the Action). The latter can
be local to the current blend file and should thus be editable, even
when the former is not.

Reviewed By: mont29

Maniphest Tasks: T81965

Differential Revision: https://developer.blender.org/D10091
2021-01-12 15:43:42 +01:00
Jeroen Bakker
c96d596f43 GPU: Remove Limited Support AMD Polaris
Removing the limited support message as the known opengl issues of the
recent drivers with polaris cards have been tackled.
2021-01-12 13:54:50 +01:00
Sybren A. Stüvel
b2ad52a763 Tests: skip unit test if built without ocean sim modifier
Disable the Ocean Sim test when building with `WITH_MOD_OCEANSIM=OFF`.
2021-01-12 13:50:29 +01:00
Campbell Barton
e0a4b392f3 Cleanup: use exact check for fread, move out of the loop
Without this, additional items could be added in the future
which wouldn't be included in the check.

Move the check out of the loop since this is such an unlikely
situation that checking every iteration isn't needed.

Also remove redundant casts.
2021-01-12 23:31:34 +11:00
Campbell Barton
28b17ef0e6 Cleanup: replace 'long long' with int64_t in imbuf indexer 2021-01-12 23:31:34 +11:00
Jacques Lucke
3b77bd48f9 Geometry Nodes: new Align Rotation to Vector node
This adds a new Align Rotation to Vector node based on the mockup
in T83669.

Reviewers: HooglyBoogly, simonthommes

Differential Revision: https://developer.blender.org/D10081
2021-01-12 12:55:14 +01:00
Jacques Lucke
3a254b93fd Geometry Nodes: support reading from spans of WriteAttribute
Previously, the span returned by `WriteAttribute`s might not contain the
current value of the attribute for performance reasons. To avoid some
bugs, the span now always contains the old values (they might have to
be copied over from the internal storage, dependending on how the
attribute is stored).
The old behavior is still available with the `get_span_for_write_only`
method. The span that it returns might not contain the current
attribute values. Therefore, it should only be used when you want
to overwrite an attribute without looking at the old values.
2021-01-12 12:50:29 +01:00
Alexander Gavrilov
58dae919e5 Weight Paint: avoid creating very small values with locked weights.
When painting using Auto-Normalize or Lock Relative with some
groups locked, the locked weights may not add up precisely to
1 because of precision limitations, which results in creating
nonzero weights close to FLT_EPSILON. With Lock Relative display
mode this is very obvious and annoying (random red points amid
black or blue), so add an epsilon check to consider less than
1e-6 unlocked weight to be the same as 0.

In addition, in cases when no weight can be painted due to locks,
don't create vertex group entries at all if they don't exist yet.
Also, don't run Auto Normalize when not painting a deform group.

Differential Revision: https://developer.blender.org/D10000
2021-01-12 14:32:05 +03:00
Robert Guetzkow
f5c0ef52cf Fix T84588: Cache access in rna_Particle_uv_on_emitter
The function `rna_Particle_uv_on_emitter` did not handle the case where
`particle->num_dmcache` was `DMCACHE_ISCHILD`. This resulted in an
incorrect offset for the `mtface` pointer. The commit checks for the
case and sets the offset accordingly, similar to existing code in
e.g. `particle_calculate_parent_uvs`.

Reviewed By: JacquesLucke

Differential Revision: https://developer.blender.org/D10072
2021-01-12 12:14:34 +01:00
Omar Emara
c56da67716 Fix: Bmesh from_object applies modifiers twice
The Bmesh from_object method applies modifiers twice when the input
deform is enabled and the input depsgraph is a render one.

The evaluated object already have modifiers applied, and
mesh_create_eval_final() applies modifiers again. To fix this, the
BKE_mesh_new_from_object() function is used instead.

Reviewed By: Brecht

Differential Revision: https://developer.blender.org/D10053
2021-01-12 13:07:12 +02:00
Bastien Montagne
26fd55fad1 UndoSys: Refactor step 1: cleanup and simplify logic in main undo/redo handlers.
* Simplify and clarify logic in `BKE_undosys_step_undo/redo_with_data_ex`,
  by adding early return on invalid situations, renaming some variables,
  and adding comments.
* Add more sanity checks in those functions.

No behavioral change are expected here, besides in potential edge-case,
invalid situations.

This is a preliminary change, before some deeper modifications of
`BKE_undosys` undo/redo API.

Differential Revision: https://developer.blender.org/D10033
2021-01-12 11:58:14 +01:00