Commit Graph

14538 Commits

Author SHA1 Message Date
Richard Antalik
fa2c1698b0 VSE: Image transform tools
Add tools for image manipulation in sequencer preview region.

This includes:
- Translate, rotate and resize operators, tools and gizmos
- Origin for image transformation
- Median point and individual origins pivot modes
- Select and Box select operator works in preview
- Image overlay drawing

ref T90156

Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D12105
2021-09-21 10:55:04 +02:00
Campbell Barton
f5c6029cc5 Keymap: preference for keys to set the active tool
With "Keys Activate Tools" preference enabled, keys such as G/R/S
activate the move/rotate/scale tool instead of the modal operator.

Addresses T83692.
2021-09-21 18:24:12 +10:00
Campbell Barton
8b8a678cdf Keymap: preference for Alt-LMB to use the active tool
With the LMB select key-map some tools required clicking on a gizmo.
With this preference it's possible to hold Alt and click anywhere.

Addresses T83689.
2021-09-21 18:24:07 +10:00
Campbell Barton
c9d9bfa84a Keymap: preference for fallback-tool with RMB select
Expose a key-map preference "Fallback Tool (RMB)",
disabled by default.

The right mouse button uses the fallback tool
(currently visible selection tool in the toolbar),
instead of always tweaking.

When any selection tool is active, right mouse always tweaks.

To enable fallback selection on RMB, set the "Right Mouse Select Action"
to "Selection Tool".

Internal changes:

- Add fall-back key-maps, separate key-maps needed for when the tool is
  run as a fall-back. This is needed so RMB-select can support fall-back
  tools, so left-mouse can be used when it's the active tool and RMB
  can be used as a fall-back action when another tool is active.
- Add options field to tools so tools without gizmos can enable the
  full-back tool keymap.
- Support multiple key-maps for keymap handlers.
- Fall-back keymaps now co-exist with the tool-keymaps.
  So both keymaps may be active at once - using different mouse buttons.
  When gizmos are in use, a highlighted gizmo prioritizes the
  tool-keymap over the fall-back keymap.

Resolves T83690.

Reviewed By: JulienKaspar

Ref D12493
2021-09-21 18:14:11 +10:00
Hans Goudey
17021adcea Geometry Nodes: Curve Sample Node
This node allows sampling positions, tangents, and normals at any
arbitrary point along a curve. The curve can include multiple splines,
all are taken into account. The node does not yet support transferring
generic attributes like radius, because some more general tooling will
make that much more feasible and useful in different scenarios.

This is a field node, so it is evaluated in the context of a data-flow
node like "Set Position". One nice thing about that is it can easily
be used to move an entire geometry like the follow path constraint.

The point along the curve is chosen either with a factor of the total
length of the curve, or a length into the curve, the same choice used
in the curve trim node.

Differential Revision: https://developer.blender.org/D12565
2021-09-20 20:23:26 -05:00
Victor-Louis De Gusseme
05f3f11d55 Geometry Nodes: Attribute Statistic Node
This nodes evaluates a field on a geometry and outputs various
statistics about the entire data set, like min, max, or even
the standard deviation. It works for float and vector types currently,
though more types could be supported in the future.

 - All statistics are calculated element-wise for vectors.
 - "Product" was not added since the result could very easily overflow.
 - The "Size" output was not added since it isn't specific to an
   attribute and would fit better in another node.

The implementation shares work as much as possible when multiple
statistics are needed.

This node has been in development since the beginning of this year,
with additions from Johnny Matthews and Hans Goudey.

Differential Revision: https://developer.blender.org/D10202
2021-09-20 18:39:39 -05:00
Aaron Carlisle
15471d9bed Update RNA to user manual url mappings 2021-09-20 13:40:31 -04:00
Harley Acheson
a79c33e8f8 UI: Change "Favorites" to "Bookmarks"
Change of File Browser "Favorites" section header in source list
(T panel) to "Bookmarks" to maintain consistency with all the other
bookmark-related text and operations.

See D10262 for more information and alternatives considered.

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

