Commit Graph

930 Commits

Author SHA1 Message Date
Jeroen Bakker
a52a362527 Studiolights: Remove Unused Options
Studio lights had gone over several iterations during 2.80. Some
unused options where still in the code, but not used.

This PR cleans up the studio lights to options that are still in use.
Removing:

- Spherical Harmonics: It was used by workbench, but was replaced
  by regular OpenGL lights
- Irradiance textures: Was used by an old eevee world light evaluation
- Cached data files.

Pull Request: https://projects.blender.org/blender/blender/pulls/116186
2023-12-14 14:29:28 +01:00
Christoph Lendenfeld
1e931f5bd7 Anim: Bake Channel operator
This is a replacement for the workflow that uses
"Bake Curve" and "Unbake Curve" to quickly generate
dense key data.

Compared to the existing workflow it has the advantage
of allowing the user more control over the key types,
and distance between keys, as well as the frame range affected.

Operator options

* Range: the range that will be baked.
Defaults to the scene range or preview range.

* Step: Distance between keyframes.
Can be used to bake on 2s or even bake to subframes.

* Remove Existing Keys: Boolean option that
if enabled also removes keys outside the specified baking range

* Interpolation Type: Choose a interpolation mode used
for new keys e.g. Constant or Bezier

* Bake Modifiers: If enabled bakes the effect of the
modifier stack to keys and deletes the modifier stack.
If false, the code disables the modifiers before baking,
so the resulting keys will behave as if the modifiers didn't exist

The operator can be found in the Graph Editor under `Channel->Bake Channels`

Part of: #111050

Pull Request: https://projects.blender.org/blender/blender/pulls/111263
2023-12-14 11:35:25 +01:00
Andres Stephens
5c868e92d6 Fix #115581: Channel Context Menu mis-labeled
The context menu for the channels is shared
between all animation editors.
Changed "Dope Sheet Channel" label to "Channel"
for consistent channel label in all animation editors.

Pull Request: https://projects.blender.org/blender/blender/pulls/115845
2023-12-14 09:09:30 +01:00
Germano Cavalcante
f83180370a Fix #115590: UV window menus disappearing
Due to lack of forward compatibility, tool_settings.snap_uv_element
could return empty if a 4.0 file is opened in 3.6.

This causes a Python error when trying to identify the element's icon.

Avoid this python error.
2023-12-13 13:54:18 -03:00
Kenzie
3f485c8bf3 Geometry Nodes: add support for blackbody shader node
This adds the existing Blackbody shader node to geometry nodes, with the
same functionality.

Pull Request: https://projects.blender.org/blender/blender/pulls/114768
2023-12-13 10:10:06 +01:00
Douglas Paul
75f160ee96 Geometry Nodes: Add Active Camera input node
This adds a new "Active Camera" input geometry node, per #105761.

The node outputs the the scene's current active camera. It is available
from Input > Scene > Active Camera in the geometry nodes Add menu.

Typical usage would be to connect this node to an Object Info node to
obtain its transform. This works as expected when the camera's
transform is animated, and also when there are markers on the timeline
that change the active camera.

In order to support the aforementioned changes in the active camera,
this implementation adds depsgraph relations for all cameras referenced
by timeline markers. This eliminates the complexity of updating the
depsgraph whenever the scene switches to a different active camera,
but of course it comes at the cost of including more objects than
strictly necessary in the depsgraph for scenes that switch cameras.
Dynamically updating the depsgraph upon camera changes could be a
future improvement if there proves to be sufficient need for it.

Pull Request: https://projects.blender.org/blender/blender/pulls/113431
2023-12-12 19:11:06 +01:00
Hans Goudey
c02784bd4f Cleanup: Make format 2023-12-11 15:47:11 -05:00
Hans Goudey
dcf9d74cba Cleanup: Remove unused curves keymap items 2023-12-11 15:47:11 -05:00
Hans Goudey
9af176bfe6 Curves: Add edit mode duplicate operator
Reuse the grease pencil implementation added in:
- fb275bc040
- 5799a26568819ce27e8c12df96b7ffba84cc00f9
2023-12-11 15:47:11 -05:00
laurynas
feae0b4173 Curves: Support for edit mode draw tool
Adds new curves support to "Draw Curve" operator. This is a direct copy
and replace of the old code to the new editors directly, with a change to
create the new data structure instead of the old one. There is no attempt
at code deduplication, since that would complicate removing the old
curve type when it comes time.

To replace the "2D curve" option a new operator property is added
for projecting to the Z=0 plane.

