Commit Graph

718 Commits

Author SHA1 Message Date
Jeroen Bakker 15021968c1 DrawManager: Hide lock acquire behind experimental feature.
The acquire locking of the draw manager introduced other issues.
The current implementation was a hacky solution as we know that the
final solution is something totally different {T98016}.

Related issues:
* {T97988}
* {T97600}
2022-05-10 14:31:20 +02:00
Campbell Barton 2c75857f9f Cleanup: spelling in comments, use doxygen comments 2022-05-06 17:56:59 +10:00
Jacques Lucke 5162135e14 Curves: add second experimental option for new curves tools
Now there are two experimental feature options:
* "New Curves Type": Enables the new data type and a couple of tools
  that are meant to be in the first release that comes with the new curves object.
* "New Curves Tools": This is only available when the new curve type is available
  as well. It mainly exists to keep some tools experimental even after the initial
  curves object is release officially.
  * For now this only includes the curves edit mode which is not usable yet and
    probably won't be for the initial release.

Differential Revision: https://developer.blender.org/D14840
2022-05-04 14:18:42 +02:00
Hans Goudey 3e7ee3f3bc Geometry Nodes: Move named attribute nodes out of experimental
Remove the experimental option for named attributes nodes show they are
always available.

Ref T91742
2022-04-26 10:18:30 -05:00
Campbell Barton b1908f2e0b View 3D: disable object mode selection cycling on first-click
Unlike regular selection cycling that is activated when clicking again
in the same location, object mode would cycle to another object
if the object that was selected happened to already be active.

This made it impossible to click-drag to tweak the active object
if there were other objects behind it as those would be activated first.

Resolves T96752.
2022-04-14 17:20:36 +10:00
Joseph Eagar eae36be372 Refactor: Unify vertex and sculpt colors into new
color attribute system.

This commit removes sculpt colors from experimental
status and unifies it with vertex colors. It
introduces the concept of "color attributes", which
are any attributes that represents colors.  Color
attributes can be represented with byte or floating-point
numbers and can be stored in either vertices or
face corners.

Color attributes share a common namespace
(so you can no longer have a floating-point
sculpt color attribute and a byte vertex color
attribute with the same name).

Note: this commit does not include vertex paint mode,
      which is a separate patch, see:
      https://developer.blender.org/D14179

Differential Revision: https://developer.blender.org/D12587
Ref D12587
2022-04-05 11:42:55 -07:00
Jeroen Bakker 3ce6c5adfc UserDef: Add experimental flag for 3d texturing brush.
This only adds a experimental flag to enable the 3d texturing brush,
so future developments could check. Currently the flag does nothing
as no functionality of the 3d texturing brush has been implemented.
2022-04-04 14:12:33 +02:00
Campbell Barton 24c30e001f 3D View: preference to disable selection cycling on first click
Object mode selection does a kind of cycling that excludes the active
selected object. This is separate from regular selection cycling which
is enabled when clicking multiple times without moving the cursor.

This has the down-side that clicking on an object to drag it always
selects the object behind it (in the case of overlapping objects).

Since object mode selection is fundamental functionality, this is
exposed as an experimental preference for user feedback & testing.

See T96752 for details.
2022-03-24 21:48:22 +11:00
Clément Foucault 59f53f5802 EEVEE: Add new experimental "EEVEE Next" option
This is supposed to hold the latest improvement from the EEVEE rewrite branch.
Note that a restart is necessary in order for the engine to appear.

The registration code is a bit convoluted as it needs to be after the WM_init.
2022-03-18 20:49:09 +01:00
Hans Goudey 213d00607e Cleanup: Further removal for legacy geometry nodes
943b919fe8 missed removing the experimental
option and the nodes from the add menu.
2022-03-16 10:56:53 -05:00
Hans Goudey d4e46c13cc Geometry Nodes: Add named attribute nodes behind experimental flag
This commit adds three nodes:
- `Remove Attribute`: Removes an attribute with the given name
- `Named Attribute`: A field input node
- `Store Named Attribute`: Puts results of a field in a named attribute