Reviewed by Julian Eisel
2021-09-20 07:42:17 -07:00
Richard Antalik
7cb65e4581 Cleanup: Refactor VSE overlay settings
Move overlay flags into SequencerPreviewOverlay and
SequencerTimelineOverlay structs.

Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D12569
2021-09-20 16:30:15 +02:00
Jacques Lucke
fc4f82d200 Geometry Nodes: support Noise Texture node
This makes the Noise Texture node available in geometry nodes.
It should behave the same as in shader node, with the exception
that it does not have an implicit position input yet. That will
be added separately.

Differential Revision: https://developer.blender.org/D12467
2021-09-20 13:12:25 +02:00
Jacques Lucke
7da9da2b27 Geometry Nodes: new Realize Instances node
This node has a simple geometry input and output.
If the input geometry contains instances, they will be realized
into actual geometry. When there are many instances, this can
be very slow and memory intensive. Generally, instances should
only be made real when necessary, e.g. when every instance
should be deformed independently.

Differential Revision: https://developer.blender.org/D12556
2021-09-20 12:37:52 +02:00
Jacques Lucke
6b0aa7ae15 Geometry Nodes: hide Attribute Remove node when fields are enabled 2021-09-17 16:21:20 +02:00
Campbell Barton
06ac655b8d WM: expose the "any" state of KeyMapItem modifiers
Change KeyMapItem.alt/ctrl/shift/oskey to integer types,
where -1 is used to ignore the modifier when matching key-map items.

It was only possible to set all modifiers to -1 at once from RNA
using the 'any' property.
Afterwards individual modifiers could be set back to true/false.
Although these key-map items could not be exported/imported.

Exposing the values directly avoids the need for cumbersome workarounds.
2021-09-17 16:52:33 +10:00
Campbell Barton
8bc27c508a UI: expose "Lasso Select" & "Extrude to Cursor" in menus
- Show "Lasso Select" in menus (along with Box & Circle select)
- Show "Extrude to Cursor" (along with other extrude actions).
- Rename operators that add/extrude on Ctrl-Click
  since their names were inconsistent.

This is mainly for discoverability.
2021-09-17 12:57:28 +10:00
Campbell Barton
180bafe225 UI: split screenshot area into a separate operator
While the screenshot operator showed an "Area" option,
it wasn't usable from the main menu (unless accessed via menu search).

Split screenshot area into an operator that depends on cursor.
2021-09-17 12:57:28 +10: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
58043c0637 Rename App Menu to Blender Menu
"App" is a name reserved for the application templates at the moment.
It may become its own term in the near future if Templates are separated
from "Apps".

So since this is a name not exposed to the users we should renamed it
sooner than later.

Note that this will require scripts to update since the name of the
class is renamed here.

This also requires an update in the User Manual.

Differential Revision: https://developer.blender.org/D12523
2021-09-16 18:48:59 +02:00
Dalai Felinto
9fee59a484 Rename show_layout_ui > show_corner_split and remove from UI
This breaks API compatibility. However we are now grouping this setting
in the proper section (preferences.apps), so scripts had to update anyways.

So they may as well do it for the final name.

The reason to remove from the UI is that this is intended for app setup,
and as such it should not be exposed to final users until we have apps
better presented (for 3.1 hopefully).

Differential Revision: D12516
2021-09-16 16:02:33 +02:00
Hans Goudey
09f14b38f2 Geometry Nodes: Add fields version of material nodes
This commit moves the old material nodes to a "legacy" folder and adds
versions of the nodes that work with fields.

The "Select by Material" node is a field node now, so it doesn't have
a geometry output. This is an improvement because there are fewer links
to connect, and it's more easily usable in different situations.
It's also called "Material Selection", since it's more of an input
than an action now.

It's sometimes necessary to use the attribute capture node to get a
more predictable interpolation to mesh faces. This is because the
selection field input is always evaluated on the face domain, so
attribute inputs are interpolated before they are booleans, so they
cannot use the new interpolations from rB5841f8656d9580d7b9.

Differential Revision: https://developer.blender.org/D12456
2021-09-15 10:51:52 -05:00
Philipp Oeser
429136c89f Fix Asset Browser cannot open containing file anymore
In {rB9cff9f9f5df0} asset_library was renamed → asset_library_ref.

