Commit Graph

14002 Commits

Author SHA1 Message Date
Campbell Barton 97a6b3ceee Cleanup: use single quotes for enum literals 2021-01-13 16:41:12 +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
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
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
Campbell Barton 55059af01d Fix T84455: Circle select tool cursor draws in overlapping regions 2021-01-12 14:19:32 +11:00
Rahul Chaudhary acbda123ad UI: Icon for Multires Displacement Smear Tool
This commit adds the icon for the new tool.
2021-01-11 15:30:26 -06:00
Hans Goudey b9b59aa6de UI: Update geometry icon files
None of these changes should be visible, but the files were somehow
out of sync with the blend file, so they need to be updated to reflect
those changes.
2021-01-11 15:29:20 -06:00
Hans Goudey ecdbd83a8d Geometry Nodes: Attribute Vector Math Node
This patch implements the same operations and interface as the regular
vector math node, but it runs for every element of the attribute. This
should expand what's possible with geometry nodes quite a bit.

Differential Revision: https://developer.blender.org/D9914
2021-01-11 12:06:52 -06:00
Alexander Gavrilov e44e0e4e78 Cloth: add a vertex group setting to exclude from object collision.
This can be useful as a workaround on the boundary with the pinned
vertices in some situations among other things, and completely copies
the existing design of the self collision vertex group setting.

Differential Revision: https://developer.blender.org/D10043
2021-01-11 19:34:33 +03:00
Alexander Gavrilov ac290bfbe4 Collision: allow disabling collision without removing the modifier.
The `object.collision.use` flag was treated as a redundant marker
of the existence of the modifier, going as far as adding/removing
it when the value was changed, which is not actually very useful.
Removing the modifier loses its position in the stack, and requires
a dependency graph rebuild. It feels it may be a legacy flag?

What would be useful however is the ability to toggle collisions
dynamically without removing the modifier. This patch adjusts the
code to keep the modifier when the flag is disabled, and add it
if it doesn't exist when the flag is enabled. The modifier now
checks the flag at the start and quickly exits after cleaning
up stale data. The redesigned setting is exposed in the UI.

Collisions can't be disabled by simply using the modifier enable
flags because the modifier merely saves a snapshot of the mesh at
a certain point of the modifier stack for other objects to use,
and thus has to be able to clear the stale data.

Differential Revision: https://developer.blender.org/D10064
2021-01-11 19:34:32 +03:00
Jacques Lucke 98268e5c68 Cleanup: remove trailing whitespace 2021-01-11 15:49:42 +01:00
Richard Antalik 9441413cb2 VSE: Remove fit method tool setting from header
This property was intended to affect fit method for added strips prior
to running operator. However UI team did not agree with current
implementation.

ref T84535

Reviewed By: HooglyBoogly

Differential Revision: https://developer.blender.org/D10055
2021-01-10 16:37:18 +01:00
Philipp Oeser 6154aa1529 Cleanup: remove redundant decorator for eevee 'overscan_size'
All eevee scene properties are not animatable due to
`RNA_define_animate_sdna(false)` so there is no need for an animation
decorator here (would not show anyways).

Not sure if setting use_property_decorate to False and then manually
adding one again was a hack in rB7fc60bff14a6 to get the alignment
right, but seems to work good now without it.

Note: there also seems to be an inconsistency here generally:
- Eevee reserves room for an animation decorator in almost every panel
(except for "Sampling" and "Indirect Lighting") even though almost none
are animatable (except for stuff in "Hair" and "Film"). This looks nice
if multiple panels are expanded (except for mentioned "Sampling" and
"Indirect Lighting" -- maybe these should also reserve the room?)
- Cycles does not use animation decorators at all (even though pretty
much everything is animatable here -- maybe these should also use
animation decorators?)
- Then there is also the 'shared' "Grease Pencil", "Freestyle" and
"Colormanagement" -- these dont use animation decorators, but some stuff
is animatable...

Regarding the note: not sure what the guidelines here are, if this is
isolated to each panel then there is lots of stuff for eevee that could
set use_property_decorate to False, if multiple open panels are
considered (for nice visual consistency between them), then there is
romm for improvement elsewhere, too.

Maniphest Tasks: T81411

Differential Revision: https://developer.blender.org/D9164
2021-01-09 15:02:14 +01:00
Hans Goudey 9c07454816 Keymap: Enable repeat for "Make Edge/Face" operator
The "repeat" property was turned off by default in rBf5080c82dd91, but
it's important to have repeat turned on for this operator since it can be
used to fill large areas. This commit is similar to rBaa77689f77b4.

Fixes T84531
2021-01-08 17:19:04 -06:00
Hans Goudey 69a22a70ac Geometry Nodes: Don't start with empty group nodes selected
The nodes were selected in new node groups because they are by default,
but there's no particular reason for them to be selected, and it can
be distracting.
2021-01-08 16:29:10 -06:00
Hans Goudey 7fd19c20e0 Geometry Nodes: Gray out "New" button when curve object is active
Currently curve objects aren't supported by the node modifier, so the
new node group and modifier operator shouldn't be available.
2021-01-08 15:04:38 -06:00
Hans Goudey 3c1fcec652 Fix T84517: Two geometry node trees added with "New" button
Adding the modifier itself already adds a new node tree, which is
then displayed in the node editor because of the active object and
active modifier context. So there's no need to create the node tree
in the python code in this case.
2021-01-08 12:12:43 -06:00
Julian Eisel c549d736cf Icons: Update script to generate icons from SVGs for Inkscape 1.0
The command line syntax for Inkscape changed quite a bit for the 1.0 release,
see https://wiki.inkscape.org/wiki/index.php/Release_notes/1.0#Command_Line.
Think it's reasonable to expect Inkscape 1.0 or later be installed if you want
to generate the icons with the script. It's easy to get via the website, if the
distribution doesn't provide new enough packages. Only few people would use the
script anyway.