Pull Request: https://projects.blender.org/blender/blender/pulls/115864
2023-12-11 19:44:19 +01:00
Bastien Montagne
5179e1e7d7 I18N: Enable Belarusian language in UI translations. 2023-12-11 12:54:59 +01:00
Damien Picard
6d70e9b05f UI: fix and improve a few messages
- "Frame Step" -> "Number of frames to skip forward while baking each
  frame": expand description which was just copying the prop name.
- "b-bone" -> "B-Bone": title case.
- "Volumes Lighting" -> "Volume Lighting": typo.
- "Volumes Shadows" -> "Volume Shadows": typo.
- "Insert Blank Keyframe (All Layer)" -> "(All Layers)": typo.
- "the an" -> "an", typo.
- "Inverse" -> "Invert": use verb instead of noun for an action.
- "Desination" -> "Destination": typo.
- "Hides all other F-Curves other than the ones being framed": remove
  extra "other".
- "Remove Bone from Bone collections" -> "Collection", singular because
  the operator is only applied to the active collection. Also title
  case on "Collection".
- "Change Stroke material with selected material" -> "Assign the
  active material slot to the selected strokes": rephrase by reusing
  the message from the non-Grease Pencil materials.
- "VisAction", "VisArea" -> "Visibility Action", "Visibility Area":
  expand abbreviation. This is not exposed in the UI right now but
  will show up in the API docs.
- "Stop Mode Right / Global Down" -> "Stop Move" (typo).
- "... for node input  %s": remove extra space.
- "Move along their normal" -> "Move shadows along their normal":
  rephrase unclear sentence.
- "Stat Vis" -> "Mesh Analysis": stands for "Statistical
  visualization"? Unclear and not shown anywhere. Reuse the label
  specified in the UI code instead.
- " Output data...": remove leading space.
- "Attribute domain for the selection and group id inputs": title case
  on "Selection" and "Group ID" as that is how they appear in the UI.
- "Ior" -> "IOR": uppercase acronym, for consistency.

Pull Request: https://projects.blender.org/blender/blender/pulls/115964
2023-12-11 00:23:03 +01:00
Clément Foucault
ae70d25959 EEVEE-Next: Refactor Raytracing pipeline
This de-duplicate some passes in the raytracing
pipeline and make it more ready for adoption
of arbitrary closure evaluation. This last part
means the removal of some per closure type
options.

The put in common the tile classification step
that is now done only once for all 3 closure
type. Also add some speedup to the tile
compaction phase that is now only twice
faster.

The horizon-scan setup was also de-duplicated
and run only if needed, which can save up to
0.5ms is complex scenes.

However, this moves the max-roughness and and
resolution scaling to a common parameter.
This is to be able to support arbitrary closure
evaluation where multiple closure with conflicting
parameters could be evaluated in one tracing pass.

Pull Request: https://projects.blender.org/blender/blender/pulls/116009
2023-12-10 21:38:23 +01:00
Guillermo Venegas
7c5fa8bf6c IO: Add initial support for File Handlers registration
Adds initial support for File Handler registration with the python API
for design task #68935. File Handlers will allow developers to associate
additional UI behavior and capability to operators traditionally used
only within the file browser.