They are added behind a new experimental feature flag, because further
development of attribute search and name dependency visualization will
happen as separate steps.

Ref T91742

Differential Revision: https://developer.blender.org/D12685
2022-03-14 11:48:11 -05:00
Campbell Barton 391c3848b1 NDOF: make camera view/pan behavior optional
User request since adding this option in:
51975b89ed

When disabled, use the previous behavior when orbiting a camera view.
2022-02-23 21:25:46 +11:00
Jacques Lucke 07032dd218 Curves: add initial sculpt mode
This adds a new sculpt mode to the experimental new curves object.
Currently, this mode can only be entered and exited, nothing else.
The main initial purpose of this node will be to use it for hair grooming.

The patch also adds the `editors/curves/` directory for the new curves
object, which will be necessary for many other things as well.

I added a completely new mode (`OB_MODE_SCULPT_CURVES`), because
`OB_MODE_SCULPT` seems to be rather specific to meshes, and reusing
it doesn't seem worth the trouble. The tools/brushes used in mesh vs.
curves sculpt mode are quite distinct as well.

I had to add DNA_userdef_enums.h to make the patch compile with C++
(forward declaration of enums isn't allowed). This follows the same
pattern that we use for other enums in dna.

Differential Revision: https://developer.blender.org/D14107
2022-02-15 12:32:15 +01:00
Campbell Barton c434782e3a File headers: SPDX License migration
Use a shorter/simpler license convention, stops the header taking so
much space.

Follow the SPDX license specification: https://spdx.org/licenses

- C/C++/objc/objc++
- Python
- Shell Scripts
- CMake, GNUmakefile

While most of the source tree has been included

- `./extern/` was left out.
- `./intern/cycles` & `./intern/atomic` are also excluded because they
  use different header conventions.

doc/license/SPDX-license-identifiers.txt has been added to list SPDX all
used identifiers.

See P2788 for the script that automated these edits.

Reviewed By: brecht, mont29, sergey

Ref D14069
2022-02-11 09:14:36 +11:00
Hans Goudey fe1816f67f Curves: Rename "Hair" types, variables, and functions to "Curves"
Based on discussions from T95355 and T94193, the plan is to use
the name "Curves" to describe the data-block container for multiple
curves. Eventually this will replace the existing "Curve" data-block.
However, it will be a while before the curve data-block can be replaced
so in order to distinguish the two curve types in the UI, "Hair Curves"
will be used, but eventually changed back to "Curves".

This patch renames "hair-related" files, functions, types, and variable
names to this convention. A deep rename is preferred to keep code
consistent and to avoid any "hair" terminology from leaking, since the
new data-block is meant for all curve types, not just hair use cases.

The downside of this naming is that the difference between "Curve"
and "Curves" has become important. That was considered during
design discussons and deemed acceptable, especially given the
non-permanent nature of the somewhat common conflict.

Some points of interest:
- All DNA compatibility is lost, just like rBf59767ff9729.
- I renamed `ID_HA` to `ID_CV` so there is no complete mismatch.
- `hair_curves` is used where necessary to distinguish from the
  existing "curves" plural.
- I didn't rename any of the cycles/rendering code function names,
  since that is also used by the old hair particle system.

Differential Revision: https://developer.blender.org/D14007
2022-02-07 11:56:48 -06:00
Bastien Montagne 829d93ff06 Remove option to not auto-convert proxies on file load.
Now all proxies will always be converted to library overrides. If
conversion fails, they are simply 'disabled'.

This should be the last 'user-visible' step of proxies removal.
Remaining upcoming commits will remove internal ID management, depsgraph
and evaluation code related to proxies.

Also bump the blendfile subversion.

Part of T91671.
2022-02-02 09:47:10 +01:00
Julian Eisel 293aab2253 Asset Browser: Add debug option to disable asset indexing
Adds an "Asset Indexing" option (enabled by default) to Preferences >
Experimental > Debugging. This is useful when working on the asset
library loading.
2022-01-19 20:12:53 +01:00
Campbell Barton 7c04bc9a01 Cleanup: exclude uiFont from DNA, rename filename -> filepath
This isn't saved to the preferences,
so there is no need to store in DNA.

Also remove unused `r_to_l` member.
2022-01-07 18:05:36 +11:00
Kévin Dietrich eed45d2a23 OpenSubDiv: add support for an OpenGL evaluator
This evaluator is used in order to evaluate subdivision at render time, allowing for
faster renders of meshes with a subdivision surface modifier placed at the last
position in the modifier list.

When evaluating the subsurf modifier, we detect whether we can delegate evaluation
to the draw code. If so, the subdivision is first evaluated on the GPU using our own
custom evaluator (only the coarse data needs to be initially sent to the GPU), then,
buffers for the final `MeshBufferCache` are filled on the GPU using a set of
compute shaders. However, some buffers are still filled on the CPU side, if doing so
on the GPU is impractical (e.g. the line adjacency buffer used for x-ray, whose
logic is hardly GPU compatible).

This is done at the mesh buffer extraction level so that the result can be readily used
in the various OpenGL engines, without having to write custom geometry or tesselation
shaders.

We use our own subdivision evaluation shaders, instead of OpenSubDiv's vanilla one, in
order to control the data layout, and interpolation. For example, we store vertex colors
as compressed 16-bit integers, while OpenSubDiv's default evaluator only work for float
types.

In order to still access the modified geometry on the CPU side, for use in modifiers
or transform operators, a dedicated wrapper type is added `MESH_WRAPPER_TYPE_SUBD`.
Subdivision will be lazily evaluated via `BKE_object_get_evaluated_mesh` which will
create such a wrapper if possible. If the final subdivision surface is not needed on
the CPU side, `BKE_object_get_evaluated_mesh_no_subsurf` should be used.

Enabling or disabling GPU subdivision can be done through the user preferences (under
Viewport -> Subdivision).

See patch description for benchmarks.

Reviewed By: campbellbarton, jbakker, fclem, brecht, #eevee_viewport

Differential Revision: https://developer.blender.org/D12406
2021-12-27 16:35:54 +01:00
Campbell Barton 5c63c0a58c Docs: use doxygen formatting for DNA
Differentiate doc-strings from title/section text.
Also use explicit doxygen references to struct members
so it's not ambiguous which member is being referenced.

Note that these changes aren't complete (some files weren't touched).
2021-12-20 19:07:10 +11:00
Germano Cavalcante f190f2d267 Revert fixes 2021-11-18 14:19:59 -03:00
Germano Cavalcante 0c33411bdd Revert "Revert "Revert "Revert "Allow navigating while transforming""""
This reverts commit 717a971035.
2021-11-18 14:15:08 -03:00
Germano Cavalcante 717a971035 Revert "Revert "Revert "Allow navigating while transforming"""
This reverts commit 2a9cfdac7e.
2021-11-18 13:55:17 -03:00
Germano Cavalcante 2a9cfdac7e Revert "Revert "Allow navigating while transforming""
This reverts commit 5e6fdaa07f.
2021-11-18 13:52:39 -03:00
Germano Cavalcante 5e6fdaa07f Revert "Allow navigating while transforming"
This reverts commit 1d1855e95f.
2021-11-18 13:42:31 -03:00
Germano Cavalcante 1d1855e95f Allow navigating while transforming
This feature has been desired for some time:
- https://rightclickselect.com/p/ui/Tqbbbc/allow-navigating-while-transforming (See comments);
- D1583;
- T37427;

