This PR removes validation of saved bookmarks and system paths in File
Browser. The act of checking validity of a path can result in a timeout
that can last many seconds. Blender will have a very long startup time
if any such items are disconnected, invalid, offline, or removed. Even
if these paths are not used during the Blender session, like network
shares used only at work, web storage for some non-Blender use, a
shortcut to a USB drive, etc. Items will not be greyed out, and
clicking on one will result in a timeout _at that time_ but this seems
like expected behavior.
Pull Request: https://projects.blender.org/blender/blender/pulls/138218
This feature allows the user to use `ctrl + C`, `ctrl + V` and
`ctrl + shift + V` directly in the sequencer preview. It adds these
operators also to the preview Strip menu.
It works the same as in the sequencer timeline.
Pull Request: https://projects.blender.org/blender/blender/pulls/143371
Duplicating a strip that references an ID like the scene strip would not
duplicate the scene. This is wanted in some workflows.
To align with the rest of Blender, this changes the behavior for how
strips are duplicated:
* `Shift + D` ("duplicate"): Duplicate the strip and also duplicate the
IDs referenced by the strip. Currently this only affects `Scene`,
`MovieClip`, and `Mask` strips.
* `Alt + D` ("duplicate linked"): Duplicate the strip, but reference the
same IDs. This is the current behavior in `main`.
Part of #144063.
Pull Request: https://projects.blender.org/blender/blender/pulls/144138
This simply removes the operator property to set the alpha mode, so that
this can be automatically determined. The None case was already handled
by Use Transparency, and Channel Packed doesn't make sense here.
Ref #144009
Pull Request: https://projects.blender.org/blender/blender/pulls/144074
Next step of #140360, continuing after 39c066ee53
Moves more animation theme properties shared by different editors to the new Common panel.
- Playhead (was shared by 7 editors)
- Marker Line (was shared by 5 editors)
- Marker Line Selected (was shared by 5 editors)
- Channel (was shared by 3 editors)
- Sub-channel (was shared by 3 editors)
- Channel Group (was shared by 2 editors)
- Active Channel Group (was shared by 2 editors)
In total, 27 properties are replaced with 7.
---
User Visible Changes:
- "Current Frame" is renamed to "Playhead". It was general sentiment among
Anim and UI modules to rename this everywhere after "Playhead Snapping" was
added, and this is first step towards that. Name is more recognizable and it's
clear it refers to UI element, rather than something as generic as "current frame".
- Channel, Sub-channel, Channel Group, and Active Channel Group colors in
Dope Sheet had alpha, but ones in Graph and NLA editors didn't. New common
property is used for all three of them and has alpha, meaning two editors gain
alpha as well, but they don't use alpha, still only Dope Sheet does.
- Channel and Sub-channel had different color in NLA and didn't match Dope Sheet
and Graph Editor, now since it's shared it has same color, which is a visual change
(slighlty lighter blue).
Pull Request: https://projects.blender.org/blender/blender/pulls/144060
The `Add` > `Scene` > `New Scene` operator was behaving as follows:
* If there is no active scene strip, create an empty blank scene and
assign it to a new scene strip.
* Otherwise, use the scene referenced by the active scene strip and
use one of the copy scene methods (blank, copy settings, copy linked,
or full copy) to create a new scene and assign it to a
new scene strip.
This was not ideal for 2 reasons:
1. With no strip selected, creating blank scenes is generally not very
useful as it means that the user has to e.g. update all the render
settings, add a camera, etc.
2. The behavior of copying an existing scene by using the active strip
is very hidden. Also because adding the strip immedialty calls the
move operator, so you cannot even adjust the copy method of the
scene.
This PR changes 3 things:
1. Don't use at the active scene strip. Instead use the active scene.
2. Don't create an empty blank scene, copy the settings of the active
scene by default. This means that e.g. render settings can be reused.
3. The operator entry in the `Add` > `Scene` menu is now called `Empty Scene`.
Part of #144063.
Pull Request: https://projects.blender.org/blender/blender/pulls/144069
This was disabled because island selection used to be exposed as a
UV selection mode (along with vertex/edge/face) where selecting
parts of other islands would seem like a bug.
Now island selection has been moved to a separate toggle it makes
sense to allow connected geometry to be included in the selection when
other selection options enforce this.
This PR adds a flag to the pose bone that determines its visibility.
Doing so allows to hide a pose bone and
* don't affect other instances of the same armature
* save the visibility even if the rig is linked
The visibility of the bone in object mode is now also determined by the
pose bone whereas before it was the `Bone`.
**This breaks backwards compatibility** on the Python API since the visibility property,
on the `Bone` behaves differently now as it hides the edit bone instead of the pose bone.
In order to remove all active uses of `BONE_HIDDEN_P` the changes in `armature_skinning.cc` are required.
Part of #138482
Pull Request: https://projects.blender.org/blender/blender/pulls/139167
Invoke context menu for shape key with right click.
Added `MESH_MT_shape_key_tree_context_menu`, this include operators
that takes action on selected/active tree items:
- Make Basis
- Duplicate
- Move to Top -> Move After Basis
- Move to Bottom -> Move to Last
See Video in PR description
Pull Request: https://projects.blender.org/blender/blender/pulls/143444
Edge and Vertex marks such as Crease, Bevel Weight, Seam, Sharp, have
specific use cases and colors assigned to them that users get familiar
with over time.
It can be hard to remember which color belong to what, this PR tries to
address this by introducing colored icons that follow the theme setting
for that edge mark/flag.
See PR for details and screenshots.
Pull Request: https://projects.blender.org/blender/blender/pulls/144075
Introduced in 4434a30d40
The above commit changed many of the `wm.radial_control` default
keybinds used in various paint modes to support accessing the "unified"
properties on a per-mode basis. While the base Blender keymap and the
industry compatible keymap were updated, this change was not applied
to custom keymaps, leading to confusing behavior for the users.
Pull Request: https://projects.blender.org/blender/blender/pulls/143872
Ensure that `__main__.__file__` is not set to "<blender string>" when
spawning the subprocess for the background downloader. Blender sets this
value when executing a Python string from C++ code. However, this value
causes issues with Python's `multiprocessing` module, as it expects that
IF the attribute is set, it contains the actual file of the actual main
module. Clearing it works fine, as `__file__` is optional anyway.
Pull Request: https://projects.blender.org/blender/blender/pulls/143985
Expose existing mask operators as tools in the toolbar.
The primitive tools are commented out since interactively placement
isn't currently supported by the operators.
Ref !136086
The W channel in quaternion and axis-angle F-Curves is now themeable
(defaulting to yellow), instead of incorrectly blending the X and Y axis
theme colors.
The original blending math did not take into account that the hue
channel actually wraps around, and so the blended color became blue
instead of the intended yellow.
Instead of fixing the math, the theme has been expanded for this W axis.
The default color is set to the mathematically correct yellow.
Co-authored-by: Sybren A. Stüvel <sybren@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/143211
The recently introduced feature of playhead snapping (#137278)
added a popover menu for snap targets.
This used text to indicate the contents of said popover.
In order to bring it in line with the other snapping menu, this PR adds
icons to indicate the enabled state of snapping.
Part of #135794
Pull Request: https://projects.blender.org/blender/blender/pulls/139271
This PR makes it easier to delete strip keyframes from the preview.
It works similarly to the 3D viewport and also works with keying sets.
Pressing "alt + I" deletes the keyframe on the current frame of the
selected strips, when a keyset is active it only deletes the keyframes
of the selected keyset.
Pull Request: https://projects.blender.org/blender/blender/pulls/140385
This makes it so that Grease Pencil Bezier handles use the same colors and shaders as `Curves` Objects.
This also makes the handles follow `handle_display` and add the option the the edit mode overlay.
Pull Request: https://projects.blender.org/blender/blender/pulls/141524
This removes the "Geometry" part from their name because we want to use them in
other node tree types too (see #141936).
Usually, we don't change idnames because they are the primary identifier of
nodes and is expected to stay the same. Since they are generally not shown to
users (just Python developers), it's also not urgent to change them. However, in
this specific case we have the opportunity to update the idname before the node
becomes an official feature, so it's not as bad to change it.
This patch has full backward compatibility, but no forward compatibility (for
files that used the experimental feature).
Pull Request: https://projects.blender.org/blender/blender/pulls/143823
This adds "use_occlude_geometry=True" and "only_selected=False" to the
keymap entry for K, mesh.knife_tool, even though these are the default
values for this operator. This fixes the complaint. And these same
props are set for "Knife Topology Tool" on the VIEW3D_MT_edit_mesh
menu so that it displays the shortcut correctly (#139393 remains
corrected).
Pull Request: https://projects.blender.org/blender/blender/pulls/143673
Add a [Python code generator][1] that takes an OpenAPI definition and
outputs the corresponding data model as [dataclasses][2]
This is intended to be used in the Remote Asset Library project, to
create, download, parse, and validate information of a remote asset
library.
[1]: https://koxudaxi.github.io/datamodel-code-generator/
[2]: https://docs.python.org/3/library/dataclasses.html
## Running the Generator
The generator is a Python script, which creates its own Python
virtualenv, installs the dependencies it needs, and then runs the
generator within that virtualenv.
The script is intended to run via the `generate_datamodels` CMake
target. For example, `ninja generate_datamodels` in the build
directory.
## Details
The virtualenv is created in Blender's build directory, and is not
cleaned up after running. This means that subsequent runs will just
use it directly, instead of reinstalling dependencies on every run.
## Generated Code & Interaction with Build System
It is my intention that the code generation _only_ happens when the
OpenAPI specification changes. This means that the generated code will
be committed to Git like any hand-written code. Building Blender will
therefore _not_ require the code generator to run. Only people working
on the area that uses the generated code will have to deal with this.
Pull Request: https://projects.blender.org/blender/blender/pulls/139495
When adding a shape key, set its blend value to 1.0 / 100%.
There is no practical use case where user wants to add shape key but
not work on it. New shape keys at value 0 have no purpose. Adding
shape key should be interpreted by Blender as user wanting to
sculpt/model on it. Also, being at 1.0 initially doesn't change
anything visually, because key isn't edited yet and it doesn't deform
mesh.
The default value of the shape key is also set to 1.0. When using
right-click to reset values, user most often wants to return to 1
(which is "correct" state of deformation without multiplication)
rather than 0 (which is no deformation at all).
Co-authored-by: Sybren A. Stüvel <sybren@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/133399
The code was using the legacy Grease Pencil data type
in `create_object_data`. For the object type `GREASEPENCIL` we should
be using `bpy.data.grease_pencils_v3`.
Pull Request: https://projects.blender.org/blender/blender/pulls/142335
Add a new package `scripts/modules/_bpy_internal/http`, containing
classes to download files via HTTP.
The code is intentionally put into the `_bpy_internal` package, as I
don't intend it to be the end-all-be-all of downloaders for general
use in add-ons. It's been written to support the Remote Asset Library
project (#134495), where it will be used to download JSON files (to
get the list of assets on the server) as well as the asset files
themselves.
The module consists of several parts. The main ones are:
`class ConditionalDownloader`
: File downloader, which downloads a URL to a file on disk.
It supports conditional requests via `ETag`/`If-None-Match` and
`Last-Modified`/`If-Modified-Since` HTTP headers (RFC 7273, section 3.
Precondition Header Fields). A `304 Not Modified` response is
treated as a succesful download.
Metadata of the request (the response length in bytes, and the above
headers) are stored on disk, in a location that is determined by the
user of the class. Probably in the future it would be nice to have a
single sqlite database for this (there's a TODO in the code about
this).
The downloader uses the Requests library, and manages its own HTTP
session object. This way it can handle TCP/IP connection reuse,
automatically retry failing connections, and in the future
HTTP-level authentication.
`class BackgroundDownloader`
: Wrapper for a `ConditionalDownloader` that manages a background
process for the actual downloading.
It runs the downloader in a background process, while ensuring that
its reporters (see below) get called on the main process. This way
it's possible to do background downloading, while still receiving
progress reports in a modal operator, which in turn can directly
call Blender's Python API. Care was taken to [not use Python
threads][1]
`class DownloadReporter`
: Protocol class. Objects adhering to the protocol can be given to a
`ConditionalDownloader` or `BackgroundDownloader`. The protocol has
functions like `download_starts(…)`, `download_progress(…)`,
`download_error(…)`, which will be called by the downloader to
report on what it's doing.
I chose to make this a protocol, rather than an abstract superclass,
because then it's possible to make an Operator a DownloadReporter
without requiring multi-classing.
[1]: https://docs.blender.org/api/main/info_gotchas_threading.html
Pull Request: https://projects.blender.org/blender/blender/pulls/138327