I also had to change the path for command line access on macOS which apparently
changed (https://stackoverflow.com/a/60068607). Although I didn't find a
mention of this change in the Inkscape release notes.
2021-01-08 15:07:54 +01:00
Richard Antalik f448ff2afe VSE: Hide cache settings and adjust defaults
Adjust default cache settings for all files to store raw and final
images.

All settings are still available when developer extras option is
enabled in user preferences.

This is part of design task T80278

Differential Revision: https://developer.blender.org/D9745
2021-01-08 07:24:55 +01:00
Juanfran Matheu 64277e8f3a UI: Use Eyedropper Cursor with Sample Weight Tool
While using the Sample Weight tool in Weight Paint mode, user eyedropper mouse cursor.

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

Reviewed by Pablo Vazquez
2021-01-07 09:44:48 -08:00
Juanfran Matheu e3d9241a05 UI: Show Weight Value with Sample Weight Tool
While using the Sample Weight tool in Weight Paint mode, show weight value in tool header.

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

Reviewed by Pablo Vazquez
2021-01-07 09:29:36 -08:00
Campbell Barton 987e9e2145 Fix T84469: Online manual raises an exception with key-map options
Report an error instead of raising a Python exception.

Currently these properties aren't written to the manual
so it's best to show an error.
2021-01-07 23:36:25 +11:00
Yevgeny Makarov dd0df3c5d2 UI: Fix various issues with UI text
- Use the name "Point Cloud" instead of "Pointcloud"
 - Fix a typo in UV_OT_smart_project.
 - Use the name "Install Light" to for the installation
   operator for MatCaps, HDRIs, and Studio Lights.

Fixes T83585, T65291, and T54921

Differential Revision: https://developer.blender.org/D9867
2021-01-06 22:54:10 -06:00
Philipp Oeser 290b6d7ef3 Fix T70316: Custom "Delete Keyframes" shortcut still requires
confirmation

Deleting keyframes in the dopesheet or graph editor always required
confirmation, even if used ouside of the "Delete" menus.

Now add a "confirm" option [same as for deleting objects], which can be
disabled for immediate keyframe deletion.

This will also change the default behavior and bring this in line with
how object deletion works so there is one shortcut for bringing up the
menu/confirmation and another shortcut to delete immediately without
requiring confirmation / another click:

- Blender Default keymap: "X" for menu, "Del" for immediate
- Industry Compatible: "Backspace" for menu, "Del" for immediate

Maniphest Tasks: T70316

Differential Revision: https://developer.blender.org/D9651
2021-01-06 11:35:06 +01:00
Hans Goudey c20e482714 Fix T78681: "Add Primitive" icons are cropped in tool header
The issue can be simply resolved by moving the primitives and plus
icons slightly. They still bump up against the top and bottom of the
header but it looks much better now.
2021-01-05 13:00:35 -06:00
Hans Goudey 5a6dfb7571 Fix T78017: Broken layout in "View Lock" panel with armature
The property split layout was broken when the bone dialog appeared,
because the name field was not set. Theoretically property split should
work in this case, but it makes sense to use the label anyway.
2021-01-04 17:32:22 -06:00
Hans Goudey ec90dda318 UI: Fix typo in operator description 2021-01-04 15:42:15 -06:00
Aaron Carlisle c7e92e379d Update RNA to manual url mappings 2021-01-02 17:51:56 -05:00
Aaron Carlisle e1b8af9ba7 Fix Unreported: Run time error in UI code
Steps to reproduce:

1. Add clip to clip editor
2. Open the tracking settings & tracking settings extra panels

To fix this the sub panel is only drawn if a track is active.
The main panel will exit early and display a "No active track" message.
This is consistent with other panels in the clip editor.

Reviewed By: HooglyBoogly

Differential Revision: https://developer.blender.org/D9727
2021-01-02 16:11:14 -05:00
Hans Goudey 057a8afb87 Fix T84024: Empty image opacity labeled transparency
This value really is the opacity, or the alpha, since a value of 1.0 means
that the image is fully visible, not invisible like "full transparency"
would suggest. Mistake in rBea4d28aea0343a.

Differential Revision: https://developer.blender.org/D9920
2021-01-01 12:07:42 -06:00
Bastien Montagne ae82410329 Fix T83749: Better handling of alpha in generic Nodes material wrapper for IO add-ons.
Try to detect if a given image may have valid alpha data or not (based
on number of channels and depth). This may be a bit doggy in theory, but
in practice it should cover most fields as expected. We can always
adjust the euristic here in other wrong cases appear.

This will affect all import add-ons using that node shader wrapper (at
least OBJ and FBX ones).
2020-12-29 16:38:40 +01:00
Bastien Montagne 823f0da702 Cleanup: UI messages fixes. 2020-12-28 10:22:02 +01:00
Julian Eisel aa64fd69e7 UI: List library overrides in the Outliner
Having a centeral place to find a list of all library overrides should be
useful for managing production scenes where library overrides are used a lot.
This change adds the individually overridden properties of a data-block under
the data-block itself. Just how we show modifiers, constraints or pose channels
there. This way we can also expose library override operations/options better
in future.

There's also a filter option for the library overrides now, so they can be
hidden. It is only available in the View Layer display mode though, like the
other filter options.

One internal change this has to do is adding more informative return values to
undo pushes and the library override functions called by it. That way we can
send a notifier when library overrides change for the Outliner to know when to
rebuild the tree.

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

Reviewed by: Andy Goralczyk, Bastien Montagne, William Reynish
2020-12-27 22:45:41 +01:00
Julian Eisel 960a0b892c Fix T84101: Duplicate operator not available for some data-block selectors
In some operators that previously allowed duplicating the selected data-block,
the operator would not be available now. 2250b5cefe split the "new" operators
into "new" and "delete" to allow clearly differentiating between the two. But I
apparently didn't amend all affected data-block selectors to use the added
"duplicate" operators.
I went over all operators that were split now and made sure all affected
data-block selectors are updated.
2020-12-27 15:55:58 +01:00
Yevgeny Makarov af316d2761 UI: Cleanup spelling of compound words
Approximately 138 changes in the spelling of compound words
and proper names like "Light Probe", "Shrink/Fatten", "Face Map".
In many cases, hyphens were used where they aren't correct, like
"re-fit". Other common changes include:
 - "Datablock" -> "data-block"
 - "Floating point" -> "floating-point"
 - "Ngons" -> "n-gons"

These changes help give the language used in the interface
a consistent, more professional feel.

Differential Revision: https://developer.blender.org/D9923
2020-12-24 13:11:22 -06:00
Yevgeny Makarov 2917f550ca Cleanup: Fix capitalization in various UI strings
Approximately 195 changes of capitalization to conform to MLA title style.
UI labels and property names should use MLA title case, while descriptions
should be capitalized like regular prose, generally with only the start of
a sentence capitalized.

Differential Revision: https://developer.blender.org/D9922
2020-12-24 11:07:32 -06:00
Jacques Lucke d8dc4c5b32 Geometry Nodes: new Rotate Points node
This node updates the "rotation" attribute on points.
Multiple ways to specify the rotation are supported.

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

Ref T83668.
2020-12-23 16:37:47 +01:00
Sebastián Barschkis 635694c0ff Fluid: Added new viscosity solver
Mainly updated the Mantaflow version. It includes the new viscosity solver plugin based on the method from 'Accurate Viscous Free Surfaces for Buckling, Coiling, and Rotating Liquids' (Batty & Bridson).

In the UI, this update adds a new 'Viscosity' section to the fluid modifier UI (liquid domains only). For now, there is a single 'strength' value to control the viscosity of liquids.
2020-12-23 15:48:38 +01:00
Sybren A. Stüvel 0e85d701c6 Animation: Bake Action, improved discontinuity filter for bones
Perform the same filtering as e5528904f1
introduced for object rotations, for bone rotations.
2020-12-22 10:04:21 +01:00
Nathan Craddock ffacce5be4 UI: Properties editor popover and outliner sync
This adds a popover to the properties editor. Currently the only setting
is for controlling outliner to properties syncing.

Because we cannot define a perfect heuristic to determine when
properties editors should change tabs based on outliner icon selection,
we need an option to enable or disable this behavior per properties
editor.

There are 3 options for controlling the syncing. Auto uses the heuristic
to only allow tab switching when a properties editor and outliner share
a border. On and off enable and disable syncing respectively.

Differential Revision: https://developer.blender.org/D9758
2020-12-21 14:31:32 -07:00
Bastien Montagne 626a9aae6d Fix part of T84004: Some 2.92 alpha UI strings can't be translated.
Adding 'new' (?) `heading` parameter of some UILayout functions...
2020-12-21 11:50:38 +01:00
Bastien Montagne c34ba26856 Fix part of T84004: Some 2.92 alpha UI strings can't be translated.
Not sure why, but py files from `bl_operators` were never considered for
i18n string extraction... They do define some UI strings though.
2020-12-21 11:35:02 +01:00
Bastien Montagne c9c3bf9833 Some more UI messages fixes... 2020-12-21 10:52:15 +01:00
Bastien Montagne 42e2dd2178 Fix some UI messages and update i18n spellcheck utils. 2020-12-21 10:49:33 +01:00
Yevgeny Makarov 478ba53270 UI: Fix text padding in some list widgets
Normally, pure text buttons have no padding at their edges so they
align with edges of buttons, see D9058. However, in several cases
there are labels aligned to the right side of a list widget row,
so they're missing padding against the right edge.

The fix is to use emboss = 'NONE' for such labels, which changes
the drawing style, adding padding on the right edge. (Normally so
labels aligned with the text from non-embossed buttons). This is
not necessarily intended, but it works properly.

For more information, see the revision.

Differential Revision: https://developer.blender.org/D9874
2020-12-20 11:27:02 -06:00
Hans Goudey 16527ebaba UI: Slightly improve alignment in selection tool icons
Parts of the tool icons for box, circle, lasso, and tweak select that were
meant to be flat or at a 45 degree angle were slightly misaligned, making
the edge look blurry.
2020-12-20 10:53:23 -06:00
Peter Fog 5a69f70751 VSE: Add options to select neighboring handles
Options added to `sequencer.select_handles()` operator.

Reviewed By: ISS

Differential Revision: https://developer.blender.org/D7707
2020-12-20 06:23:08 +01:00
Richard Antalik 38b77ef8b2 VSE: Remove cost calculation from cache
This value was meant to be used for keeping images that are slowest to
render in cache. Method of measurement was flawed, because it doesn't
take UI overhead into consideration.

Cache panel is to be removed because users should not have to tweak
settings like this. It is not useful for development either, therefore
it is removed completely.
2020-12-20 03:58:38 +01:00
Aaron Carlisle 0144b70948 Movie Clip: Annotation UI Improvements
Previously, the Annotation panels were a bit buggy in the movie clip editor.
This commit fixes the issue of the panel in the sidebar would disappear
when selecting  "Tracks" if no tracks were added to the clip.
To solve this issue the user if given a label text saying "No annotation source"

This commit also removes some grease pencil operators from the toolbar
that do not work with the new annotation system.

This commit also moves the data source choice from the toolbar to the sidebar.
This is needed to migrate the current toolbar to the new tool system
(see T83612)

Some old invalid code was also removed.

Reviewed By: #grease_pencil, antoniov

Differential Revision: https://developer.blender.org/D9729
2020-12-19 14:49:38 -05:00
Aaron Carlisle 6538f1e600 Compositor: New Exposure Node
This new node increases the radiance of an image by a scalar value.
Previously, the only way to adjust the the exposure of an image was with
math node or using the scene's color management.

Reviewed By: jbakker

Differential Revision: https://developer.blender.org/D9677
2020-12-19 14:41:14 -05:00
Hans Goudey 6942dd9f49 Fix T83868: Button animation states no longer visible without emboss
This bug was caused by making it so that non-embossed modifier icon
buttons could become an operator button and retain their red highlight
for disabled modifiers. The icon button needs emboss turned off, but
in earlier versions of Blender, `UI_EMBOSS_NONE` would be overridden
by animation or red alert states.

Instead of abusing "NONE" to mean "none unless there is animation or
red alert", this commit adds a new emboss flag for that situation,
`UI_EMBOSS_NONE_OR_STATUS`, which uses no emboss unless there is an
animation state, or another status. There are only a few situations
where this is necessary, so the change isn't too big.

Differential Revision: https://developer.blender.org/D9902
2020-12-18 17:13:15 -06:00
Julian Eisel 2250b5cefe UI: Redesigned data-block selectors
The previous design is rather old and has a couple of problems:

* Scalability: The current solution of adding little icon buttons next to the
  data-block name field doesn't scale well. It only works if there's a small
  number of operations. We need to be able to place more items there for better
  data-block management. Especially with the introduction of library overrides.
* Discoverability: It's not obvious what some of the icons do. They appear and
  disappear, but it's not obvious why some are available at times and others
  not.
* Unclear Status: Currently their library status (linked, indirectly linked,
  broken link, library override) isn't really clear.
* Unusual behavior: Some of the icon buttons allow Shift or Ctrl clicking to
  invoke alternative behaviors. This is not a usual pattern in Blender.

This patch does the following changes:

* Adds a menu to the right of the name button to access all kinds of operations
  (create, delete, unlink, user management, library overrides, etc).
* Make good use of the "disabled hint" for tooltips, to explain why buttons are
  disabled. The UI team wants to establish this as a good practise.
* Use superimposed icons for duplicate and unlink, rather than extra buttons
  (uses less space, looks less distracting and is a nice + consistent design
  language).
* Remove fake user and user count button, they are available from the menu now.
* Support tooltips for superimposed icons (committed mouse hover feedback to
  master already).
* Slightly increase size of the name button - it was already a bit small
  before, and the move from real buttons to superimposed icons reduces usable
  space for the name itself.
* More clearly differentiate between duplicate and creating a new data-block.
  The latter is only available in the menu.
* Display library status icon on the left (linked, missing library, overridden,
  asset)
* Disables "Make Single User" button - in review we weren't sure if there are
  good use-cases for it, so better to see if we can remove it.

Note that I do expect some aspects of this design to change still. I think some
changes are problematic, but others disagreed. I will open a feedback thread on
devtalk to see what others think.

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

Reviewed by: Bastien Montagne

Design discussed and agreed on with the UI team, also see T79959.
2020-12-18 18:28:04 +01:00
Jacques Lucke e5764013b0 Geometry Nodes: move Boolean node to mesh category
This node works on meshes specifically.
2020-12-18 13:33:24 +01:00
Dalai Felinto f43561eae6 Function Nodes: Input Vector
Ref: T82651

Normally people use "Combine XYZ" to input a vector, but it is more
interesting to have an explicit vector input.

So this is basically "Combine XYZ" without any input sockets, the values
are stored in the node itself.

Differential Revision: https://developer.blender.org/D9885
2020-12-18 13:03:27 +01:00
Sybren A. Stüvel b342e089c3 Fix mistake in Bake Action discontinuity fix
Fix mistake in e5528904f1 where one change accidentally wasn't included
in the commit.
2020-12-18 13:02:28 +01:00
Sybren A. Stüvel e5528904f1 Fix T83351: Baked object rotation has discontinuities
Fix Euler discontinuities in the Bake Action operator, by explicitly
using the previous Euler angles when converting from matrix to rotation.

This basically follows the same approach as used in e4ca1fc4ea, although
the Euler Discontinuity Filter also performs single-channel filtering which
the Bake Action operator doesn't.
2020-12-18 12:50:36 +01:00
Yevgeny Makarov ef17fb2715 UI: Don't use abbreviations in label text
Expand abbreviations for words like "Bright" (instead of "Brightness"),
"Premul", "Lib", "Dir", etc.

Differential Revision: https://developer.blender.org/D9862
2020-12-17 19:06:21 -06:00
Hans Goudey 48ddb94a26 Geometry Nodes: Point separate and attribute compare nodes
This patch adds two related nodes, a node for separating points
and mesh vertices based on a boolean attribute input, and a node
for creating boolean attributes with comparisons.

See the differential for an example file and video.

Point Separate (T83059)
The output in both geometries is just point data, contained in the mesh
and point cloud components, depending which components had data in the
input geometry. Any points with the mask attribute set to true will be
moved from the first geometry output to the second. This means that
for meshes, all edge and face data will be removed. Any point domain
attributes are moved to the correct output geometry as well.

Attribute Compare (T83057)
The attribute compare does the "Equal" and "Not Equal" operations by
comparing vectors and colors based on their distance from each other.
For other operations, the comparison is between the lengths of the
vector inputs. In general, the highest complexity data type is used
for the operation, and a new function to determine that is added.

Differential Revision: https://developer.blender.org/D9876
2020-12-17 12:22:47 -06:00
Jacques Lucke 0eedba328d Geometry Nodes: add Attribute Color Ramp node
Differential Revision: https://developer.blender.org/D9861

Ref T82585.
2020-12-17 11:56:18 +01:00
Julian Eisel 2945c1e3e5 Fix asset data-block name button not showing up in custom repositories
The Python syntax was wrong, as noted by Campbell in 0ae15e68c7.
2020-12-17 11:39:45 +01:00
Hans Goudey 9f588432e9 Fix T83861: Snapping panel from shortcut dissapears after click
This simple change sets the call_panel operator's "keep_open" property
to True for the viewport snapping panel called with `ctrl-shift-tab`.
There are quite a few settings in this panel, it often makes sense to
change more than one of them at a time, especially because multiple
snap elements can be active at the same time.
2020-12-16 14:40:30 -06:00
Richard Antalik 5713626422 VSE: Improve motion-picture workflow
This commit resolves problem introduced in e1665c3d31 - it was
difficult to import media at their original resolution.
This is done by using original resolution as reference for scale.

All crop and strip transform values and their animation is converted
form old files.

To make both workflows easy to use, sequencer tool settings have been
created with preset for preffered scaling method. This setting is in
sequencer timeline header and add image or movie strip operator
properties.

Two new operators have been added:
`sequencer.strip_transform_fit` operator with 3 options: Scale To Fit,
Scale to Fill and Stretch To Fill.
Operator can fail if strip image or video is not loaded currently, this
case should be either sanitized or data loaded on demand.

`sequencer.strip_transform_clear` operator with 4 options:
Clear position, scale, rotation and all (previous 3 options combined).

Reviewed By: sergey, fsiddi

Differential Revision: https://developer.blender.org/D9582
2020-12-16 20:38:28 +01:00
Pablo Dobarro d23894d3ef Sculpt: Multires Displacement Smear
This tool implements smearing for multires displacement over the limit
surface, similar to how smearing for colors and topology slide works.
When used the displacement values of the vertices "slide" over the
topology, creating the effect of smearing the surface detail.

As the brush just modifies displacement values instead of coordinates,
the total displacement of the affected area doesn't change. This means
that this smearing effect can be used multiple times over the same area
without generating any artifacts in the topology.

When the brush is used with the pinch or expand smear modes,
displacement differences are pushed into the same area, creating hard
surface effects without pinching the topology.

As any other brush that relies on the limit surface (like displacement
erasers), this will work better after using apply base.

Reviewed By: sergey, JulienKaspar, dbystedt

Differential Revision: https://developer.blender.org/D9659
2020-12-16 17:08:19 +01:00
Campbell Barton 245450b144 Fix exported keymaps loading in 2.91 and older
The generated keymaps used a keyword argument that doesn't exist
in older Blender versions.
2020-12-17 00:53:28 +11:00
Valdemar Lindberg 69c3f4a46d Fix 3D View is red when using stereo
Fix T83415: 3D View is red when using stereo

The red view was caused by SRGB not being enabled for an SRGB texture attached to the framebuffer.
Currently, when configuring a framebuffer, the first texture attachment needs to be an SRGB format in order for the framebuffer to be binded with SRGB enabled.
Thus, simply changing the SRGB texture attachment as the first texture attachment removes the red color in the view.

Reviewed By: #eevee_viewport, jbakker

Maniphest Tasks: T83415

Differential Revision: https://developer.blender.org/D9845
2020-12-16 14:21:51 +01:00
Jacques Lucke 4c26dd430d Geometry Nodes: rename node to Attribute Randomize
Previously, the node was called Random Attribute. For consistency reasons,
we move the "Attribute" part of the name to the front.
2020-12-16 13:31:56 +01:00
Julian Eisel 58d818f8be Assets: Add operator & button to regenerate the automatic preview
This makes it possible to trigger a refresh of the data-block preview,
available next to the preview in the Asset Browser sidebar. The previews get
easily outdated and automatically refreshing it all the time is not an option
because it would be a consistently running, quite expensive process. So a
button to cause a refresh should be reasonable.

This button can also be used to switch back from a custom preview to a
generated one. Although that may not be clear, and we should probably think of
a way to explain that better.

Addresses T82719.
2020-12-16 12:10:58 +01:00
Julian Eisel c7a500e3a0 Asset Browser UI: Changes to the sidebar layout
The current layout wasn't great at all, and it was planned to polish this. This
does a first round of improvements, some more tweaking may follow.
* Place name button at the top, with no panel and no leading label.
* Add "Preview" panel, people may not want to see the preview all the time,
  it's already visible in the file list.
* Move button to browse for a custom preview to the right of the preview, as
  icon-only. We have a similar layout in other places (UI-lists, matcaps).
* Don't make the details panel a sub-panel. Looked weird because the parent
  doesn't have a header.
* Add info icon to "No asset selected", looks a bit friendlier.
* Minor cleanups in the UI script.

Based on designs and feedback by William Reynish.
2020-12-16 12:10:58 +01:00
Julian Eisel 19fc30c15f Assets UI: Tweak position of the "Add Asset Library" icon-button in Preferences
It's weird to have a button that adds a new item at the bottom be placed at the
top. So rather move it below the list of custom asset library paths.
2020-12-16 12:10:58 +01:00
Julian Eisel 0ae15e68c7 Asset Browser: Allow renaming asset data-blocks from the sidebar directly
This is something we wanted to support doing. It's confusing if users see the
name but it's always grayed out. So be convenient and avoid the confusion.
2020-12-16 12:10:58 +01:00
Nathan Letwory 975ca91939 Steam Release: Script creation of Steam build files
Script tool for automation of Steam build files for tasks like {T77348}

This script automates creation of the Steam files: download of the archives,
extraction of the archives, preparation of the build scripts (VDF files), actual
building of the Steam game files.

Requirements
============

* MacOS machine - Tested on Catalina 10.15.6. Extracting contents from the DMG
  archive did not work Windows nor on Linux using 7-zip. All DMG archives tested
  failed to be extracted. As such only MacOS is known to work.
* Steam SDK downloaded from SteamWorks - The `steamcmd` is used to generate the
  Steam game files. The path to the `steamcmd` is what is actually needed.
* SteamWorks credentials - Needed to log in using `steamcmd`.
* Login to SteamWorks with the `steamcmd` from the command-line at least once -
  Needded to ensure the user is properly logged in. On a new machine the user
  will have to go through two-factor authentication.
* App ID and Depot IDs - Needed to create the VDF files.
* Python 3.x - 3.7 was tested.
* Base URL - for downloading the archives.

Reviewed By: Jeroen Bakker

Differential Revision: https://developer.blender.org/D8429
2020-12-16 11:15:18 +01:00
Jeroen Bakker 9cbfcc4af5 Revert "Steam Release: Script creation of Steam build files"
This reverts commit 1a375d6ece.
2020-12-16 11:11:15 +01:00
Nathan Letwory 1a375d6ece Steam Release: Script creation of Steam build files
Script tool for automation of Steam build files for tasks like {T77348}

For in-depth information see the README.

Related Wiki page: https://wiki.blender.org/wiki/Process/Release_On_Steam

Reviewed By: jbakker

Maniphest Tasks: T77348

Differential Revision: https://developer.blender.org/D8429
2020-12-16 11:07:10 +01:00
Campbell Barton e671c548e6 Cleanup: pep8 2020-12-16 18:02:40 +11:00
Vincent Blankfield f34ca933a8 UI: include the category for add-ons search
This lead to some confusion, see T83747.

Now the category is included in the search when the category is "All".

Ref D9848
2020-12-16 16:35:26 +11:00
Peter Fog fad80a95fd VSE: Add Overlay popover panels
Add panels with overlay settings for strips and preview and overlay
enable/disable button.

Entries from the View menus moved to the overlay panels, which will
simplify cluttered View menus.

Additional options have been added:
 - Strip Name
 - Strip Source(ex. path)
 - Strip Duration

So users can now select what info they need to see on the strips. When
No text is displayed, waveforms are drawn in full height.

Reviewed By: ISS, HooglyBoogly, pablovazquez

Differential Revision: https://developer.blender.org/D9751
2020-12-15 23:50:18 +01:00
Peter Fog f44dea0558 VSE: Reorder Tools in Sequencer/Preview
When in Sequencer/Preview mode, the Sampler was on top, which normally
is the place of Select, and Annotation seems to be after Sampler in the
bottom in the various editors.

Reviewed By: ISS

Differential Revision: https://developer.blender.org/D9821
2020-12-15 22:30:01 +01:00
Peter Fog dd9d12bf45 VSE: Paste strips after playhead by default
Paste copied strips after playhead, because this is more intuitive.

Previous functionality is still available by enabling "Keep Offset"
property, or under shortcut Ctrl+Shift+V.

Reviewed By: ISS

Differential Revision: https://developer.blender.org/D9734
2020-12-15 22:30:01 +01:00
Julian Eisel 2d6a69ae4e Asset System: New Asset Browser editor
This introduces the User Interface part of the Asset Browser, based on the
design in T54642.

Additions:
* New Asset Browser (internally a sub-editor of the File Browser).
* Navigation region showing asset categories.
* Main region showing the assets of the selected asset library with previews.
  The assets may be stored over multiple .blends in the directory that's
  "mounted" as asset library in the Preferences. They will all be shown in this
  list.
* Header with an asset library dropdown, allowing to choose the active asset
  library to show. Options are the "Current File" as asset library and all
  custom libraries.
* Display popover, filter popover and search box (partially dummies, see
  T82680).
* Sidebar showing the metadata of the currently active file (name, preview,
  description and tags), which can be edited for assets in the "Current File"
  asset library. (For others it will reset on reload.)
* The sidebar includes a button to load a custom preview image from a file.
* Make asset files draggable (with preview image).
* If a library with invalid path is selected, a message is drawn in the main
  region to help the user understand what's wrong.
* Operators to add and remove asset tags. Exposed in the sidebar.
* "Only Assets" option for Link/Append.
* Internal utilities for asset UI scripts.

For screenshots or demo videos, please see D9725. Or the 2.92 release notes.

Note that there are many things to be tweaked and polished in the Asset Browser
UI still. For example, the filter and display popovers are mostly dummies. See
T82680.

Part of the first Asset Browser milestone. Check the #asset_browser_milestone_1
project milestone on developer.blender.org.

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

Reviewed by: Brecht Van Lommel, Hans Goudey
2020-12-15 17:03:48 +01:00
Julian Eisel e413c80371 Asset System: Support custom asset library paths through Preferences
One of the core design aspects of the Asset Browser is that users can "mount"
custom asset libraries via the Preferences. Currently an asset library is just
a directory with one or more .blend files in it. We could easily support a
single .blend file as asset library as well (rather than a directory). It's
just disabled currently.

Note that in earlier designs, asset libraries were called repositories.

Idea is simple: In Preferences > File Paths, you can create custom libraries,
by setting a name and selecting a path. The name is ensured to be unique. If
the name or path are empty, the Asset Browser will not show it in the list of
available asset libraries.
The library path is not checked for validity, the Asset Browser will allow
selecting invalid libraries, but show a message instead of the file list, to
help the user understand what's going on.
Of course the actual Asset Browser UI is not part of this commit, it's in one
of the following ones.

{F9497950}

Part of the first Asset Browser milestone. Check the #asset_browser_milestone_1
project milestone on developer.blender.org.

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

Reviewed by: Brecht Van Lommel, Hans Goudey
2020-12-15 17:03:48 +01:00
Dalai Felinto 82645ff739 Move Point Cloud object back to Experimental Features
The geometry-nodes features no longer depend on the point cloud object.
Therefore the point cloud object, although important in the future, can
be postponed until we have render and edit mode fully working.

This reverts commits:
* ea74ed5a7a.
* dc614c68ef.
2020-12-15 13:07:55 +01:00
Antonio Vazquez 8e1b63d4bd GPencil: Add missing Pin icon for default eraser
This icon allows to set the default eraser when press Ctrl key and was removed by error in the brush refactor.
2020-12-14 11:31:01 +01:00
Antonio Vazquez 6327771bc9 Fix T83696: Add Additional menu to Effects panel
This adds the missing options for the effects as it is done in modifiers.

Reviewed By: HooglyBoogly

Maniphest Tasks: T83696

Differential Revision: https://developer.blender.org/D9838
2020-12-14 10:25:37 +01:00
Jeroen Bakker 8f3a401975 Eevee: Add Volume Transmittance to Color Render Passes.
In Cycles the volume transmittance is already composited into the color
passes. In Eevee the volume transmittance pass was separate and needed
to be composited in the compositor. This patch adds the volume
transmittance pass direct in the next render passes:

 * Diffuse Color
 * Specular Color
 * Emission
 * Environment

This patch includes the removal of the volume transmittance render pass.
It also renames the volume render passes to match Cycles. The setting
themselves aren't unified.

Maniphest Tasks: T81134
2020-12-14 09:27:58 +01:00
Yevgeny Makarov 977ef04746 Cleanup: Fix capitalization in various places
Approximately 33 changes of capitalization to conform to MLA title style.

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

Reviewed by Julian Eisel
2020-12-13 13:12:56 -08:00
Yevgeny Makarov bec583951d UI: Remove Unused 'U.wheellinescroll' Property
Remove 'U.wheellinescroll' preference, currently hidden and unused.

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

Reviewed by Brecht Van Lommel
2020-12-13 12:30:03 -08:00
Hans Goudey 4797c13e8f UI: Add more property editor operators to IC keymap
As a followup for rB2b3d85d7d6771, this commit adds the remove and
copy operators for grease pencil modifiers, effects, and constraints
where they apply.
2020-12-12 12:07:22 -06:00
Julian Eisel 0c1d476923 UI: Allow UI to pass focused data-block to operators via context
This is similar to c4a2067130130d, but applies to the general UI and is only
about single data-blocks. Here there was a similar problem: How can buttons
pass the data they represent to operators? We currently resort to ugly ad-hoc
solutions like `UI_context_active_but_get_tab_ID()`. So the operator would need
to know that it is executed on a tab button that represents a data-block.

A single button can now hand operators a data-block to operate on. The operator
can request it via the "id" context member (`CTX_data_pointer_get_type(C, "id",
&RNA_ID)` in C, `bpy.context.id` in .py).
In this commit, it is already set in the following places:
* Generic RNA button code sets it to the pointed to data-block, if the button
  represents a data-block RNA pointer property. (I.e for general data-block
  search buttons.)
* Data-block selectors (`templateID`) set it to the currently active data-block.
* The material slot UI-List sets it for each slot to the material it represents.
The button context menu code is modified so its operators use the context set
for the layout of its parent button (i.e. `layout.context_pointer_set()`).

No user visible changes. This new design isn't actually used yet. It will be
soon for asset operators.

Reviewed as part of https://developer.blender.org/D9717.
Reviewed by: Brecht Van Lommel
2020-12-11 23:08:29 +01:00
Dalai Felinto 85cb238820 Licenses: Attribution document
This document helps Blender users to known what is the library of each
individual 3rd party components that Blender depend on.

Generated using:
https://github.com/amzn/oss-attribution-builder

This is based on the libraries in extern and the svn libraries.

For the libraries in extern the README.blender was used as reference.
For the libraries in svn I used `cmake/versions.cmake`.

Note that the crediting is a bit of hit and miss. For some projects this
is very clear, while for others I had to do some digging. Either way I
gave my best shot.

The sources to (re-)generate this file is local at the moment. But it
should be moved to our infra-structure at some point.

Differential Revision: https://developer.blender.org/D9798
2020-12-11 18:44:11 +01:00
Yevgeny Makarov badbf816b8 UI: Consistent Range Descriptions
Unifying range descriptions as a value 'to' a value.

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

Reviewed by Julian Eisel
2020-12-11 07:35:44 -08:00
Jacques Lucke d72ec16e70 Geometry Nodes: add Attribute Mix node
This node can be used to mix two attributes in various ways.
The blend modes are the same as in the MixRGB shader node.

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

Ref T82374.
2020-12-11 12:00:48 +01:00
Evan Wilson 6e4fccd9fa Correct the order of the last two arguments in `eevee_cryptomatte_shading_group_create`
When compiling on Windows, the following warnings occur:
```[3468/4560] Building C object source\blender\draw\CMakeFiles\bf_draw.dir\engines\eevee\eevee_cryptomatte.c.obj
C:\blender-git\blender\source\blender\draw\engines\eevee\eevee_cryptomatte.c(306): warning C4047: 'function': 'bool' differs in levels of indirection from 'void *'
C:\blender-git\blender\source\blender\draw\engines\eevee\eevee_cryptomatte.c(306): warning C4024: 'eevee_cryptomatte_shading_group_create': different types for formal and actual parameter 5```

As @Severin pointed out [here](https://developer.blender.org/rB76a0b322e4d3244e59a154c8255b84a4fbc33117#288960), this is due to the last two arguments being flipped.  This diff corrects the order.

Reviewed By: Severin, fclem

Differential Revision: https://developer.blender.org/D9809
2020-12-11 08:45:05 +01:00
Campbell Barton 8cc951d2ae Cleanup: trailing space 2020-12-11 15:32:14 +11:00
Yevgeny Makarov a4a42f3171 UI: Use 'and' Instead of '&' in Descriptions
Use 'and' instead of ampersand in descriptions and comments.

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

Reviewed by Aaron Carlisle
2020-12-10 18:22:16 -08:00
Hans Goudey 348bd319d5 Geometry Nodes: Attribute Fill Node
This commit adds a node that fills every element of an attribute
with the same value. Currently it supports float, vector, and color
attributes. An immediate use case is for "billboard" scattering.

Currently people are using the same input to a Random Attribute node's
min and max input to fill every element of a vector with the same value,
which is an unintuitive way to accomplish the same thing.

Differential Revision: https://developer.blender.org/D9790
2020-12-10 07:58:45 -06:00
Campbell Barton 22959dc866 Fix missing custom-property escaping for whole-character keying set
Custom properties with characters that needed escaping
had f-curves created with invalid paths.
2020-12-10 19:31:22 +11:00
Campbell Barton b5bc9d80a1 PyAPI: add bpy.utils.unescape_identifier
Utility to perform the reverse of `bpy.utils.escape_identifier`
2020-12-10 14:40:01 +11:00
Pablo Dobarro d870a60dd9 Sculpt: Elastic deform type for Snake Hook
This adds deformation types to snake hook and the elastic deformation
type. This mode deforms the mesh using a kelvinlet instead of applying
the displacement directly inside the brush radius, which is great for
stylized shapes sketching.

Changes in rake rotation when using elastic are too strong when set
to 1, so I'll add a nicer way to support rake rotations with smoother
transitions in the future.

Reviewed By: sergey, JulienKaspar

Differential Revision: https://developer.blender.org/D9560
2020-12-09 22:25:16 +01:00
Jeroen Bakker baf84ecbe4 Workaround for Access Violation startup crash on deprecated Radeon GPUs on Windows
This is a workaround for T80804.

There's a startup crash that happens on 2.91.0 on Windows, an `EXCEPTION_ACCESS_VIOLATION`
on `atio6axx.dll`. It is triggered by `glClear` on the `detect_mip_render_workaround`
function. The workaround moves the function after the device/driver workaround section and
sets the flag to the affected one to avoid running the check.

It is deprecated hardware that has not meet the minimum requirements since 2.79, but is
still usable and this extends its usability a bit before the cards are finally blacklisted.

Reviewed By: Jeroen Bakker

Differential Revision: https://developer.blender.org/D9667
2020-12-09 12:15:15 +01:00
Jeroen Bakker 3a23f18e02 Blender LTS: Download + Release notes CMS scripts
This patch contains 2 scripts that will help with LTS releases

create_download_urls.py

    This python script is used to generate the download urls which we can
    copy-paste directly into the CMS of www.blender.org.

    Usage: create_download_urls.py --version 2.83.7

    Arguments:
      --version VERSION  Version string in the form of {major}.{minor}.{build}
                         (eg 2.83.7)

    The resulting html will be printed to the console.

create_release_notes.py
=======================

    This python script is used to generate the release notes which we can
    copy-paste directly into the CMS of www.blender.org and stores.

    Usage: ./create_release_notes.py --task=T77348 --version=2.83.7

    Arguments:
      --version VERSION  Version string in the form of {major}.{minor}.{build}
                         (e.g. 2.83.7)
      --task TASK        Phabricator ticket that is contains the release notes
                         information (e.g. T77348)
      --format FORMAT    Format the result in `text`, `steam`, `wiki` or `html`

Requirements
============

* Python 3.8 or later
* Python phabricator client version 0.7.0
  https://pypi.org/project/phabricator/

For convenience the python modules can be installed using pip.

    pip3 install -r ./requirements.txt

Differential Revision: https://developer.blender.org/D9055
2020-12-09 09:14:53 +01:00
Campbell Barton acc6373939 Fix custom-property UI allowing long names that raised errors
Rename `rna_property` to `rna_custom_property`
to differentiate it from a more general property.
2020-12-09 17:20:44 +11:00
Campbell Barton 3b5a81936d Fix custom property UI handling names with quotes and back-slashes
Custom property names wasn't escaping strings, causing exceptions
editing custom properties with characters that needed to be escaped.
2020-12-09 17:04:05 +11:00
Dalai Felinto 41fa1fea40 Removing ISC license
Blender actually uses the ICS license, not ISC.
2020-12-08 18:51:56 +01:00
William Reynish e258dfa421 UI: Add Heading to Curve Deform Toggles
Adds a heading to the three Properties Curve Deform toggles.

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

Reviewed by Julian Eisel
2020-12-07 13:35:50 -08:00
William Reynish 2b3d85d7d6 IC keymap: Properties and Modifier Changes
Updating Industry Compatible keymap for Property filtering and new Modifier behavior.

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

Reviewed by Julian Eisel
2020-12-07 13:34:06 -08:00
William Reynish 6858065754 Userprefs: Tooltips Section Layout Tweaks
Small improvements to the layout of the Tooltips section in Preferences.

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

Reviewed by Pablo Vazquez
2020-12-07 13:29:53 -08:00
Bastien Montagne 2072134faa UI: Fix mistakes in UI messages. 2020-12-07 10:57:27 +01:00
Jeroen Bakker 7d2745f8b3 Fix Cryptomatte panel not visible in EEVEE
Caused by {rB5baae026a86f}
2020-12-07 09:31:05 +01:00
Jeroen Bakker 5baae026a8 Cycles: Use Blender Cryptomatte Settings.
Blender has now the place to store the Cryptomatte settings. This patch
migrates Cycles to use the new settings.

Reviewed By: Brecht van Lommel

Differential Revision: https://developer.blender.org/D9746
2020-12-07 08:01:49 +01:00
Yevgeny Makarov 79eeabafb3 UI: 'About Blender' with Full Logo
New layout for the 'About' dialog featuring the full version of the Blender logo.

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

Reviewed by Hans Goudey
2020-12-06 10:29:26 -08:00
Bastien Montagne fe1f05de1b i18n utils CLI: add missing RTL process command. 2020-12-04 15:54:50 +01:00
Bastien Montagne ca4b809e63 i18n utils: Add first version of the CLI wrapper around i18n tools.
Plan is to use that in new 'buildbot' pipeline to automate generation of
i18n files for Blender.
2020-12-04 15:14:16 +01:00
Bastien Montagne b3306cf669 i18n utils: Add a helper to list and match po files with languages codes.
This code was previously done in the add-on, but we'll need it for the
CLI tool as well, so now it is a utils generator instead.
2020-12-04 15:14:16 +01:00
Bastien Montagne 06ae2e3a60 i18n utils : Reduce dependency to Blender bpy API, step 2.
Remove some top imports of bpy, only import it in a few specific
functions that only make sense when used whithin Blender anyway.
2020-12-04 15:14:16 +01:00
Bastien Montagne 7bd8b8cdac i18n utils: reduce dependency to Blender bpy API, step 1.
This involves re-implementing some of Blender-defined helpers in utils,
we keep debug code to ensure those are still matching on
behavior/results sides.

This will allow to get more i18n tools independent from blender
executable.
2020-12-04 15:14:16 +01:00
Bastien Montagne 69dd7e42c8 i18n utils: Cleanup. 2020-12-04 15:14:16 +01:00
Sybren A. Stüvel 6ed6741ee3 Point users to new location of "Show Group Colors" option
In ad85256e71 the "Show Group Colors" option was changed from a
per-editor option to a user preference. Since so many people wanted to
turn this option off, this makes sense. However, this move caused some
confusion because the option was just gone from the menu.

This commit adds a dummy menu item. It's disabled, and the tooltip
explains that the option can now be found in Preferences.

T83390 was created to track the removal of these hints.

Reviewed by: Severin

Differential Revision: https://developer.blender.org/D9735
2020-12-04 10:14:44 +01:00
Jeroen Bakker 76a0b322e4 EEVEE Cryptomatte
Cryptomatte is a standard to efficiently create mattes for compositing. The
renderer outputs the required render passes, which can then be used in the
compositor to create masks for specified objects. Unlike the Material and Object
Index passes, the objects to isolate are selected in compositing, and mattes
will be anti-aliased.

Cryptomatte was already available in Cycles this patch adds it to the EEVEE
render engine. Original specification can be found at
https://raw.githubusercontent.com/Psyop/Cryptomatte/master/specification/IDmattes_poster.pdf

**Accurate mode**

Following Cycles, there are two accuracy modes. The difference between the two
modes is the number of render samples they take into account to create the
render passes. When accurate mode is off the number of levels is used. When
accuracy mode is active, the number of render samples is used.

**Deviation from standard**

Cryptomatte specification is based on a path trace approach where samples and
coverage are calculated at the same time. In EEVEE a sample is an exact match on
top of a prepared depth buffer. Coverage is at that moment always 1. By sampling
multiple times the number of surface hits decides the actual surface coverage
for a matte per pixel.

**Implementation Overview**

When drawing to the cryptomatte GPU buffer the depth of the fragment is matched
to the active depth buffer. The hashes of each cryptomatte layer is written in
the GPU buffer. The exact layout depends on the active cryptomatte layers. The
GPU buffer is downloaded and integrated into an accumulation buffer (stored in
CPU RAM).

The accumulation buffer stores the hashes + weights for a number of levels,
layers per pixel. When a hash already exists the weight will be increased. When
the hash doesn't exists it will be added to the buffer.

After all the samples have been calculated the accumulation buffer is processed.
During this phase the total pixel weights of each layer is mapped to be in a
range between 0 and 1. The hashes are also sorted (highest weight first).

Blender Kernel now has a `BKE_cryptomatte` header that access to common
functions for cryptomatte. This will in the future be used by the API.

* Alpha blended materials aren't supported. Alpha blended materials support in
  render passes needs research how to implement it in a maintainable way for any
  render pass.

This is a list of tasks that needs to be done for the same release that this
patch lands on (Blender 2.92)

* T82571 Add render tests.
* T82572 Documentation.
* T82573 Store hashes + Object names in the render result header.
* T82574 Use threading to increase performance in accumulation and post
  processing.
* T82575 Merge the cycles and EEVEE settings as they are identical.
* T82576 Add RNA to extract the cryptomatte hashes to use in python scripts.

Reviewed By: Clément Foucault

Maniphest Tasks: T81058

Differential Revision: https://developer.blender.org/D9165
2020-12-04 08:46:34 +01:00
Jeroen Bakker 2bae11d5c0 EEVEE: Arbitrary Output Variables
This patch adds support for AOVs in EEVEE. AOV Outputs can be defined in the
render pass tab and used in shader materials. Both Object and World based
shaders are supported. The AOV can be previewed in the viewport using the
renderpass selector in the shading popover.

AOV names that conflict with other AOVs are automatically corrected. AOV
conflicts with render passes get a warning icon. The reason behind this is that
changing render engines/passes can change the conflict, but you might not notice
it. Changing this automatically would also make the materials incorrect, so best
to leave this to the user.

**Implementation**

The patch adds a copies the AOV structures of Cycles into Blender. The goal is
that the Cycles will use Blenders AOV defintions. In the Blender kernel
(`layer.c`) the logic of these structures are implemented.

The GLSL shader of any GPUMaterial can hold multiple outputs (the main output
and the AOV outputs) based on the renderPassUBO the right output is selected.
This selection uses an hash that encodes the AOV structure. The full AOV needed
to be encoded when actually drawing the material pass as the AOV type changes
the behavior of the AOV. This isn't known yet when the GLSL is compiled.

**Future Developments**

* The AOV definitions in the render layer panel isn't shared with Cycles.
  Cycles should be migrated to use the same viewlayer aovs. During a previous
  attempt this failed as the AOV validation in cycles and in Blender have
  implementation differences what made it crash when an aov name was invalid.
  This could be fixed by extending the external render engine API.
* Add support to Cycles to render AOVs in the 3d viewport.
* Use a drop down list for selecting AOVs in the AOV Output node.
* Give user feedback when multiple AOV output nodes with the same AOV name
  exists in the same shader.
* Fix viewing single channel images in the image editor [T83314]
* Reduce viewport render time by only render needed draw passes. [T83316]

Reviewed By: Brecht van Lommel, Clément Foucault

Differential Revision: https://developer.blender.org/D7010
2020-12-04 08:14:07 +01:00
Yevgeny Makarov a88e6261db UI: Remove Decorators from Keymap Preferences
Improvements to the layout of the Keymaps section of Preferences by removing unneeded Decorator columns.

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

Reviewed by Hans Goudey
2020-12-03 17:23:13 -08:00
Pablo Dobarro cc6ec71b19 Sculpt: Wet paint area radius
This adds a new property to the sculpt vertex color paint brush to limit
the area of the brush that is going to be used to sample the wet paint
color. This is exactly the same concept as normal radius and area radius
that exist for sculpting brushes for sampling the surface depth and
orientation.

When working near color hard edges, this allows to prevent the color
from the other side of the edge to blend into the wet paint.

With 1.0 (the previous default) wet paint radius, as soon as the brush touches
one vertex of the other color, the wet paint mix color changes, making it
impossible to maintain the border between the two colors.

Reviewed By: sergey, dbystedt, JulienKaspar

Differential Revision: https://developer.blender.org/D9587
2020-12-03 22:55:35 +01:00
Pablo Dobarro 9234a6a619 Fix T82872: Add design task link for tilt support
Reviewed By: sergey, Blendify

Maniphest Tasks: T82872

Differential Revision: https://developer.blender.org/D9615
2020-12-03 22:50:02 +01:00
Antonio Vazquez 986955a2d5 GPencil: Add Vertex Paint operators to Paint menu
These operators existed since 2.83, but the menu was hidden by error.

Also the operators have been cleanup and make multiframe compatible.

Reviewed By: mendio

Differential Revision: https://developer.blender.org/D9671
2020-12-03 16:49:40 +01:00
Sybren A. Stüvel 570a16da18 Fix: remove `show_group_colors` from graph editor menu
The `show_group_colors` option was moved to the user preferences in
ad85256e71, but accidentally remained in the graph editor menu.
2020-12-03 16:32:58 +01:00
Henrik Dick a6c4e39876 Add Custom Object Space to Constraints
Add Custom Space to the list of space conversions for constraints.

Constraints can use World Space, Local Space, Pose Space, Local with
Parent, and now also Custom Space with a custom object to define the
evaluation space.

The Custom Space option uses the Local Space of an other
object/bone/vertex group. If selected on owner or target it will show a
box for object selection. If an armature is selected, then it will also
show a box for bone selection. If a mesh object is selected it will show
the option for using the local space of a vertex group.

Reviewed By: #animation_rigging, sybren, Severin, angavrilov

Differential Revision: https://developer.blender.org/D7437
2020-12-03 11:20:21 +01:00
Aaron Carlisle dc4feed59d Cleanup: view-port --> 2D/3D Viewport 2020-12-02 18:16:23 -05:00
Hans Goudey 9281a1f4eb UI: Add new node colors for geometry nodes
During the development of the new nodes in the `geometry-nodes` branch
the color of the new nodes wasn't considered, so all of the nodes ended
up red, the color for "input" nodes. This patch introduces two new
colors, one for "Geometry" and one for "Attributes". There are only two
attribute nodes currently, but the next sprint will add two more,
attribute mix, and sample from texture. The attribute nodes are
conceptually different enough from the nodes that modify the geometry
that they deserve their own color.

Differential Revision: https://developer.blender.org/D9682
2020-12-02 16:34:06 +01:00
Jacques Lucke 074de755e9 Geometry Nodes: correct modifier name when creating from node editor
The name should be the same as when the modifier is created in the
modifier tab of the properties editor.
2020-12-02 16:34:06 +01:00
Dalai Felinto dc614c68ef Preferences: remove Point Cloud object from experimental
The point cloud object is the only one that will support instancing at
first. So we can expose it as a regular object.

It is limited since it has no edit mode. But this is not different than
the volume object.
2020-12-02 15:38:47 +01:00
Dalai Felinto 56931f63c6 Preferences: remove Geometry Nodes from experimental 2020-12-02 15:38:47 +01:00
Hans Goudey b1d1a58c77 Geometry Nodes: improve operators for node editor header
This allows users to create new modifiers directly from the
Geometry Nodes Editor.
2020-12-02 15:38:47 +01:00
Hans Goudey 600fb28b62 Geometry Nodes: active modifier + geometry nodes editor
This commit adds functions to set and get the object's active
modifier, which is stored as a flag in the ModifierData struct,
similar to constraints. This will be used to set the context in
the node editor. There are no visible changes in this commit.

Similar to how the node editor context works for materials, this commit
makes the node group displayed in the node editor depend on the active
object and its active modifier. To keep the node group from changing,
just pin the node group in the header.

* Shortcuts performed while there is an active modifier will affect
  only that modifier (the exception is the A to expand the modifiers).
* Clicking anywhere on the empty space in a modifier's panel will make it active.

These changes require some refactoring of object modifier code. First
is splitting up the modifier property invoke callback, which now needs
to be able to get the active modifier separately from the hovered
modifier for the different operators.

Second is a change to removing modifiers, where there is now a separate
function to remove a modifier from an object's list, in order to handle
changing the active.

Finally, the panel handler needs a small tweak so that this "click in panel"
event can be handled afterwards.
2020-12-02 15:38:47 +01:00
Jacques Lucke 6be56c13e9 Geometry Nodes: initial scattering and geometry nodes
This is the initial merge from the geometry-nodes branch.
Nodes:
* Attribute Math
* Boolean
* Edge Split
* Float Compare
* Object Info
* Point Distribute
* Point Instance
* Random Attribute
* Random Float
* Subdivision Surface
* Transform
* Triangulate

It includes the initial evaluation of geometry node groups in the Geometry Nodes modifier.

Notes on the Generic attribute access API

The API adds an indirection for attribute access. That has the following benefits:
* Most code does not have to care about how an attribute is stored internally.
  This is mainly necessary, because we have to deal with "legacy" attributes
  such as vertex weights and attributes that are embedded into other structs
  such as vertex positions.
* When reading from an attribute, we generally don't care what domain the
  attribute is stored on. So we want to abstract away the interpolation that
  that adapts attributes from one domain to another domain (this is not
  actually implemented yet).

Other possible improvements for later iterations include:
* Actually implement interpolation between domains.
* Don't use inheritance for the different attribute types. A single class for read
  access and one for write access might be enough, because we know all the ways
  in which attributes are stored internally. We don't want more different internal
  structures in the future. On the contrary, ideally we can consolidate the different
  storage formats in the future to reduce the need for this indirection.
* Remove the need for heap allocations when creating attribute accessors.

It includes commits from:
* Dalai Felinto
* Hans Goudey
* Jacques Lucke
* Léo Depoix
2020-12-02 15:38:47 +01:00
Pablo Vazquez 8268b9827a Theme: update shader node color to match socket color
Reviewed by Brecht

Ref T82689.
2020-12-02 15:38:47 +01:00
Pablo Dobarro edf1095176 Fix T83275: Crash with scene statics and empty scene
ob can be NULL, so it needs to be checked before accessing ob->mode

Differential Revision: https://developer.blender.org/D9680
2020-12-01 10:27:51 +01:00
Antonio Vazquez 9081b80d15 GPencil: New operator to reset Vertex Colors
This operators reset the vertex color information of the strokes.

If nothing is selected, all strokes are reset. If any is selected, only selected strokes are reset.

Also added a new menu Paint in Vertex Color mode.

Differential Revision: https://developer.blender.org/D9647
2020-11-30 15:52:44 +01:00
Monique Dewanchand c751d40e07 Cleanup hardcoded render percentage to factor conversion
During revision of {D8952} one of the comments was to make a function that converts the render percentage to a factor. This to avoid code duplication. However the duplicated code was already all over the compositor code. So in order to avoid this code duplication for {D8952} I propose to first cleanup the duplicated code and build patch {D8952} based on this clean up.

The method that converts the render percentage to a factor is put in the CompositorContext. Why? The CompositorContext keeps DNA information like the renderdata. DNA, and thus the CompositorContext, keeps the size of the render resolution in percentage (user oriented). The compositor needs the size of the render resolution as a factor. So the CompositorContext seems like the obvious place to have this conversion method.

Why not in de NodeBase? The method could've been added to the nodebase, but I wanted to keep the nodebase as clean as possible and not put simple "conversion" methods into this base class. Also I didn't really like the call flow: you'd always have to get the renderdata size from the context and then convert.
Putting it in the CompositorContext avoids this extra invoke of a call.

Why not in the Converter? See nodebase. And the Converter seems more like a class for "structural" and complex node tree conversions. Not the simple conversions.

Reviewed By: Sergey Sharybin

Differential Revision: https://developer.blender.org/D9566
2020-11-30 08:00:40 +01:00
Aaron Carlisle f38cd7e188 RNA Manual Reference: Update 2020-11-29 22:01:23 -05:00
Germano Cavalcante 9add12ff05 Transform: Improve event detection for AutoConstrain
The event "value" is not really required since this operation works as a toogle.

This change cleans and simplifies the code.
2020-11-26 13:42:56 -03:00
Erik Abrahamsson f7223d5f72 UI: Allow theming the alternate row color in the sequencer
Previously, the alternate row color in the Video Sequence Editor was
just a shaded version of the editor's background color. This makes it
theme-able just like in the file browser and outliner, although the
default color is very slightly different.

Differential Revision: https://developer.blender.org/D9634
2020-11-25 16:37:33 -05:00
Yevgeny Makarov d86fcde39c UI: Batch Rename Layout Improvements
Improvements to the layout of the Batch Rename dialog.

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

Reviewed by Reviewed by Hans Goudey
2020-11-23 17:27:01 -08:00
Nathan Craddock 05ef031f37 UI: Remove excess row spacing in outliner popover
Some checkboxes had nonessential spacing between rows which made the
popover taller than needed.
2020-11-20 08:55:27 -07:00
Nathan Craddock 2afdb4ba87 Outliner: Object state filter invert toggle
This adds an invert toggle for the outliner object state filters.
There are some cases where we want a filter for invertable states (Selected,
Unselected) and having a single toggle to invert the filter reduces the
number of separate filter types needed. This removes the "Hidden" filter
which can now be replicated with an inverted "Visible" filter.

Differential Revision: https://developer.blender.org/D9598
2020-11-20 08:47:51 -07:00
Hans Goudey 8f30a88e63 Cleanup: Grammar: "Allow to" vs gerund
In cases where "Allow" is followed by an infinitive, a noun needs
to directly follow it. But it makes more sense to follow it with a
gerund instead.
2020-11-18 16:14:48 -05:00
Antonio Vazquez e9607f45d8 GPencil: Automerge last drawn stroke with previous strokes
This option joins any stroke with an end near  the actual stroke. Now it is not limited to the last stroke, any stroke in the same layer for the actual frame can be joined. The join can join two strokes drawing a third stroke.

If the end and the start of the result stroke are very small, the stroke is changed to be cyclic automatically.

There is a limit distance to join the stroke, if the distance is greater than this value, the strokes are not joined. Actually, a constant, threshold distance is used, but we could expose 
as a parameter in the UI in the future.

The tool can be used with freehand drawing or with primitives.

Note: Great part of the patch is just a refactor of the old code to make it accessible and to keep code organized.

Reviewed By: mendio

Maniphest Tasks: T82377

Differential Revision: https://developer.blender.org/D9440
2020-11-18 21:35:06 +01:00
Bastien Montagne 9b20bbc3bf LibOverride: PointCache: Add UI feedback about need to enable Disk Cache.
Note that I chose to modify the label of the main `Bake` button instead
of adding an extra label line, as that would disturb the UI in a
annoying way.
2020-11-17 21:33:28 +01:00
Nathan Craddock 09045ff64d Merge branch 'blender-v2.91-release' 2020-11-16 14:19:11 -07:00
Nathan Craddock 906ff7b8fe Fix wrong collection icon in outliner popover
This icon was missed in rB0633a89e1827
2020-11-16 14:13:23 -07:00
Nathan Craddock 1d4f3e2a26 Outliner: Collection icon color tweaks
The icons originally chosen for the collection colors were selected
during development and had a few issues with contrast in the light
theme, and the gray color was not a good choice against the default gray
backgrounds.

The new colors are more readable in both default Blender themes. Gray
was replaced with pink.

Differential Revision: https://developer.blender.org/D9504
2020-11-16 13:54:05 -07:00
Falk David 0be88c7d15 GPencil: Merge GSoC curve edit mode
Differential Revision: https://developer.blender.org/D8660

This patch is the result of the GSoC 2020 "Editing Grease Pencil Strokes
Using Curves" project. It adds a submode to greasepencil edit mode that
allows for the transformation of greasepencil strokes using bezier
curves. More information about the project can be found
here: https://wiki.blender.org/wiki/User:Filedescriptor/GSoC_2020.
2020-11-13 21:43:00 +01:00