The initial commit should have no user visible changes, but will serve
as the foundation for providing file drag & drop capabilities to
operators that can manage files (#111242).

See the PR for an example of python usage.
See design task #68935 for remaining work to be explored in the future.

Pull Request: https://projects.blender.org/blender/blender/pulls/112466
2023-12-09 05:06:10 +01:00
Pratik Borhade
2e5d4a8799 GPv3: Clean loose points operator
Similar to the legacy operator. Removes strokes with a number of points less than or equal to the "limit" property.
Resolves #113599.

Pull Request: https://projects.blender.org/blender/blender/pulls/115923
2023-12-08 16:53:09 +01:00
Campbell Barton
91319641eb Fix bpy.context.copy() including evaluated_depsgraph_get 2023-12-08 22:15:52 +11:00
Campbell Barton
9ddd5126fe Fix #115887: Fallback tool only tweaks single elements
Use the same pass-through option when the select tool is used as a
fallback.
2023-12-08 18:09:51 +11:00
Casey Bianco-Davis
4dcda1ec12 GPv3: Overlay: Show edit lines option
Adds option to only show edit mode lines overlay, and also adds overlay options panel.

Pull Request: https://projects.blender.org/blender/blender/pulls/115739
2023-12-07 11:42:06 +01:00
Pratik Borhade
31ee0a2a3e Fix: GPv3: Missing add layer option in menu when list is empty
There was a mistake in 671f428ead. When the layers list is empty, the operator to add a new
layer will be missing in the "Active Layer" menu.

Pull Request: https://projects.blender.org/blender/blender/pulls/115785
2023-12-07 10:51:44 +01:00
Hans Goudey
53418fc3a1 Sculpt: Separate invert visibility operator from face sets
Remove "Invert Visible" from the face sets menu, since those concepts
are no longer tied together, except for some convenience features to
toggle visibility of some face sets.

On the code side, the `SCULPT_OT_face_set_invert_visibility` operator
is replaced by `PAINT_OT_visibility_invert`. It inverts vertex visibility
instead of face visibility, which mostly has the same results, except
for multires sculpting where it no longer "downgrades" visibility to
base mesh faces.
2023-12-06 23:33:46 -05:00
Campbell Barton
3d0731e66c Fix #115827: Follow active quad fails with an assertion
Replace check for Mesh.uv_layers with BMesh layer check
and report other failures which weren't accounted for.
2023-12-06 20:14:05 +11:00
Falk David
35b9e37295 Fix #115716: Empty Grease Pencil Keymap Warning
This fixes the keymap warning by removing (commentting) the empty
keymap. Once we have something to assign, we can uncomment it.

Pull Request: https://projects.blender.org/blender/blender/pulls/115796
2023-12-05 14:45:52 +01:00
Falk David
5fea1eda36 GPv3: Drawing Placements
This PR adds the drawing placement modes from GPv2.

The drawing placement defines the depth (origin, view, surface, etc.) and a plane (view, cursor, xz, etc.).

This introduces a new helper class `DrawingPlacement` that does all of the internals to find the correct projection and just exposes a simple function to project from screen space to the drawing plane/surface.

Note: Drawing on other strokes currently doesn't work, because GPv3 can't be rendered to image yet. We use the depth buffer of the grease pencil render result to find the right depth.

Pull Request: https://projects.blender.org/blender/blender/pulls/115602
2023-12-05 11:01:42 +01:00
Habib Gahbiche
153f14be2b Compositor: Make split viewer a regular split node
Changes:
- Renamed Split Viewer Node to Split Node
- Split Node is now under `Utilities` (similar to Switch node)
- Versioning: split viewer from 4.0 and before is replaced with the new split node connected to a new viewer node.

Pull Request: https://projects.blender.org/blender/blender/pulls/114245
2023-12-03 23:20:44 +01:00
Harley Acheson
8933284518 UI: Icons for Area Join and Swap
Icons provided by Alexey Adamitsky to represent screen area join and
screen area swap.

Pull Request: https://projects.blender.org/blender/blender/pulls/115712
2023-12-02 20:08:01 +01:00
Campbell Barton
32c5ea6262 Cleanup: format 2023-12-02 14:56:12 +11:00
Nate Rupsis
2cc6519692 Anim: Refactoring NLA menu into more sensible format
Updating NLA menu to be more inline with VSE / other Animation editors.

Remove "Edit" drop down, and instead split operators into "Track" & "Strip" Menus. Update Add menu to be more concise.

Pull Request: https://projects.blender.org/blender/blender/pulls/114805
2023-12-01 20:11:02 +01:00
Philipp Oeser
6d3e9f1fe8 Fix #115276: Vertex group canvas picker errors with no active group
While in weight paint mode, `ob.vertex_groups.active` can be None.
This happens when selecting a non-deforming bone, or a deforming bone
that doesn't have a group yet.

Now check for this.

Pull Request: https://projects.blender.org/blender/blender/pulls/115666
2023-12-01 17:55:29 +01:00
Hans Goudey
0978f9486e Sculpt: Remove redundant "reveal all" operator
This operator (`SCULPT_OT_reveal_all`) is redundant with
the "Hide Show" operator (`PAINT_OT_hide_show`). Since
the latter was recently changed to be much faster, remove the
former and update keymaps and menus. The industry compatible
keymap actually already contains the hide/show operator.

Pull Request: https://projects.blender.org/blender/blender/pulls/115629
2023-12-01 17:32:09 +01:00
Philipp Oeser
fe59704b52 UI: enable immediate typing for 'Select Pattern" operator
Saves a click so the "pattern" field has immediate focus.

Pull Request: https://projects.blender.org/blender/blender/pulls/115658
2023-12-01 16:09:56 +01:00
Christoph Lendenfeld
24ae0e3666 Fix: script_validate_keymap test failed
The issue was that `("value", True)` was passed in
when this is not supported. It didn't break while running
but it did break the test.
2023-12-01 15:32:32 +01:00
Daiki Hashimoto
edcac1f48b Fix #44834: Add bone selection icon next to face and vertex selection in weight paint mode
Currently, in weight paint mode, there is an icon for
face and vertex selection mode, but there isn't one
for the default mode where the user can select a bone
in any tool by alt clicking.
This lack of indication might lead to confusion for the users
when they are not able to select a bone by
alt clicking during weight painting.

By adding a bone selection icon when there is a pose
mode armature, we can communicate to the user that:
1. they can select a bone while the bone selection icon is active.
(when they are not in face or vertex selection mode)
2. they have forgot to select an armature when entering
weight paint mode by not showing the bone selection
icon at all when there is no pose mode armature.

When the bone selection icon is inactive,
the user can't select a bone.
(alt clicking selects face and vertex mode's respective element)

When no armature is selected when entering weight paint mode,
the bone selection icon doesn't show up indicating that the user
has forgot to select an armature.
(The user is also unable to select a bone by alt clicking.)

## Selection tool for bone selection mode
Currently, while selection tools exist for face and vertex
selection mode, one doesn't exist for the default mode
(bone selection mode). As the default mode will be getting
a clear indicator that it will function as a bone selection mode,
I added a selection tool entry for the bone selection mode.

Face and vertex selection modes has the shortcut 1 and 2,
so it seemed natural to give bone selection mode the shortcut of 3.

Pull Request: https://projects.blender.org/blender/blender/pulls/115409
2023-12-01 13:38:58 +01:00
Antonio Vazquez
11f606f88f GPv3: Menu to Select Material using U key
This PR includes the popup menu used to select a material pressing `U` key.

The menu is used in Draw, Sculpt and Vertex paint mode in GPv2 but this patch only includes Draw mode because other modes are not avaliable in GPv3 yet.

Related to #114203

Pull Request: https://projects.blender.org/blender/blender/pulls/114694
2023-12-01 13:12:10 +01:00
Matias Mendiola
b8a785b65b GPv3: Show and hide layers operators
- New Operator: GREASE_PENCIL_OT_layer_hide
- New Operator: GREASE_PENCIL_OT_layer_reveal
- Added menus to Edit and Draw Modes
- Added Keymap via _template_items_hide_reveal_actions()

Note: Operator names were changed for consistency with other layers operators that use _layer_ on their names

Pull Request: https://projects.blender.org/blender/blender/pulls/114348
2023-12-01 12:55:30 +01:00
casey bianco-davis
fb275bc040 GPv3: Duplicate Points operator
Adds the duplicate points operator fallowing the legacy system.

Resolves #113640
Pull Request: https://projects.blender.org/blender/blender/pulls/115389
2023-12-01 10:14:14 +01:00
Nate Rupsis
da83b2951d Anim: Add "Add/delete" track operations to NLA context menu
Updating NLA context menu, adding in more relevant track operations (tracks add, tracks add above, tracks delete).

Pull Request: https://projects.blender.org/blender/blender/pulls/114202
2023-11-30 17:15:06 +01:00
Clément Busschaert
671f428ead GPv3: "Set Active Layer" operator and menu
Resolves #113915 .

Ports the `layer_active` operator to set the active layer from an index.
Adds the menu to set the active layer from a list.

Pull Request: https://projects.blender.org/blender/blender/pulls/115606
2023-11-30 16:10:06 +01:00
Germano Cavalcante
14c2f6856a Suppress warnings by removing unused properties from keymaps
Between Blender versions, properties of some operators may be removed.

When this happens, when importing the keymap from the previous version,
a series of warnings may appear in the console. For example:
```
Warning: property 'alt_navigation' not found in item 'TRANSFORM_OT_translate'
Warning: property 'alt_navigation' not found in item 'TRANSFORM_OT_rotate'
Warning: property 'alt_navigation' not found in item 'TRANSFORM_OT_resize'
Warning: property 'alt_navigation' not found in item 'VIEW3D_OT_edit_mesh_extrude_move_normal'
...
```

Therefore, it seems to be convenient to edit these properties when
versioning.

This commit implements a `remove_properties` utility that makes this
removal simpler.

Pull Request: https://projects.blender.org/blender/blender/pulls/114936
2023-11-30 12:22:47 +01:00
Damien Picard
3f5fd74953 Fix #95045: UI: keymap header in preferences truncated when filtering
Show untruncated headers in keymap editor while filtering.

Pull Request: https://projects.blender.org/blender/blender/pulls/114012
2023-11-29 22:36:05 +01:00
Lukas Tönne
5bc82b5b7c Geometry Nodes: Remove experimental volume nodes
The new grid socket (#115270) will make these nodes obsolete and
provide more elegant ways of implementing the features. Removing
these nodes now to clean up and make future changes simpler.

Pull Request: https://projects.blender.org/blender/blender/pulls/115567
2023-11-29 16:02:06 +01:00
Antonio Vazquez
b9fba005bd GPv3: Lock unselect materials operator
Conversion of GPv2 operator

Pull Request: https://projects.blender.org/blender/blender/pulls/115278
2023-11-28 16:38:59 +01:00
Philipp Oeser
a4b8d214c6 Fix #115140: Crash undoing painting on linked image from 3DView
Related commit: 82aa300e1c / 5596f79821

82aa300e1c made it so that if only linked images are used, painting
would be prohibited. But since painting in Material mode actualy paints
across all materials it could happen that one particular image is linked
whereas another image isnt. In this case, painting on the linked image
would not be prohibited.

Two issues:

- [1] logic in above commit(s) seems slightly wrong, we could still pass
the check for linked images (also no image here should also not result
in a positive check I think).

- [2] code in `project_paint_prepare_all_faces` would still work with
linked images in slots, so
-- `ProjPaintState` -> `image_tot` was incremented
-- `ProjPaintImage` was created
-- this then ends up in the undo push - and crashes on undo

So now [1] is rectified and for [2] we skip faces with associated linked
images.

In addition, slots with linked images are now also greyed out in the UI
(`VIEW3D_PT_slots_projectpaint`) to give some sort of hint. For the
future it would probably also be good to dissallow selection of such
paint slots, but that is for another commit.

Pull Request: https://projects.blender.org/blender/blender/pulls/115263
2023-11-28 12:05:07 +01:00
Bastien Montagne
a0aaee4caf I18N: UI Translatiion: Add Belarusian language entries.
Skipped for now, until we have actual translations available.
2023-11-28 11:17:39 +01:00
Clément Foucault
ab7505c7ce EEVEE-Next: Disable distant light if world contains absorption
This restrict the usage of distant light if the world shader
contains absorption phenomenon.

Why this is needed is described in #114062.

At the same time, this removes the parameter for enabling
volume light as this is now an auto-detected optimization.

This also contains a few small cleanups.

Pull Request: https://projects.blender.org/blender/blender/pulls/115284
2023-11-24 13:51:07 +01:00
Christoph Lendenfeld
30b0c5b225 Fix: Inserting keys no longer sets the FCurve channel color
When pressing `I` in the viewport, the colors of the FCurve channels were no longer set correctly.

Caused by #113504

Fix by removing the flag that determined that in the first place,
and read straight from the user preferences. Then move the code
that sets the mode on the FCurve into the function that actually creates it.

For 99% of cases the code went to the user preference flag `AUTOKEY_FLAG_XYZ2RGB`
and if that was set, the `INSERTKEY_XYZ2RGB` would be set. The only case where this
was not from the user preferences was from custom keying sets.
There was an override flag for FCurve colors on custom keying sets.
I removed that with this patch since the use case is not apparent
and custom keying sets are hardly used.

Pull Request: https://projects.blender.org/blender/blender/pulls/115297
2023-11-24 13:05:10 +01:00
Jacques Lucke
ea98c39c50 Cleanup: remove debug print 2023-11-24 09:52:50 +01:00
Antonio Vazquez
9d8283d113 GPv3: Hide Others operator
This operators hide all materials except the active one.

There is a parameter to hide only active as it was in GPv2.

Related to #114997

Pull Request: https://projects.blender.org/blender/blender/pulls/115038
2023-11-23 16:03:30 +01:00
Antonio Vazquez
1d6a617aa2 GPv3: Lock and Unlock all materials operators
This is the conversion of existing operators in GPv2.

Related to #114997

Pull Request: https://projects.blender.org/blender/blender/pulls/115041
2023-11-23 15:36:05 +01:00
Antonio Vazquez
eb935bf32d GPv3: Lock Unused Materials operator
Conversion of GPv2 operator.

Related to #114997

Pull Request: https://projects.blender.org/blender/blender/pulls/115272
2023-11-23 15:31:47 +01:00
Clément Foucault
6f1ed59c4d EEVEE-Next: Display render pass panel in viewport 2023-11-22 16:57:21 +01:00