Commit Graph

13553 Commits

Author SHA1 Message Date
Nathan Craddock
33d7b36cec Outliner: Set collection color tag operator
This adds a new operator to the outliner context menu. The collections
context menu now shows inline icons to set the color tag for all
selected collections.

Manifest Task: https://developer.blender.org/T77777

Differential Revision: https://developer.blender.org/D8622
2020-09-15 12:47:09 -06:00
Nathan Craddock
452a1c7b38 Collections: Add color tagging
This adds color tagging to collections. There are 8 color
options which are themable in the user preferences, with an additional
option for no color tag by default.

This adds a new filled collection icon and 8 colored variants of the
icon that can be themed in the user preferences.

In this commit the only interface to setting the color tags is through
Python, and there is nowhere in the interface where the collections are
shown colored. Setting and viewing the color tags from the outliner will
follow.

Manifest Task: https://developer.blender.org/T77777

Differential Revision: https://developer.blender.org/D8622
2020-09-15 12:47:09 -06:00
Sriharsha Kotcharlakot
f137022f99 Liquid Simulation Display Options (GSoC 2020)
All the changes made in the branch `soc-2020-fluid-tools` are included in this patch.

**Major changes:**

=== Viewport Display ===

- //Raw voxel display// or //closest (nearest-neighbor)// interpolation for displaying the underlying voxel data of the simulation grids more clearly.
- An option to display //gridlines// when the slicing method is //single//.

==== Grid Display ====

- Visualization for flags, pressure and level-set representation grids with a fixed color coding based on Manta GUI.

==== Vector Display ====

- //**M**arker **A**nd **C**ell// grid visualization options for vector grids like velocity or external forces.
- Made vector display options available for external forces.

==== Coloring options for //gridlines// ====

- Range highlighting and cell filtering options for displaying the simulation grid data more precisely.
- Color gridlines with flags.

- Also, made slicing and interpolation options available for Volume Object.

Reviewed By: JacquesLucke, sebbas

Differential Revision: https://developer.blender.org/D8705
2020-09-15 23:13:01 +05:30
Hans Goudey
bedbd8655e Property Search: Quick start and clear operators
`ctrl-F` to start the search is obviously necessary, but the clear
operator, `alt-F` requires some of explanation. First, it maps nicely
to the paradigm of "key to set, alt-key to clear," which makes it
unobtrusive. Second, it can be a quicker way to clear the search than
moving the mouse to the top. Finally, in the future, it could a reset
the panels to their expansion before the search started.

Differential Revision: https://developer.blender.org/D8857
2020-09-15 11:39:25 -05:00
Hans Goudey
8bcdcab659 UI: Single tab property search
This adds a search bar to the properties editor. The full search for
every tab isn't included in this patch, but the interaction with
panels, searching behavior, UI, region level, and DNA changes are
included here.

The block-level search works by iterating over the block's button
groups and checking whether they match the search. If they do, they
are tagged with a flag, and the block's panel is tagged too. For
every update (text edit), the panel's expansion is set to whether
the panel has a result or not. The search also checks for matching
strings inside enums and in panel labels.

One complication to this that isn't immediately apparent is that
closed panel's subpanels have to be searched too. This adds some
complexity to the area-level panel layout code.

Possible Future Improvements:
 - Use the new fuzzy search in BLI
 - Reset panels to their expansion before the search started if
   the user escape out of the text box.
 - Open all child panels of a panel with expansion.

Differential Revision: https://developer.blender.org/D8856
2020-09-15 11:25:49 -05:00
Hans Goudey
f59ce4d55c Property Search: Add "search match" theme color
We will use a highlight on panel headers to convey that they have
a search match, so this commit initializes the theme color for the
properties editor.

Differential Revision: https://developer.blender.org/D8854
2020-09-15 10:34:38 -05:00
Hans Goudey
6b29c3fa07 Property Search: Move properties context buttons back to a panel
The context path "breadcrumbs" used to be in a panel in 2.79.
Although they look a bit better in the header, there isn't enough
space for them with the property search field in the header as well.

