Age | Commit message (Collapse) | Author |
|
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.
|
|
|
|
|
|
|
|
Many menus get their labels exported to the .po file, but then are not actually translated in the UI.
Before:
{F13283752}
After:
{F13283750}
Reviewed By: mont29
Differential Revision: https://developer.blender.org/D15417
|
|
Rename and refactor several F-curve key manipulation functions, and move
them from `editors` to `blenkernel`.
The functions formerly known as `delete_fcurve_key`,
`delete_fcurve_keys`, and `clear_fcurve_keys` have been moved from
`ED_keyframes_edit.h` to `BKE_fcurve.h` and have been renamed according
to hierarchical naming rules.
Below is a table of the naming changes.
| From | To |
| -- | -- |
| `delete_fcurve_key(fcu, index, do_recalc)` | `BKE_fcurve_delete_key(fcu, index)` |
| `delete_fcurve_keys(fcu)` | `BKE_fcurve_delete_keys_selected(fcu)` |
| `clear_fcurve_keys(fcu)` | `BKE_fcurve_delete_keys_all(fcu)` |
| `calchandles_fcurve()` | `BKE_fcurve_handles_recalc()` |
| `calchandles_fcurve_ex()`| `BKE_fcurve_handles_recalc_ex()` |
The function formerly known as `delete_fcurve_key` no longer takes a
`do_fast` parameter, which determined whether or not to call
`calchandles_fcurve`. Now, the responsibility is on the caller to run
the new `BKE_fcurve_handles_recalc` function if they have want to
recalculate the handles.
In addition, there is now a new static private function called
`fcurve_bezt_free` which sets the key count to zero and frees the key
array. This function is now used in couple of instances of functionally
equivalent code. Note that `BKE_fcurve_delete_keys_all` is just a
wrapper around `fcurve_bezt_free`.
This change was initially spurred by the fact that `delete_fcurve_keys`
was improperly named; this was a good opportunity to fix the location
and naming of a few of these functions.
Reviewed By: sybren
Differential Revision: https://developer.blender.org/D15282
|
|
Some operator titles were not translated in the quick favorites menu.
Before:
{F13283724}
After:
{F13283725}
Reviewed By: mont29
Differential Revision: https://developer.blender.org/D15416
|
|
|
|
3D text included checks for escape codes such as \n\r\b which have not
been included in wmEvent.ascii since [0] (2009).
Remove these and use more straightforward logic for overriding the
events text input.
[0] 66437a62a73966de8ccb673473ba69d6c1ed66a3
|
|
- Remove references to `ISTEXTINPUT` as any keyboard event with it's
utf8_buf set can be handled as text input.
- Update references to the key repeat flag.
|
|
The `ascii` member was only kept for historic reason as some platforms
didn't support utf8 when it was first introduced.
Remove the `ascii` struct members since many checks used this as a
fall-back for utf8_buf not being set which isn't needed.
There are a few cases where it's convenient to access the ASCII value
of an event (or nil) so a function has been added to do that.
*Details*
- WM_event_utf8_to_ascii() has been added for the few cases an events
ASCII value needs to be accessed, this just avoids having to do
multi-byte character checks in-line.
- RNA Event.ascii remains, using utf8_buf[0] for single byte characters.
- GHOST_TEventKeyData.ascii has been removed.
- To avoid regressions non-ASCII Latin1 characters from GHOST are
converted into multi-byte UTF8, when building X11 without
XInput & X_HAVE_UTF8_STRING it seems like could still occur.
|
|
Differential Revision: https://developer.blender.org/D15421
|
|
Using white spaces in data names should not be encouraged in general,
better not give wrong example here.
Originally part of D15441.
|
|
This commit exposes snap options in transform operators. These options
are needed for Python tools to control snapping without requiring the
tool settings to be adjusted.
The newly exposed options are:
- `snap_elements` for choosing which element(s) of target the source
geometry should snap to (ex: Face Raycast).
- `use_snap_self`, `use_snap_edit`, `use_snap_nonedit`,
`use_snap_selectable_only` for controlling target selection.
- `use_snap_project` for controlling Face Raycast snapping.
- `use_snap_to_same_target` and `snap_face_nearest_steps` for
controlling Face Nearest snapping.
Reviewed by: Campbell Barton (campbellbarton)
Differential Revision: https://developer.blender.org/D15398
|
|
There were two bugs, a regression in [0] and the object-data wasn't
tagged for depsgraph updating.
[0]: 19df0e3cfd5b9fed891ed81dd1123b2351605a7d
|
|
Simplify interface, regularize implementation and some light cleanup.
See also: T79304 and D15419.
|
|
This makes the code clearer.
|