Commit Graph

34870 Commits

Author SHA1 Message Date
Sebastian Parborg 77794b1a7b VSE: Add precise drag and drop and strip previews
This patch adds the drag and drop strip previews in the VSE.
It also adds two new functions to the drag and drop API.

1. "draw_in_view" for callbacks that wants to draw elements in local viewport coordinates
2. "on_drag_start" that can be used for prefetching data only once at the start of the drag.

Reviewed By: Julian, Campbell

Differential Revision: http://developer.blender.org/D14560
2022-04-28 12:55:51 +02:00
Kevin C. Burke eed8c2e655 Fix T96476: Equalize Handles not working on all keyframes
As the default handle type in Blender is 'Auto Clamped' the Equalize
Handles operator will often appear to have no affect on the selected
keyframes on which it is run. If either of the keyframes' handle types
are 'Auto', 'Auto Clamped', or 'Vector', this patch will convert the
handles to 'Aligned'.

Reviewed By: sybren

Maniphest Tasks: T96476

Differential Revision: https://developer.blender.org/D14345
2022-04-28 11:15:50 +02:00
Campbell Barton 198a763944 Cleanup: spelling in comments
Also use back-slashes for doxy commands.
2022-04-28 14:03:49 +10:00
Campbell Barton eb4b79c556 Cleanup: unbalanced doxy sections, add some sections 2022-04-28 14:03:47 +10:00
Campbell Barton 9e2d80c49e Cleanup: format 2022-04-28 14:03:46 +10:00
Kévin Dietrich 163f6a17e4 Fix T96434: bad performance with viewport statistics and GPU subdivision
The subdivision is always recomputed on the CPU when displaying stats
if the mesh is animated which leads to bad performance.

This caches the subdivision topology counters from the draw code in the
mesh runtime and uses them for the viewport statistics.

Differential Revision: https://developer.blender.org/D14774
2022-04-27 15:30:17 +02:00
Hans Goudey 9a8669ac81 Cleanup: Use bool, remove unnecessary struct keywords 2022-04-26 18:45:40 -05:00
Hans Goudey 1f270cf99b Snap: Use Map and unique_ptr for snap cache
Use C++ types instead of GHash to make code easier to read and simpler.

Differential Revision: https://developer.blender.org/D14758
2022-04-26 18:33:05 -05:00
Julian Eisel 994da7077d Outliner: Add icon column to toggle if library overrides are editable
Adds a column to the right in the Library Overrides Hierarchies view
mode to toggle editability of library overrides.

Note that making a library override non-editable currently involves
clearing all overridden properties. This is an arguable design choice,
we should probably at least warn the user before doing this.

Part of T95802.

Reviewed by: Bastien Montagne

Differential Revision: https://developer.blender.org/D14653
2022-04-26 22:30:33 +02:00
Julian Eisel 83c8f996f1 UI: Add callback for comparing button identity
The code to compare buttons from the previous to the current frame, to
see if they match (an thus should keep the same state) was quite
generic, and didn't allow much flexibility/customization. For some
cases this isn't enough, and a more specific comparison is needed. Say
if some buttons don't actually store comparable data themselves, only
via the button context. This was the case in D14653.
2022-04-26 22:26:15 +02:00
Julian Eisel 5fe1624b0e UI: Support setting context for buttons without layout
It was possible to set context pointers for buttons via the layout, but
not for buttons in places where the layout system wasn't used (where
buttons are placed manually). This is needed for buttons in the
Outliner, see D14653.
2022-04-26 22:23:52 +02:00
Hans Goudey 96bdd65e74 Curves: Support applying geometry nodes modifier
This commit adds support for the curves object to the apply modifier
operator. A warning is added when the evaluated result of the modifier
doesn't contain any curves data.

Differential Revision: https://developer.blender.org/D14730
2022-04-26 08:07:54 -05:00
Hans Goudey db45292d8e Cleanup: Move anonymous attribute removal to geometry component
Implementing removal of anonymous attributes with `GeometryComponent`
instead of `Mesh` makes it more reusable for other types like curves.
2022-04-26 08:06:04 -05:00
Colin Marmond 4e57b6ce77 Animation: Sensible frame range for motion paths
Motion paths can now be initialised to more sensible frame ranges,
rather than simply 1-250:

    - Scene Frame Range
    - Selected Keyframes
    - All Keyframes

Reviewed By: sybren, looch, dfelinto, pablico

Maniphest Tasks: T93047