Maybe there will be another solution in the long term to fit both
the search field and this panel in the header, but for now, this
commit moves these labels back to a header-less panel.

Differential Revision: https://developer.blender.org/D8853
2020-09-15 09:50:14 -05:00
Jeroen Bakker
8f7ab26935 Revert "Image Editor: Make Rendering of Pure Emissive Colors Optional"
This reverts commit f492c8d488b7eb2166ca894e10a8128a1678a885.
2020-09-15 14:33:22 +02:00
Jeroen Bakker
49dbf1324d Image Editor: Deactivate show repeat for UDIM
UDIM textures cannot be repeated, but the option didn't communicate
this. This change makes the Show Repeat option inactive when viewing
Tiled images
2020-09-15 13:33:56 +02:00
Jeroen Bakker
f492c8d488 Image Editor: Make Rendering of Pure Emissive Colors Optional
There are some areas that don't handle pure emissive colors well. For
example erasing alpha using 2d or 3d painting. Or blurring an image in
the compositor.

This patch makes the rendering of pure emissive colors optional. In the
side panel of the Image editor it can still be enabled when needed.

There currently isn't a better place to store it as it is related on how
the image (or a layer of the image) is created. A future design needs to
make sure that the full workflow is supported.
2020-09-15 12:33:49 +02:00
Campbell Barton
210c721b4d Cleanup: keymap formatting 2020-09-15 10:55:45 +10:00
Campbell Barton
d69d811ef9 Cleanup: remove '_' prefix for used arguments 2020-09-15 10:44:50 +10:00
Sebastián Barschkis
59a9cf46b4 Fluid: Cleanup bake info string for modular cache
This commit adds a label on top of the bake operator in modular bake mode. This way users will immediately see if their current settings will allow them to bake noise, meshes or particles after baking the simulation base.
2020-09-14 18:58:37 +02:00
Campbell Barton
14b0f20374 Fix T80694: Crash reloading scripts from the Python console
Running `bpy.ops.script.reload()` from Python was crashing
since the operator being called was it's self freed.

Change the reload operator to defer execution - as supporting
re-registration during execution is quite involved for a corner-case.
2020-09-14 17:59:26 +10:00
Bastien Montagne
9d674708ea Fix T80589: Translations in python scripts are missing.
Python 3.8 changed handling of constant values in its AST tool.
This code should work on both officialy supported 3.7, and newer 3.8,
for now.
2020-09-13 19:50:08 +02:00
Campbell Barton
a7dc6647ae Fix T80697: children_recursive returns edit-bones from non edit-bone
Bone.children_recursive would return edit-bones when in edit-mode
irrespective of the type of the bone.

Check the type of self instead of the existence of edit-bones.
2020-09-12 11:45:33 +10:00
Jeroen Bakker
b2fc067854 Image Editor: Smooth Wire User Preferences
The old image editor has an option to enable the smooth wire drawing.
This option was stored per editor and disabled by default. This patch
connects the smooth wires in the UV/Image editor to `User Prefereces ->
Viewport -> Quality -> Smooth Wire [] Overlay`.

The old option is left in place and will be removed when the old image
editor drawing code will be removed before BCon 3.
2020-09-11 09:12:41 +02:00
Jeroen Bakker
4212b6528a Image Editor: Enable New Drawing
This patch reverses use draw manager for image editor the
experimental feature. Now the new drawing is enabled by default.
Inside the experimental tab in the user preferences there is now an
option to revert back to the old drawing method.

Using this option we can easilly check if all drawing features have been
migrated over. The plan is to remove the legacy drawing before BCon 3.
2020-09-11 08:35:05 +02:00
Jeroen Bakker
d6525e8d13 Use DrawManager for Image/UV Editor
This project moves the current UV/Image editor drawing to the draw manager.
Why would we do this:

**Performance**:

Current implementation would draw each texel per time. Multiple texels could be
drawn per pixel what would overwrite the previous result. You can notice this
when working with large textures. Repeat image drawing made this visible by
drawing for a small period of time and stop drawing the rest. Now the rendering
is fast and all repeated images are drawn.

