Age | Commit message (Collapse) | Author |
|
This was meant as an experiment to see how tangible it is to rewrite the
File Browser UI code to be based on views, starting with the grid view
for thumbnail mode. See T99890.
My initial conclusion is that porting to views is quite doable, but
we'll need some further UI code features to make certain things
possible. Like big "composed" icons, where a file type icon is displayed
on top of a big, generic file icon.
There is a fair bit of stuff here that I'm not happy with. Plus things
like selection, double clicking to open and renaming don't work yet.
It's a start, a proof of concept even :)
|
|
|
|
The new view item base class already holds a reference to the view, no
need to have one in the derived class as well.
|
|
|
|
|
|
All callers passed `false` for this parameter, making it more confusing
than useful. If this functionality is needed again in the future, a separate
function should be added.
Differential Revision: https://developer.blender.org/D15401
|
|
|
|
|
|
Missed in d14c2d549b2fdde2a116f6a37837a1e3776da3cb
|
|
Oversight in b0da080c2cb9. The `session_uuid` operator property wouldn't
be checked by the invoke callback, and if neither the `filepath` nor the
`name` property were set, the File Browser would open.
|
|
names/basenames/suffixes
An implementation of T73412, roughly as outlined there:
Track the names that are in use, as well as base names (before
numeric suffix) plus a bit map for each base name, indicating which
numeric suffixes are already used. This is done per-Main/Library,
per-object-type.
Timings (Windows, VS2022 Release build, AMD Ryzen 5950X):
- Scene with 10k cubes, Shift+D to duplicate them all: 8.7s -> 1.9s.
Name map memory usage for resulting 20k objects: 4.3MB.
- Importing a 2.5GB .obj file of exported Blender 3.0 splash scene
(24k objects), using the new C++ importer: 34.2s-> 22.0s. Name map
memory usage for resulting scene: 8.6MB.
- Importing Disney Moana USD scene (almost half a million objects):
56min -> 10min. Name map usage: ~100MB. Blender crashes later on
when trying to render it, in the same place in both cases, but
that's for another day.
Reviewed By: Bastien Montagne
Differential Revision: https://developer.blender.org/D14162
|
|
Add calls to a few locations that look like they may need to
initialize the Custom Space matrix, i.e. generally any place
that computes target matrices.
Differential Revision: https://developer.blender.org/D9732
|
|
|
|
Adds a new option to the 'Delete ShpaKeys' operator, which first applies
the current mix to the object data, before removing all shapekeys.
Request from @JulienKaspar from Blender studio.
Reviewed By: JulienKaspar
Differential Revision: https://developer.blender.org/D15443
|
|
This commit removes the use of PolySpline for resampling curves and
replaces it with the length parameterization utility for that purpose.
I didn't test performance, but I would expect the shrinking to be
slightly faster because I reused some arrays to avoid allocating
them for every curve. I noted some potential improvements in
the "add curves" function.
Differential Revision: https://developer.blender.org/D15342
|
|
Part of T98518
|
|
Similar to snapping to the world origin in the 3D viewport. This can be found
in the Shift+S pie menu and UV > Snap menu.
Differential Revision: https://developer.blender.org/D15055
|
|
|
|
Only the Shade Smooth operator has autosmooth settings.
|
|
Create a transform conversion type that only considers the Vertex
Custom Data.
This reduces the complexity of converting Meshes and slightly
optimizes the transformation.
|
|
After becb1530b1c81a408e20 the new curves object type isn't hidden
behind an experimental flag anymore, and other areas depend on this,
so disabling curves at compile time doesn't make sense anymore.
|
|
File documentation was outdated and could use general improvement.
Function names didn't really reflect the level they are operating on.
|
|
Part of T98518.
|
|
Adding the `FCURVESONLY` filter in the filter function of the Grease
Pencil dopesheet prevents calls to F-curves related functions to grease
pencil channels, thereby fixing the crash.
Reviewed By: antoniov, sybren
Maniphest Tasks: T99732
Differential Revision: https://developer.blender.org/D15490
|
|
No user visible changes expected.
Merges the tree row and grid tile button types, which were mostly doing
the same things. The idea is that there is a button type for
highlighting, as well as supporting general view item features (e.g.
renaming, drag/drop, etc.). So instead there is a view item button type
now. Also ports view item features like renaming, custom context menus,
drag controllers and drop controllers to `ui::AbstractViewItem` (the new
base class for all view items).
This should be quite an improvement because:
- Merges code that was duplicated over view items.
- Mentioned features (renaming, drag & drop, ...) are much easier to
implement in new view types now. Most of it comes "for free".
- Further features will immediately become availalbe to all views (e.g.
selection).
- Simplifies APIs, there don't have to be functions for individual view
item types anymore.
- View item classes are split and thus less overwhelming visually.
- View item buttons now share all code (drawing, handling, etc.)
- We're soon running out of available button types, this commit merges
two into one.
I was hoping I could do this in multiple smaller commits, but things
were quite intertwined so that would've taken quite some effort.
|
|
No user visible changes expected.
Similar to rBc355be6faeac, but for view items now instead of the view.
Not much of the item code is ported to use it yet, it's actually a bit
tricky for the most part. But just introducing the base class already
allows me to start unifying the view item buttons (`uiButTreeRow` and
`uiButGridTile`). This would be a nice improvement.
|
|
Fix the issue where undoing a "duplicate NLA strip" operation would
require two undo steps.
The cause of this was that the operator was not using the operator macro
system to combine both the duplication and the translate operators into
one. Instead, the old code was simply manually invoking invoking the
translate operator after the duplicate operator had completed.
This patch requires the default keymap to be modified to include the two
new macro operators, `NLA_OT_duplicate_move` and
`NLA_OT_duplicate_linked_move` in favour of the old keymap that simply
called `NLA_OT_duplicate` and passed along a `linked` argument.
`duplicate_move` and `duplicate_move_linked` are two different enough
operations to justify having their own operators from user's
point-of-view, especially since we cannot yet have different tool-tips
based on an operator's settings.
Reviewed By: sybren, mont29
Differential Revision: https://developer.blender.org/D15086
|
|
Without this, symmetry does not work by default when the surface
object was not at the same location as the 3d cursor.
|
|
|
|
Restore only_selected_faces flag inadvertently changed by c0e453233132
Differential Revision: https://developer.blender.org/D15480
|
|
Due to the ordering of the checks, assert and async were not highlighted
in the editor, even though they were in the list of keywords.
Differential Revision: http://developer.blender.org/D15483
|
|
Although e.g. in the dopesheet there is no specific concept of
active action, displaying panels requires singling out one action
reference. It is more efficient and clearer to implement this
natively in the context rather than using selected_visible_actions[0].
- In the Action Editor the action is taken from the header.
- In the Dope Sheet the first selected action is chosen, because
there is no concept of an active channel or keyframe.
- In the Graph Editor the action associated with the active curve
is used, which should also be associated with the active vertex.
This case may be different from selected_visible_actions[0].
Differential Revision: https://developer.blender.org/D15412
|
|
Differential Revision: https://developer.blender.org/D15473
|
|
The stroke code now supports raycasting the original mesh.
This fixes anchored mode not working for negative brushes,
which might move the mesh out of the initial mouse cursor
position.
|
|
The scene spacing code was failing to
check if a raycast failed, which can happen
when sculpting the edges of objects in negative
mode.
Note I removed what I suspect was a hack put
in to fix this, spacing was clamped
to 0.001 scene units.
Scene spacing mode is actually quite broken,
so it will be fixed in a series of phases.
|
|
Fix for {T99039}.
The problem was that `AUD_mixdown` and `AUD_mixdown_per_channel` were returning pointers to freed memory.
Two key changes are made:
1. The return value of those functions now simply return a bool as to whether the operation succeeded, instead of an optional error string pointer.
2. The error string buffer is now passed into the function to be filled in case an error occurs. In this way, the onus of memory ownership is unamibiguously on the caller.
Differential Revision: https://developer.blender.org/D15260
|
|
|
|
No functional changes.
|
|
overrides.
The outliner would tagg all existing local IDs (for remap from linked
reference data to newly created overrides) when creating a new override.
This would become critical issue in case there is several existing
copies of the same override hierarchy (leading to several hierarchies
using the same override).
Further more, BKE override creation code would not systematically
properly remapp linked usages to new overrides one whithin the affected
override hierarchy, leading to potential undesired remaining usages of
linked data.
|
|
This is useful when using an armature as a camera rig, to avoid creating and
targetting an empty object.
Differential Revision: https://developer.blender.org/D7012
|
|
* Snap border to pixels just outside the drawn border, to more easily select
specific pixels by drawing a border inside them.
* Support cropped border renders.
|
|
Instead of duplicating logic many times.
|
|
Fix unreported: Resize with Constrain To Bounds will now limit one shared scale
value for both U and V instead of calculating separate scale values for each.
To fix T98061, the individual origins (transdata->center) is now used when
that mode is active.
See also: 0e9367fc29bc
Differential Revision: https://developer.blender.org/D15420
|
|
Use const pointers to ImageSaveOptions and ImageFormatData for API
parameters where appropriate.
Differential Revision: https://developer.blender.org/D15400
|
|
Differential Revision: https://developer.blender.org/D15419
|
|
No functional changes.
Prep for D15420 / T98061.
|
|
We would first invoke the dragging, and then set the drag data (like the
ID or the dragged modifier), so the `wmDropBox.on_drag_start()` handler
wouldn't be able to access this. This broke dragging some IDs from the
Outliner, noticed in D15333.
It's now possible to first create/request drag data, extend it, and then
invoke the actual dragging. The normal function to start dragging
returns `void` now instead of `wmDrag *`, so the drag data can't easily
be modified after starting anymore.
|
|
This was a missing feature and this commit solves this.
|
|
|
|
|