Missed to update this in assets.py.

Differential Revision: https://developer.blender.org/D12497
2021-09-15 12:09:23 +02:00
YimingWu
a2c5c2b406 GPencil: Dot dash modifier.
Create dot-dash effect for grease pencil strokes. User can manually edit the length, gap and styles for each segment of dashed lines.

The values in each segment can all be key-framed to make animations.

Reviewed By: Hans Goudey (HooglyBoogly), Antonio Vazquez (antoniov)

Differential Revision: http://developer.blender.org/D11876
2021-09-15 14:38:32 +08:00
Aaron Carlisle
94dd30208e UI: Addition Changes to Freestyle Properties
- Material Properties: Use split column layout
- Remove the redundent term 'Options'
- Remove the redundent term 'Freesttle'
2021-09-14 22:57:57 -04:00
Aaron Carlisle
9b0b78d58f Update RNA to User Manual Mappings 2021-09-13 19:08:12 -04:00
Richard Antalik
9fe6854a93 Cleanup: Remove duplicate code
Class SEQUENCER_PT_overlay as defined twice.
2021-09-13 17:48:57 +02:00
Iyad Ahmed
6f52ebba19 UI: Freestyle UI Upgrade
Suggested and funded by [[ https://blendernpr.org/| BNPR ]], this patch aims to update the long not-updated Freestyle UI

**Why do the UI upgrade:**

  - Freestyle UI doesn't match the rest of Blender UI, it was neglected for a long time
  - The current UI makes Freestyle workflows tedious and distracting

**Highlights:**

For before/after screenshots see https://developer.blender.org/D10505

Video:
https://youtu.be/qaXhuJW_c9U

Workflow video (older revision): https://youtu.be/IqbjIq_A800

Doc patch (WIP): https://github.com/bnpr/FreestyleUIUpgrade/blob/main/freestyle-ui-upgrade-docs.diff

Reviewed By: #user_interface, Blendify, HooglyBoogly, Severin

Differential Revision: https://developer.blender.org/D10505
2021-09-13 10:37:50 -04:00
Bastien Montagne
410dc76177 Various UI messages fixes and updates. 2021-09-13 12:40:37 +02:00
Hans Goudey
b9febb54a4 Geometry Nodes: Support modifier on curve objects
With this commit, curve objects support the geometry nodes modifier.

Curves objects now evaluate to `CurveEval` unless there was a previous
implicit conversion (tessellating modifiers, mesh modifiers, or the
settings in the curve "Geometry" panel). In the new code, curves are
only considered to be the wire edges-- any generated surface is a mesh
instead, stored in the evaluated geometry set.

The consolidation of concepts mentioned above allows remove a lot of
code that had to do with maintaining the `DispList` type temporarily
for modifiers and rendering. Instead, render engines see a separate
object for the mesh from the mesh geometry component, and when the
curve object evaluates to a curve, the `CurveEval` is always used for
drawing wire edges.

However, currently the `DispList` type is still maintained and used as
an intermediate step in implicit mesh conversion. In the future, more
uses of it could be changed to use `CurveEval` and `Mesh` instead.

This is mostly not changed behavior, it is just a formalization of
existing logic after recent fixes for 2.8 versions last year and two
years ago. Also, in the future more functionality can be converted
to nodes, removing cases of implicit conversions. For more discussion
on that topic, see T89676.

The `use_fill_deform` option is removed. It has not worked properly
since 2.62, and the choice for filling a curve before or after
deformation will work much better and be clearer with a node system.

Applying the geometry nodes modifier to generate a curve is not
implemented with this commit, so applying the modifier won't work
at all. This is a separate technical challenge, and should be solved
in a separate step.

Differential Revision: https://developer.blender.org/D11597
2021-09-11 13:54:40 -05:00
Brecht Van Lommel
5e0684b07d Revert startup.blend changes from commit a00507c482e2
It appears an old version of this file was committed by accident. The
intended change to remove sculpt layers was done in versioning code and
does not require a modified startup.blend.
2021-09-10 18:59:39 +02:00
Hans Goudey
e2f99c338b Geometry Nodes: Add versioning to change legacy node ID names
Recently we have decided to avoid fancier versioning for nodes with
string inputs for attribute names when updating the attribute workflow
for 3.0. In that case we would just duplicate any node that will
have an updated version to work with fields.

We want to be able to use the "proper" ID names for the new versions
of the nodes though, so this patch adds "Legacy" to the IDs of all
nodes that will be replaced in 3.0. This commit also removes the nodes
from the add menu when the fields experimental preference is enabled,
in order to make it clear what has been updated and what hasn't.

Nodes in the "Maybe" categories in versioning_300.c can be renamed
later if necessary. For now it's probably better to be conservative,
and to keep the list complete.

Differential Revision: https://developer.blender.org/D12420
2021-09-10 10:34:49 -05:00
Campbell Barton
a00507c482 Templates: remove masking layers from the default startup file
Remove sculpt mask layer from the default cube, added in
444934632a8d8e239bc0c6d79a638ec0943152a6.
2021-09-10 19:29:45 +10:00
Harley Acheson
c9347b9a7f UI: File Browser Options Fix
With D12436 two File Browser properties were renamed but two references
not changed in space_filebrowser.py

See D12449 for details.

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

Reviewed by Hans Goudey
2021-09-09 14:43:34 -07:00
Harley Acheson
efcf46fb6d Fix T90317: Confusing File Browser Preferences
Preferences / File Browser section made less confusing.

See D12436 for details and comparisons.

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

Reviewed by Campbell Barton and Julian Eisel
2021-09-09 09:49:45 -07: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
Philipp Oeser
f8ead736a0 Fix FONT objects cannot use Object Font anymore
Mistake in {rB459974896228}.

To use Object Fonts, (vertex) instancing needs to be enabled.
So bring back the instancing panel and improve the instancing choice
(similar to rB6c0c766bcaa0) by just giving the 'Vertex' choice (or
'None') and explain this is only used for Object Fonts on characters.

Was reported in D11348 itself.

Differential Revision: https://developer.blender.org/D12438
2021-09-09 09:38:48 +02:00
Jörg Müller
8f785524ae VSE: Adding a panning angle for multichannel audio.
The panning angle allows a more intuitive panning when the output is
surround sound. It sets the angle on the horizontal plane around the
listener. 0 degrees is to the front, negative values go to the left and
positive ones to the right. +/-180 degrees is directly from the back.

Technical detail: the panning value is linear with the panning angle
with a factor of 90 degrees. For stereo this means that -1 is left and
+1 right, since the speakers are exactly 90 degrees to either side.

Differential Revision: https://developer.blender.org/D12275
2021-09-08 21:18:08 +02:00
Richard Antalik
7beb4a0e0a Fix non-exiting property in keymap
In e6a1d488ab79 `deselect_all` property was removed from
`sequencer.select` operator but some keymap items were missed, which was
caught by tests by buildbot.
2021-09-08 01:23:07 +02:00
Richard Antalik
e6a1d488ab Cleanup: VSE select operator
Operator combines more features and it wasn't very transparent which
properties are used in which feature and how they are used.

Features linked_time, side_of_frame and linked_handle are
isolated, logic moved into own function.

deselect_all property was removed as it practically equals to
!extend in all cases.

Functional change: Dragging existing selection will not change active
strip. Previously this could happen if click happened on strip that
wasn't active.

Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D12320
2021-09-08 00:01:00 +02:00
Antonio Vazquez
ce71357711 Fix T90414: New GPencil icons
Designed by @mendio

The new icons are:

* Dot-Dash modifier
* Length Modifier
* Line Art modifier
2021-09-06 17:35:12 +02: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
Aaron Carlisle
4ddad5a7ee UI: Split Output Properties Dimensions panel
I remember when we originally decided on the Dimensions panel,
one of the reasons we combined time and image size properties in the same panel,
was simply because the 2.49 and previous UIs used fixed-size panels,
so we often put two categories of properties inside a panel, using two columns.

Now that we no longer do this, we could clarify and simplify some panels
by splitting them, such as the Output > Dimensions panel

{F6753690}

Reviewed By: brecht, pablovazquez

Differential Revision: https://developer.blender.org/D4440
2021-09-05 21:27:49 -04:00
Aaron Carlisle
d10ea97053 Compositor: New Posterize Node
The posterize node limits the number of colors per channel.
This is useful to generate masks or to generate stylized images

Both the tiled and full-frame implementation are included in this patch

{F10314012}

Reviewed By: manzanilla, jbakker

Differential Revision: https://developer.blender.org/D12304
2021-09-05 15:24:35 -04:00
Jesse Yurkovich
4fb7217043 UDIM: Show the UV grid even when images are loaded
Allow the UDIM grid to be shown and adjusted when there are images
loaded in UV edit mode. Right now the grid feature disappears once an
image is loaded and many have found this to be confusing.

Based on community and artist feedback, there was support to change this
behavior[1]

This patch does the following:
- Allows the grid to be shown even when images are present
- The max allowable dimensions for the grid has been increased from
10x10 to 10x100 to match the underlying maximum UDIM range that blender
supports

Note: This should not affect other Image editor modes like Paint/Mask or
the Render Result viewer etc. Future work in this area is currently
documented in a dedicated design task[2]

[1] https://devtalk.blender.org/t/the-udim-tile-grid-design-and-feedback-thread/20136
[2] https://developer.blender.org/T90913

Differential Revision: https://developer.blender.org/D11860
2021-09-03 13:03:28 -07:00
Antonio Vazquez
f530b43550 Fix T91159: GPencil Smooth brush is using Affect Pressure but not used
The parameter wa sin the UI but was not used because it was replaced by Use Thickness.
2021-09-03 12:42:18 +02:00
Antonio Vazquez
6fc92b296f GPencil: Change default Scale Thickness to True in 2D template
This parameter is more logic as true because is better scale thickness when the size of the stroke changes.

Reviewed by: @mendio @pepeland
2021-09-02 16:26:13 +02:00
Hans Goudey
42546db490 Fix T91054: Editing group custom property gives error
This commit fixes the custom property edit operator for the the case of
editing group properties. Currently this isn't supported very well, the
data is converted to a string, but the operator shouldn't fail anyway.

This allows editing properties created like this:
C.object['abuse'] = {'parent' : ['child1', 'child2']}

These changes reflect some issues with the design of the operator.
Requiring guessing the type of the data does not work well at all, and
makes code more complicated. In the future this operator can be updated
to use a type drop-down.

Differential Revision: https://developer.blender.org/D12364
2021-09-01 11:47:59 -05:00
Hans Goudey
99c981fd06 Cleanup: Remove redundant property UI data clear
Since the UI data is now stored in the property, and the property is
deleted on the next line, this doesn't need to be called separately.
2021-09-01 11:46:21 -05:00
Antonio Vazquez
84f826ff23 Fix T90989: Annotation opacity must not be animatable
All props of annotations are not animatable by design and opacity must be equal.

As the opacity is reused by gpencil objects, a new prop has been created in order to use different props for annotations and GP objects.
2021-08-31 14:59:55 +02:00
Philipp Oeser
f4eacad48f Fix AssetBrowser UI errors
Steps to reproduce:
- enable Extended Asset Browser
- open a regular File Browser

gives:
"rna_uiItemR: property not found: FileSelectParams.asset_category"

Now do proper poll.

Differential Revision: https://developer.blender.org/D12350
2021-08-31 10:41:12 +02:00
Hans Goudey
29590eec6e Fix T91054: List of strings custom property cannot be edited
This commit fixes editing the value of a list of strings custom property
with the "Custom Property Edit" operator. This sort of custom property
isn't very well supported in general, but editing the values should
work properly anyway.

Differential Revision: https://developer.blender.org/D12348
2021-08-30 22:21:11 -05:00
Campbell Barton
fbcb9c5e3f Cleanup: sequencer operators
- Use name 'strip' instead of 's'
- Assign a variable to 'scene' instead of accessing from context.
- Avoid temporary variable for swapping values.
2021-08-31 07:39:03 +10:00