**Alpha drawing**:

Current implementation would draw directly in display space. Giving incorrect
results when displaying alpha transparent images.
This addresses {T52680}, {T74709}, {T79518}
The image editor now can show emission only colors. See {D8234} for
examples.

**Current Limitations**

Using images that are larger than supported by your GPU are resized (eg larger
than 16000x16000 are resized to 8k). This leaves some blurring artifacts. It is
a low priority to add support back of displaying individual pixels of huge
images. There is a design task {T80113} with more detail.

**Implementation overview**
Introduced an Image Engine in the draw module. this engine is responsible for
drawing the texture in the main area of the UV/Image editor. The overlay engine
has a edit_uv overlay which is responsible to draw the UV's, shadows and
overlays specifically for the UV Image editor. The background + checker pattern
is drawn by the overlay_background.

The patch will allow us to share overlays between the 3d viewport and UV/Image
editor more easily. In most cases we just need to switch the `pos` with the `u`
attribute in the vertex shader.

The project can be activated in the user preferences as experimental features.
In a later commit this will be reversed.

Reviewed By: Clément Foucault

Differential Revision: https://developer.blender.org/D8234
2020-09-11 08:08:46 +02:00
Pablo Dobarro
c01f8bb672 Sculpt: Enable pen pressure for Scrape/Fill Area Radius
This should improve the issue with Scrape accumulation in concave
surfaces. When the strength of the brush is higher, the area radius is
also bigger, so the scrape plane is more stable preventing it from
accumulating displacement in the same area.
The Scrape/Fill default presets are also updated to include this
functionality.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D8821
2020-09-10 22:07:43 +02:00
Nathan Craddock
095a53bd88 Cleanup: Remove outliner edit mode context menu entries
The outliner context menu has options to enter and exit edit mode, but
they only show in edit mode, and they don't work. This removes the
broken entries and related code.

Part of T77408

Differential Revision: https://developer.blender.org/D8641
2020-09-10 09:01:37 -06:00
Nathan Craddock
2110af20f5 Outliner: Move mode toggling to left column
Add a column of icons in the left gutter of the outliner for controlling
the interaction modes of objects. When an object is in a mode other than
object mode, the mode icon will draw to the left of that object. Any
other objects that are valid to be added or swapped into the mode are
drawn with a dot to the left of the object.

Clicking the dot to the left of an object will swap that object with the
current active object in the interaction mode. For edit and pose modes,
ctrl clicking the dot will add that object to the current mode.

Clicking the mode icon next to the active object removes it and all
other objects from the current mode.

The behavior is nearly identical to the previous edit/pose mode toggling
by selecting the mesh and armature datablocks, with additional support
for all interaction modes.

Currently two undo steps are pushed to prevent an assert.

Part of T77408

Manifest Task: https://developer.blender.org/T68498

Differential Revision: https://developer.blender.org/D8641
2020-09-10 09:01:27 -06:00
Sebastián Barschkis
e347b6b86b Fix T80372: Mantaflow Noise Not working with Smoke/Smoke and Fire
Modular caches for noise, particles and meshes require that additional data is baked (i.e. is resumable option). With this commit users will be explicitly asked to enable this option before being able to bake noise, particles or meshes.
2020-09-10 12:46:18 +02:00
Campbell Barton
92a1b3f750 Fix T80650: Malformed bl_info header causes empty add-on listing 2020-09-10 16:39:52 +10:00
Aaron Carlisle
d2d3ab05b3 UI: Use split layout for world mist settings
Differential Revision: https://developer.blender.org/D7548
2020-09-09 21:15:05 -04:00
Aaron Carlisle
4e3cb95638 UI: Add Missing UV Unwrap Operators to UV Editor
This commit also changes the U shortcut to open the unwrap menu instead 
of the Unwrap operator. The unwrap operator can now be accessed by 
pressing U twice.

Note, these operators use the 3D Viewports selection and not the UV 
Editor selection. In the future the operators should unwrap based on the 
selection within that editor.

Fixes T80600