Differential Revision: https://developer.blender.org/D13687
2022-04-26 12:33:35 +02:00
Campbell Barton a28fd0ceb5 Correct over allocation in "Fix Vertex Group Deform" operator
The pointer size was incorrectly being used instead of the float size.
2022-04-26 14:33:04 +10:00
Campbell Barton 6d12bc9e91 Cleanup: use boolean arguments and return values 2022-04-26 14:25:58 +10:00
Campbell Barton a9d1b3d7e3 Cleanup: replace in-line swapping with SWAP macro
Also use bool array for true/false values.
2022-04-26 14:24:44 +10:00
Campbell Barton a003547a37 Cleanup: unused return value warning 2022-04-26 13:46:00 +10:00
Joseph Eagar c20b99b70c Vertex Paint: Fix brush color space
The brush color wasn't being converted
to scene linear space properly.
2022-04-25 13:24:22 -07:00
Joseph Eagar a8331d8c9d Cleanup: remove unused function parameter 2022-04-25 13:14:07 -07:00
Joseph Eagar 2bc0e8d304 Fix T81452: Incorrect trim lasso radius
Added a fallback path to compute the
cursor radius for when the stroke
starts over a blank area of space
(in which case SCULPT_cursor_geometry_update
fails).
2022-04-25 13:12:04 -07:00
Joseph Eagar 42878ffc26 Fix T97597: vertex paint initialization was
called by weight paint mode,
	    causing a crash
2022-04-25 12:32:03 -07:00
Joseph Eagar 38eed4ada3 Fix T97553: SCULPT_handles_colors_report called for non-sculpt brushes 2022-04-25 12:26:02 -07:00
Joseph Eagar 296d734344 Sculpt: Remove hardcoded setting of
auto-iteration property in mask filter

Note: Auto-iteration is still set manually
for increase/decrease contrast.  These should
probably become their own operators.
2022-04-25 12:15:48 -07:00
Joseph Eagar 185d9627b3 Fix T97423: Make mask filter less confusing
by showing redo panel.

The A hotkey has "auto iteration" enabled by default,
which calculates the number of times to run the filter
using a heuristic based on vertex count.

To make clear to the user what is going on the redo
panel is now shown for the mask filter operator.

NOTE: I discovered the source of the bug where sculpt
operators' redo panels were greyed out.  The name
fed to SCULPT_undo_push_begin must match the operator
name.  I've added a comment in sculpt_intern explaining
this.
2022-04-25 12:07:55 -07:00
Julian Eisel 845e2ed3a2 Cleanup: Use const for smoot scrolling function 2022-04-25 18:15:14 +02:00
Germano Cavalcante e99cb91530 Transform Snap Refactor: dedicate ghash to different SnapData types
Changes:
- Remove `BLI_memarena` (Use `MEM_cnew` and `MEM_delete` to allocate cached data)
- Implement `snap_object_data_mesh_free_ensure` and `snap_object_data_editmesh_free_ensure` and skip need to get original key Object for editmesh data
- Use `BMEditMesh` as key for editmesh `Ghash`
- Make a better distinction between `SnapObjectData`s. (`SnapData_Mesh` and `SnapData_EditMesh`)
2022-04-25 12:40:01 -03:00
Germano Cavalcante d30f701e84 Cleanup: Turn some 'eTFlag' into macros
Some of the enum values are a mixture of others and make it difficult
for the IDE to identify them.

Separating these values makes debugging easier.
2022-04-25 12:35:56 -03:00
Germano Cavalcante 35dc4ba9e2 Fix T97401: Snap options ignored for Nurbs surfaces
The editing data of a `SURF`s is similar to that of Curves and should be supported for snapping.

But unlike Curve objects, for snapping, only support the nurb points if the object is in edit mode.

This matches the solution for Meshes and avoids having to create a kind
of "boundbox" for the SURF nurb points.
2022-04-25 12:35:55 -03:00
Jacques Lucke 6963703801 Nodes: show overlays in node editor even when nodes are collapsed 2022-04-25 16:39:13 +02:00
Jacques Lucke 2b3f7c6481 Geometry Nodes: improve attribute dependency overlay
* Adjust width based on node width, necessary to make the longer name below work.
* Show "X Named Attributes" in the overlay.
* Use "Accessed named attributes" in the tooltip.