In short, blocking navigation during transform limits the user to move the object only to visible areas within the screen and hinders the allocation of objects within closed meshes.

The node editor is also impaired because some nodes are far between them and the connectors are too small.

The only disadvantage of this patch (as I see it) is the conflict with the existing key map:
MIDDLEMOUSE:
- enable axis constrain in 3D view;

WHEELDOWNMOUSE, WHEELUPMOUSE, PAGEUPKEY, PAGEDOWNKEY:
- change the threshold of the proportional edit;

So the patch solution was to change these keymaps:
- MIDDLEMOUSE to Alt+MIDDLEMOUSE;
- WHEELDOWNMOUSE, WHEELUPMOUSE, PAGEUPKEY, PAGEDOWNKEY to Alt+(corresponding key);

When you use this new keymap for the first time in the proportional edit, it may seem strange due to the custom of using it (both in View2D and View3D).
But quickly the user gets used to it.

Alternatively we can add an option to the user preferences ([] Allow navigating while transforming). (I'm not much fan of this option).

The patch was done on branch2.8. But maybe it's a good idea to apply it to 2.79

Differential Revision: https://developer.blender.org/D2624
2021-11-18 13:14:18 -03:00
Sergey Sharybin ba6427adfa Merge branch 'blender-v3.0-release' 2021-11-16 17:25:48 +01:00
Sybren A. Stüvel 07af45eec5 Asset Browser: hide catalog debug info behind debug option
Add a new "experimental" debug option `show_asset_debug_info`, and use
that to determine the visibility of the active asset's catalog UUID and
simple name. Previously this was only determined by the "Developer
Extras" option, which meant it was visible in too many situations. It's
not really a "developer extra", and really just a debugging tool, so the
new option is more in line with its purpose.

Reviewed by: Severin

Differential Revision: https://developer.blender.org/D13242
2021-11-16 16:49:27 +01:00
Harley Acheson 73047c69ea BLF: Use Floats for Font Point Sizes
Allow the use of floating-point values for font point sizes, which
allows greater precision and flexibility for text output.

See D8960 for more information, details, and justification.

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

Reviewed by Campbell Barton
2021-11-13 09:39:18 -08:00
Matheus Santos c4ea5cb1a3 Text Editor: Auto close relevant characters
Support the ability to close relevant characters like '(', '[' and '{'.

It will also delete the pair character if they're empty.

Ref D13119

Reviewed By: campbellbarton
2021-11-13 13:56:31 +11:00
Julian Eisel 4e09fd76bc Cleanup (UI): Add/use type for operator context enum
Adds a `wmOperatorCallContext` typedef for the existing `WM_OP_XXX`
operator context enum. This adds type safety, allows the compiler to
produce better warnings and helps understanding what a variable is for.

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

Reviewed by: Campbell Barton
2021-11-05 14:57:26 +01:00
Bastien Montagne 65dbeb1d81 Fix T90638: Inconsistent object data behavior when link-duplicating collections.
Camera, lattice and speaker object types were missing there own proper
`USER_DUP_` flags, leading to not properly handling duplication of their
object data.

NOTE: We could probably simply opions here, by using categories (like
'GEOMETRY', 'SHADING', etc.) instead of exact object types. But this is
beyond bugfix scope.
2021-10-22 12:35:40 +02:00
Pablo Vazquez 9b1b4b9e32 Node Editor: Introduce color overlay and dashed wires theme setting
This patch includes code from D9891 and D12754, so credit goes to Juanfran and Dalai.
I updated the patches to work with `master` and with the new overlay toggle.

The reason to include both changes as part of one patch is that the dimmed dashed lines work much better together with colored wires.

Theme setting for dash opacity:
{F11370574, size=full}

{F11286177, size=full, autoplay, loop}

{F11149912, size=full}

For adding the overlay I used `SpaceImageOverlay` as reference, although I'm not familiar with this code so there might be mistakes.

Reviewed By: #user_interface, HooglyBoogly

Differential Revision: https://developer.blender.org/D12886
2021-10-21 21:00:38 +02:00
Pablo Vazquez 93544b641b UI: Visual style update to panels
Back in Blender 2.30, the GUI project brought panels into Blender among other important visual updates.
For the first time it was possible to move the wall of buttons around. Providing a clear separation
between sections (it even allowed the grouping of panels in tabs!)

During the 2.5 redesign, the separation between panels became a line on top of each panel, and panels received
theme settings for background and header colors. The default theme used the same color for both.

In 2.8 the background color of panels was different from headers in the default theme, so the separator
line was removed. While the separator line wasn't elegant (only on top, non-themeable, hard-coded emboss effect),
it provided a sort of separation between panels.

This patch solves the panels-separation by simply adding a margin space around them (not visible in default theme yet).
Even though the margin reduces the width of the working area slightly, it makes room for the upcoming always-visible scrollbars.

Other adjustments:
* Use arrow icon instead of triangle to collapse/expand
* Use rounded corners to match the rest of the UI (editor corners, nodes, etc).

{F10953929, size=full}

Margin on panels makes use of the `style->panelouter` property that hasn't been
used in a while. Also slight tweaks to `boxspace` and `templatespace` style properties so they
are multiples of 2 and operations on them round better.

There is technically no need to update the themes for them to work, so no theme changes are included in this patch.

{F10953931, size=full}

{F10953933, size=full}

{F10953934, size=full}

{F10954003, size=full}

----

A new theme setting under Style controls the roundness of all panels (added it to Style instead of ThemeSpace because I think controlling the panel roundness per editor is a bit overkill):
{F11091561, size=full, autoplay, loop}

Reviewed By: HooglyBoogly

Differential Revision: https://developer.blender.org/D12814
2021-10-17 18:31:24 +02:00
Falk David 5cebcb415e VSE: Add color tags to strips
This patch adds color tags to VSE strips, an overlay option to toggle the colors
on and off, a section in the theme settings to define the 9 possible colors and
two ways of changing the color tag through the UI. You can change the color
through the right-click context menu, or in the strip side panel next to the
strip name.

Color tags are defined in user preferences and they can be disabled in overlay
settings.

Reviewed By: campbellbarton, ISS

Differential Revision: https://developer.blender.org/D12405
2021-09-29 14:34:01 +02:00
Jacques Lucke 95fca22bfe Geometry Nodes: Remove experimental option for fields
This enables fields as the official workflow for geometry nodes.
While many features are converted to use fields rather than the old
attribute workflow, many are not yet converted. In that case, the
unconverted nodes are still accessible with an experimental option.
In the coming weeks the rest of the nodes will be converted.

Differential Revision: https://developer.blender.org/D12672
2021-09-28 13:22:52 -05:00
Bastien Montagne 501b0190d6 LibOverride: Deprecate Proxies: Add auto-conversion on file load.
This commit also add an experimental userPreferences to prevent proxies
conversions on file load, and reporting for amount of coverted proxies
(and possible issues).

Note that potentially linked proxies from other libraries are not
hamdled here (this feature seems to be broken anyway in master
currently?).
2021-09-24 12:40:04 +02:00
Harley Acheson 4fa0bbb5ac UI: Automatic Blend Thumbnail Selection
Adds an "Auto" option to blend thumbnail types that will automatically
use Screenshot if there is no camera and 3dview, or workbench render
with shading settings from the largest 3dview.

See D12407 for more details.

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

Reviewed by Campbell Barton
2021-09-16 17:40:19 -07:00
Dalai Felinto 867e6ffe88 App Settings: Edge Resize
This prevents both editor resize as well as regions (e.g., the toolbar).

Note: This option is not visible in the UI.

Differential Revision: D12516
2021-09-16 16:02:33 +02:00
Dalai Felinto f2cfad77f9 App Settings: Regions Visbility Toggle
The toggle that allow users to "show" the region (header, toolbar, ...)
when it is collapsed can now be configured for the apps.

Note: This option is not visibile in the UI.

Differential Revision: D12516
2021-09-16 16:02:33 +02:00
Dalai Felinto c938d9a0e5 Cleanup: Rename USER_APP_LOCK_UI_LAYOUT
There will be other settings that lock other aspects of the
UI layout (e.g., resizing of editors). So better to name
this setting what it actually handles (the corners).

New name: USER_APP_LOCK_CORNER_SPLIT

Differential Revision: D12516
2021-09-16 16:02:33 +02:00
Jacques Lucke bf47fb40fd Geometry Nodes: fields and anonymous attributes
This implements the initial core framework for fields and anonymous
attributes (also see T91274).

The new functionality is hidden behind the "Geometry Nodes Fields"
feature flag. When enabled in the user preferences, the following
new nodes become available: `Position`, `Index`, `Normal`,
`Set Position` and `Attribute Capture`.

Socket inspection has not been updated to work with fields yet.

Besides these changes at the user level, this patch contains the
ground work for:
* building and evaluating fields at run-time (`FN_fields.hh`) and
* creating and accessing anonymous attributes on geometry
  (`BKE_anonymous_attribute.h`).

For evaluating fields we use a new so called multi-function procedure
(`FN_multi_function_procedure.hh`). It allows composing multi-functions
in arbitrary ways and supports efficient evaluation as is required by
fields. See `FN_multi_function_procedure.hh` for more details on how
this evaluation mechanism can be used.

A new `AttributeIDRef` has been added which allows handling named
and anonymous attributes in the same way in many places.

Hans and I worked on this patch together.

Differential Revision: https://developer.blender.org/D12414
2021-09-09 12:54:20 +02:00
Campbell Barton 4d0497bea4 Cleanup: format, spelling 2021-09-06 20:34:00 +10:00
Harley Acheson 58632a7f3c UI: Blend Preview Thumbnails Showing Workspace
This adds an option to use a capture of the entire main window as the
blend file preview thumbnail.

See D10492 for details and examples.

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

Reviewed by Campbell Barton
2021-09-05 21:05:50 -07:00
Harley Acheson feaa61a968 UI: Remove "Unfitted" Kerning Style Option
This patch removes the "Kerning Style" option for UI widget font
drawing and uses only the current default of "Fitted", since the other
option of "Unfitted" is just the result of truncation errors.

see D12231 for much more information.

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

Reviewed by Campbell Barton
2021-08-18 19:48:30 -07:00
Julian Eisel 62cb5c5c4a Enable Asset Browser by default for poses, rest stays experimental
Idea for 3.0 is to disable all functionality that isn't well polished
and focus on those parts first. Starting with poses.

* Adds a new experimental option "Extended Asset Browser", replacing
  "Asset Browser".
* Unlike the previous option, this isn't enabled by default anymore.
  This didn't work well in practice and caused plenty of confusion.
* "Mark as Asset" and "Clear Asset" are hidden if the option is
  disabled.
* Same for the category selection in the Asset Browser.
* Always show display the "Only Assets" option in the File Browser while
  browing inside .blend files. That way you can hide data-blocks that
  are not pose assets.
* The Asset Library setup UI in the Preferences is always visible now,
  it's needed for pose library access.

Addresses T90181, T90180 and T90300.

Differential Revision: https://developer.blender.org/D12120
2021-08-11 14:32:07 +02:00
Campbell Barton ced94bc11c Cleanup: code comments punctuation / spacing 2021-07-23 17:03:51 +10:00
Campbell Barton 9b89de2571 Cleanup: consistent use of tags: NOTE/TODO/FIXME/XXX
Also use doxy style function reference `#` prefix chars when
referencing identifiers.
2021-07-04 00:43:40 +10:00
Campbell Barton f1e4903854 Cleanup: full sentences in comments, improve comment formatting 2021-06-26 21:50:48 +10:00
Campbell Barton 4b9ff3cd42 Cleanup: comment blocks, trailing space in comments 2021-06-24 15:59:34 +10:00