Differential Revision: https://developer.blender.org/D8834
2020-09-09 19:50:31 -04:00
Brecht Van Lommel
370d6e5025 Geometry: add Attributes panel for PointCloud and Hair
There is a list of attributes, along with operators to add and remove
attributes. For adding, there are a few standard attributes that can be
added quickly, as well as a popup to create a custom attribute.

Ref T76659

Differential Revision: https://developer.blender.org/D8636
2020-09-09 17:01:17 +02:00
Campbell Barton
0b311eeca5 Correct error in last commit 2020-09-09 15:37:36 +10:00
Campbell Barton
092bea06da Cleanup: access context argument instead of bpy.context 2020-09-09 15:26:46 +10:00
Clément Foucault
9eba40b848 Revert "Revert "RNA Manual Mapping: Update Mappings""
This reverts commit de5930333bcd85ede44d6cd1e117b00e5051b728.
2020-09-08 20:15:59 +02:00
Clément Foucault
de5930333b Revert "RNA Manual Mapping: Update Mappings"
This reverts commit f14d24729ff32edffd71b646712e59b640fcddd9.

I commited the previous commit because I wasn't building with openvdb.

Compiling with openvdb fix the clang-tidy errror.
2020-09-08 19:57:08 +02:00
Aaron Carlisle
f14d24729f RNA Manual Mapping: Update Mappings 2020-09-08 11:58:09 -04:00
Aaron Carlisle
637699e78a UI: 3D View: Move Live Unwrap to toolbar
The menus should be for operators, tool settings belong in the toolbar
2020-09-08 11:58:09 -04:00
Pablo Dobarro
7ca42545d1 Hide tools with missing icons under experimental
This removes from the UI all tools with missing icons and hides them
under a "Tools with missing icons" experimental option.

We agree on not making available by default tools in master without icons.
Having this experimental flag will allow to commit new tools as soon as the
technical design and implementation is finished so development can
continue, without adding broken icons to the UI.

Reviewed By: Severin

Differential Revision: https://developer.blender.org/D8831
2020-09-08 17:43:56 +02:00
Pablo Vazquez
8f4f9275ce UI: Aesthetic tweaks to Select All by Type operator
* Match menu items with Add Menu (order and naming e.g. Font -> Text)
* Use Icons
* Remove ellipsis from the name (policy is to use `...` only when triggering a window/popup)

No functional changes.

Thanks @HooglyBoogly for the help!
2020-09-08 16:30:29 +02:00
Hans Goudey
36aeb0ec1e UI: Add temperature units
Based on the original patch by Vaishnav S (@padthai), this adds
support for temperature units. Initially supported units are Celsius,
Kelvin, and Fahrenheit.

The units aren't used anywhere with this commit. Those changes should
happen in separate patches by adding PROP_TEMPERATURE to RNA property
definitions. But it should be ensured that the various solvers and
simulations actually properly use real units.

The complexity of some of the changes comes from the fact that these
units have offsets from each other as well as coefficients. This also
makes the implementation in the current unit system troublesome.
For example, entering 0C evaluates correctly to 273K, but 0C + 0C
doubles that result, because each unit value is evaluated separately.
This is quite hard to solve in the general case with Blender's current
unit system, though, so it is not handled in this commit.

Differential Revision: https://developer.blender.org/D4401
2020-09-07 14:59:07 -05:00
Hans Goudey
d4cca7b7b0 UI: Changes to timeline playback popover
The current playback popover has some issues:
 - Using labels instead of headers is inconsistent with
   the rest of the interface
 - Incomplete context and description for some properties
 - Ugly large spacing

This commit fixes these problems by using headers.