Differential Revision: https://developer.blender.org/D14751
2022-04-25 16:28:26 +02:00
Jacques Lucke 09710d5f2a Geometry Nodes: show timing overlay above attributes overlay 2022-04-25 16:03:34 +02:00
Jacques Lucke 26afa23b3b Fix: use natural string sorting for attribute names 2022-04-25 16:00:58 +02:00
Sybren A. Stüvel c2751f8a11 Cleanup: fix unused variable warning in `paint_vertex.cc`
No functional changes.
2022-04-25 16:00:15 +02:00
Pratik Borhade 0a86ab6639 Fix T96925: Fast diagonal movement in walk navigation
View moves faster with two active directions.
This is probably because `dvec` is not normalized when moving in two directions.
Normalizing this direction vector will fix the problem.

Differential Revision: https://developer.blender.org/D14729
2022-04-25 15:46:00 +02:00
Campbell Barton 416ef3b6b2 Cleanup: spelling in comments 2022-04-25 16:37:42 +10:00
Richard Antalik 29b9187b32 VSE: Update first thumbnail when moving handle
When handles are moved, job is created only for strips that need to
update first thumbnail.

ref T91618
2022-04-25 04:34:15 +02:00
Campbell Barton bba757ef81 Cleanup: various minor changes
- Add missing doxy-section for Apply Parent Inverse Operator
- Use identity for None comparison in Python.
- Remove newline from operator doc-strings.
- Use '*' prefix multi-line C comment blocks.
- Separate filenames from doc-strings.
- Remove break after return.
2022-04-24 13:41:03 +10:00
Campbell Barton a6504aa64b Cleanup: clang-format 2022-04-24 13:41:03 +10:00
Brecht Van Lommel 6787cc13d4 Bake: add UDIM tile baking support
Works for both Cycles and multires bake. Triangles are baked to multiple
UDIM images if they span across them, though such UV layouts are generally
discouraged as there is no filtering across UDIM tiles.

The bake margin currently only works within UDIM tiles. For the extend method
this is logical, for the adjacent faces method it may be useful to support
copying pixels from other UDIM tiles, though this seems somewhat complicated.

Fixes T95190

Ref T72390
2022-04-22 23:15:45 +02:00
Hans Goudey ff6098345a Cleanup: Clang tidy, unused variable warnings
Also remove unnecessary uses of `struct` and add const in one place.
2022-04-22 12:41:25 -05:00
Bastien Montagne d8abac7357 LibOverride: Add hierarchy creation from IDTemplate UI widget.
This is fairly tricky to perform, since there is often very limited
contextual information available about the 'active' hierarchy to
override.

This commit is a first step, it is expected to handle decently well
cases like objects and obdata (recreating necessary object and
collection hierarchy, and/or hooking it to a potential existing
hierarchy), at least in most common cases.

Ref: {T95707}.
2022-04-22 18:22:58 +02:00
Germano Cavalcante 75aa5ecbda Fix (unreported): Placement Tool not orienting the Object to normal
Regression introduced in
{rB721335553ccb5ce4f7a374b958b7d65befa319df}.

`plane_omat` is only computed if `snap_state->draw_plane` is `true`.
2022-04-22 12:15:13 -03:00
Bastien Montagne 024a4da6b3 Fix various typos and other UI messages issues. 2022-04-22 16:19:05 +02:00
Campbell Barton 048c769774 Fix T97277: Tweak drag transforming is broken for masks (RMB select)
Regression in 4d0f846b93,
passing selection through to drag relied on tweak events running
even when the press event was handled which is not the case for drag.
2022-04-22 17:36:09 +10:00
Ramil Roosileht b226236b01 Fix - Display correct units in "Edit voxel size" widget
Fix for T84962
Before the patch, edit voxel size always displayed voxel size without units, just as a number in meters.
Now it changes like in the voxel remesh panel and shows correct units
Video:
{F13009428}

In adaptive mode:
{F13009435}

Reviewed By: JulienKaspar

Maniphest Tasks: T84962

Differential Revision: https://developer.blender.org/D14682
2022-04-22 08:09:18 +02:00
Richard Antalik 48f369d63a Fix: VSE channels region visible in preview
Hide region for preview and sequencer/preview combined view.
2022-04-22 02:51:10 +02:00
Campbell Barton 2547c3c70c Cleanup: spelling in comments 2022-04-22 10:11:48 +10:00
Richard Antalik ce95856f2d Fix: VSE channels area has no background
Draw area background even when there is no sequencer data.
2022-04-21 23:40:36 +02:00
Germano Cavalcante 9de3ed5c82 Fix T97490: snap to multiple objects with linked data can crash
The problem is old.

rB52be06301257 (fixed by rB4b35d6950d4f) just masked it.

`Object->data`, on evaluated objects, is not a safe pointer to get
objects with the same `BMEditData`.

Use `Object->runtime.data_orig` instead.
2022-04-21 14:08:17 -03:00