Differential Revision: https://developer.blender.org/D8434
2020-09-07 14:22:29 -05:00
Pablo Dobarro
675c964442 Sculpt: Sculpt Trimming gestures tools
This implements Box Trim as a boolean based trimming too gesture in sculpt
mode. This is the intended way to remove parts of the sculpt instead of
using box mask and mask slice. It also creates new face sets for the new
faces created after the boolean operation.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D8766
2020-09-07 17:31:34 +02:00
Antonio Vazquez
32d0918f3d GPencil: Remove console warning in RENDER_PT_gpencil panel
COMPAT_ENGINE was missing
2020-09-06 19:03:12 +02:00
Antonio Vazquez
18e205079c GPencil: Cleanup unused code
The poll method is not used
2020-09-06 18:52:37 +02:00
Aaron Carlisle
c598e939ad UI: Masking: Add more transform operators to menu
Also use select tweak params for grabbing points
2020-09-04 22:19:34 -04:00
Aaron Carlisle
4155d77026 UI: Masking: Reorginize mask menu to be more conistent 2020-09-04 22:19:33 -04:00
Antonio Vazquez
ee49ce482a GPencil: Change Interpolate shortcut to Ctrl+E
Before the shortcut was Ctrl+Alt+E, but it's more logic remove the Alt.

Reviewed by: @mendio, @pepeland
2020-09-04 16:11:17 +02:00
Antonio Vazquez
97871e16ff GPencil: New option to set steps in Interpolate Sequence
Sometimes interpolate all frames is not convenient and it's better, for example, interpolate in twos.

The new parameter allows to define the number of frame for each step, by default is set to 1 as before.

{F8812621}

This is a request of animators to improve interpolate tools.

Reviewed By: mendio

Maniphest Tasks: T80190

Differential Revision: https://developer.blender.org/D8723
239b0b
2020-09-04 15:36:02 +02:00
Aaron Carlisle
92b8d7019b UI: Make UV Editor contextual menu more consistent with 3D View
Follow up on rB12716e6b9fc74bd53be39ec7aab16ca8d43f0593

See also: rB62774badeda7d13fd3c6af57c632ff3167a608d7
2020-09-03 22:27:39 -04:00
Pablo Dobarro
afb43b881c Sculpt: Face Set Extract Operator
This implements a Face Set Extract operator, which is similar to mask
extract. This operator uses a picker to select and Face Set in the mesh
and extract the geometry directly to a new object.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D8599
2020-09-03 17:26:12 +02:00
Hans Goudey
c8e5924cbb UI: Expose important settings from file browser popovers
We have established a convention of exposing the most important
settings from popovers, then aligning a popover to control more
detailed settings.

The file browser has powerful display / filtering settings, but
they're hidden in popovers at the moment, so it's sometimes a pain
to use them. The "display as" options are now exposed to the left of
the display settings popover, and the "filter" toggle is exposed to
the left of the filter settings popover. This convention is familiar
and intuitive for users and makes interaction faster.

Note that the "show hidden" item in the filter popover still has an
effect if filtering is disabled.

This commit also:
 - Removes the icons in the "Sort By" enum
 - Uses property split for the "Sort By" enum
 - Very slightly increases the default width of the file browser
   window to make room for the new buttons.

Differential Revision: https://developer.blender.org/D8719
2020-09-03 10:02:09 -05:00
Pablo Dobarro
c05715b03f Sculpt: Sculpt Face Set gestures tools
This implements the sculpt gesture lasso and box operators for face
sets. They work the same way as the mask gesture operator and tools.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D8716
2020-09-03 16:44:40 +02:00
Philipp Oeser
930021129a Quick effects: avoid error in builds without OpenVDB
Differential Revision: https://developer.blender.org/D8626
2020-09-03 12:56:27 +02:00
Hans Goudey
ba4a2a4c8b UI: Use instanced panel custom data instead of list index
For modifier shortcuts we added a "custom_data" field to panels.
This commit uses the same system for accessing the list data that
corresponds to each panel. This way the context is only used once
and the modifier for each panel can be accessed more easily later.

This ends up being mostly a cleanup commit with a few small changes
in interface_panel.c. The large changes in the UI functions are due
to the fact that the panel custom data is now passed around as a
single pointer instead of being created again for every panel.

The list_index variable in Panel.runtime is removed as it's now
unnecessary.

Differential Revision: https://developer.blender.org/D8559
2020-09-02 14:13:26 -05:00