25 Commits

Author SHA1 Message Date
Nika Kutsniashvili
b4a8e8c5f8 Anim: Move "Copy Global Transform" extension to internal scripts
Move the Copy Global Transform core add-on into Blender's code.

- The entire extension was one Python file. This PR basically splits
  it into two, one for operators (in `bl_operators`) and the other for
  UI panels. Those panels are registered in the 3D viewport's sidebar,
  which were registered in `space_view3d`, but I made the decision
  here to create a new file `space_view3d_sidebar`, because the main
  file is getting too large and difficult to navigate. This PR puts
  the global transform panel in this file. After this is merged, I
  will do refactors to move the rest of the sidebar panels here as
  well.

- `AutoKeying` class was moved into `bpy_extras/anim_utils.py` so that
  it's reusable and also accessible from API, since it's generally
  very useful. There were discussions about putting this somewhere,
  but for now, I chose against it because creating a new file would
  also mean PR would have to affect documentation generation, and
  would complicate things. If we want to, we can probably create a new
  module in the future.

- Little tweaks to labels and descriptions. Now that they exist
  outside of the add-on context, and exist without the user explicitly
  enabling them, they need to be more descriptive and tell users what
  they actually do. They also need to conform to Blender's GUI
  guidelines. Also tried organizing files a little by grouping
  objects.

- Add-on properties (which included word `addon` in the name) have
  been registered in C++, on `scene.tool_settings` with `anim_`
  prefix.

Pull Request: https://projects.blender.org/blender/blender/pulls/145414
2025-10-03 17:42:04 +02:00
Richard Antalik
f385327442 VSE: Move Strip properties to Properties editor
Goal of this PR is mainly to improve flexibility and of VSE layout and
screen space efficiency.

Previously, strip properties were displayed in timeline sidebar. This
was limiting, because if you want to display as much properties as
possible, the timeline area had to be taller, but this was at the
expense of space available for preview. However there is plenty of
space in properties editor, which is mostly unused in VSE. Therefore
strip properties were moved to the properties editor.

ID pinning and path displayed in top section aren't drawn, since strip
is not an ID and can not be pinned. Since there is more space for
properties, various panels are changed to be open by default.
Mainly transform and time panels, since they are used often.

There is one minor change: The waveform display property
of sound strip was previously hidden, if timeline area had per strip
waveform display overlay set. This is no longer possible to do and the
property is always visible.

Pull Request: https://projects.blender.org/blender/blender/pulls/140395
2025-10-03 17:33:17 +02:00
Campbell Barton
a7bc3e3418 Cleanup: quiet Python linter warnings 2024-12-11 11:26:24 +11:00
Lukas Tönne
5c57e24fea Cleanup: GPv3: Remove unused BKE functions from GPv2
Removes unused GPv2 functions in blenkernel.

Notes:
-  Functions for layer masks are still in use, but annotations never
  have layer masks in the first place. Would be good to remove the data
  structures so we can remove the functions too.
- Some multi-frame edit functions are also still nominally used, but
multi-frame editing is not an active feature for annotations. This
  should also be removed.

Pull Request: https://projects.blender.org/blender/blender/pulls/128709
2024-10-09 10:27:45 +02:00
Sybren A. Stüvel
bbccf912b4 Anim: remove the 'Animation Debug' panel
Remove the 'Animation Debug' panel from the 3D Viewport. It was always
meant as a temporary debugging tool, and it's no longer needed.

Pull Request: https://projects.blender.org/blender/blender/pulls/127200
2024-09-06 10:59:04 +02:00
Sybren A. Stüvel
a8ee0b9a05 Anim: add Action Slot selector to Action editor
Add an Action Slot selector to the Action editor's header, next to the
Action selector. The selector shows all slots in the action that are
suitable for animating objects (as the Action editor itself is limited
to showing the Action of the active object).

This also considerably simplifies the 'Animation Debug' panel, as some
debugging code has been removed, as well as the display of any animation
layers. The latter can be reintroduced (if necessary) when multi-layer
animation support is added. Most importantly, it removes the
WindowManager property that was used as a hack to assign layered Actions
to objects.

API change: the RNA property `AnimData.slot` is now a pointer property
that reflects the actual slot (it used to be an enum property).

Some small changes to the UI code were necessary to make the selector
show the slot's display name (and not their internal name).

Pull Request: https://projects.blender.org/blender/blender/pulls/125416
2024-07-25 17:20:27 +02:00
Campbell Barton
a700fdc163 Fix class methods being excluded from the Python API docs
All class methods were excluded which makes sense for methods such
as poll, draw ... etc. however this would also exclude utility methods
that aren't associated with RNA classes.

The following methods for `bpy.types` classes are now included:

- Macro.define
- UI_UL_list.sort_items_by_name
- {Header/Menu/Panel/UIList}.{append/prepend/remove/is_extended}
2024-06-01 16:17:01 +10:00
Campbell Barton
d3d14a706b Fix #120727: Filtering is case sensitive for Python UI-lists
Correct regression in b177f27e6f.
2024-04-17 14:47:13 +10:00
Sybren A. Stüvel
a5d0ae9644 Anim: Add a simple GUI for assigning Animation data-blocks
Add a 'Baklava' panel to the 3D Viewport side-panel. It's a
developer-GUI, not meant for animators (or for inclusion beyond the
experimental feature, for that matter).

Note that this GUI shows all layer properties, even though the data
model is currently limited to a single layer. This means that things
like 'influence' and 'mix mode' are irrelevant, as there is no
underlying layer to mix with.

Also key insertion and animation evaluation are not implemented yet (but
will be in upcoming commits).

For more info, see #113594.

Pull Request: https://projects.blender.org/blender/blender/pulls/118677
2024-04-08 12:53:32 +02:00
Campbell Barton
a8e73616b9 Cleanup: rename add-on related variables for clarity
- Rename info to bl_info, to avoid confusion with extensions manifest,
  which should eventually be accessible in a similar way.
- Rename module_name to addon_module_name to avoid confusion with
  extension repositories name-spaced modules.
- Clarify naming for TOML manifest.
2024-02-01 17:03:40 +11:00
Christoph Lendenfeld
87fc8e8ddd Anim: Add hotkey for keying set operators
This is in response to feedback to the changes from #113504
While it does simplify inserting keyframes,
sometimes artists want to insert keys only to e.g. Location.
This takes longer to do now, since the option is in a menu.

This PR changes the following:

* new `K` hotkey to bring up the "Keying Set" menu.
This will always show the menu, even if a keying set is active.

* `Shift + K` will open a menu to set the active keying set

* with "Pie Menu on Drag" enabled in the user preferences,
hitting `I` and moving the mouse will bring up a pie menu
to insert only specific transform channels

Conceptually this separates the keying set behavior from the
insert keyframe behavior.
`I` will always add keyframes.
While `K` always shows keying set options.

Pull Request: https://projects.blender.org/blender/blender/pulls/115798
2024-01-25 14:46:04 +01:00
Campbell Barton
b4e869e2fc Cleanup: quiet warnings when reloading scripts
Some UI classes weren't unregistered which caused a warning when
reloading scripts (since [0]). Register/Unregister these classes along
with the classes of other sub-modules.

[0]: c5e2ec8a1a
2024-01-23 14:17:02 +11:00
Damien Picard
8564e03cdf Fix FPS menu in "Format" panel not following translation setting
The FPS menu was using a cached value which wasn't being refreshed
when translation changed.

Add `bpy.app.handlers.translation_update_post` handler which runs
when translation changes, this can be used to clear any cached UI
values.

Ref !117049
2024-01-18 11:31:38 +11:00
Campbell Barton
b177f27e6f Cleanup: compile the match for reuse in UI_UL_list.filter_items_by_name 2023-11-04 16:53:49 +11:00
Pablo Vazquez
5fac8f822b Texture Nodes: Refactor Add menu
Refactor the Add menu in Texture Nodes, with manually created menus,
inspired by Geometry Nodes and more recently Shader and Compositor.

Minor sorting adjustments by splitting categories in groups, with
separators in between groups, and sorted alphabetically.

Unlike other node editors, this menu will not feature assets for the time
being. Doing so would add (more) burden of maintenance to a system
that is deemed end-of-life, and likely to be rewritten before long.

Part of #111746

Pull Request: https://projects.blender.org/blender/blender/pulls/111838
2023-09-05 21:52:31 +02:00
Pablo Vazquez
f8dd297531 Cleanup: rename shading to shader in add menu file
Also use lowercase for menu bl_idname, since there won't be any
conflict it's not needed.
2023-09-01 23:36:34 +02:00
Pablo Vazquez
9db4c0ca4b Shading Nodes: Refactor Add menu
Refactor the Add menu in Shading nodes, with manually created menus,
inspired by Geometry Nodes and more recently the Compositor.

Minor sorting adjustments by splitting categories in groups, with
separators in between groups, and sorted alphabetically. Shading
node group assets are also populated in the menus.

This is the first part of the re-organization of the Add menu,
part of #111746

Pull Request: https://projects.blender.org/blender/blender/pulls/111798
2023-09-01 20:46:12 +02:00
Pablo Vazquez
577c0b4b46 Compositor: Refactor Add menu
Refactor the Add menu in the Compositor, with manually created menus,
inspired by Geometry Nodes.

Minor sorting adjustments by splitting categories in groups, with
separators in between groups, and sorted alphabetically. Compositor
node group assets are also populated in the menus.

This is the first part of the re-organization of the Add menu project,
proposal coming in another patch after this.

Pull Request: https://projects.blender.org/blender/blender/pulls/111282
2023-08-24 13:46:11 +02:00
Campbell Barton
e955c94ed3 License Headers: Set copyright to "Blender Authors", add AUTHORS
Listing the "Blender Foundation" as copyright holder implied the Blender
Foundation holds copyright to files which may include work from many
developers.

While keeping copyright on headers makes sense for isolated libraries,
Blender's own code may be refactored or moved between files in a way
that makes the per file copyright holders less meaningful.

Copyright references to the "Blender Foundation" have been replaced with
"Blender Authors", with the exception of `./extern/` since these this
contains libraries which are more isolated, any changed to license
headers there can be handled on a case-by-case basis.

Some directories in `./intern/` have also been excluded:

- `./intern/cycles/` it's own `AUTHORS` file is planned.
- `./intern/opensubdiv/`.

An "AUTHORS" file has been added, using the chromium projects authors
file as a template.

Design task: #110784

Ref !110783.
2023-08-16 00:20:26 +10:00
Hans Goudey
ffe4fbe832 Cleanup: Move editors headers to C++
See #103343

Pull Request: https://projects.blender.org/blender/blender/pulls/110820
2023-08-05 02:57:52 +02:00
Julian Eisel
98142f5e35 UI: Asset Shelf Support (Experimental Feature)
No user visible changes expected, except of new experimental feature
option.

------------------------------------------------------------------------------

This introduces asset shelves as a new standard UI element for accessing
assets. Based on the current context (like the active mode and/or tool), they
can provide assets for specific workflows/tasks. As such they are more limited
in functionality than the asset browser, but a lot more efficient for certain
tasks.

The asset shelf is developed as part of the brush assets project (see #101895),
but is also meant to replace the current pose library UI.

Support for asset shelves can quite easily be added to different editor types,
the following commit will add support for the 3D View. If an editor type
supports asset shelves, add-ons can chose to register an asset shelf type for
an editor with just a few lines of Python.

It should be possible to entirely remove `UILayout.asset_view_template()` once
asset shelves are non-experimental.

Some changes are to be expected still, see #107881.

Task: #102879
Brush asset workflow blog post: https://code.blender.org/2022/12/brush-assets-workflow/
Initial technical documentation: https://developer.blender.org/docs/asset_system/user_interface/asset_shelf/

Pull Request: #104831
2023-08-03 16:54:39 +02:00
Falk David
b3f3b41d09 GPv3: Initial Layer Tree UI
Adds a new UI template to view the current layer tree of the active Grease Pencil object.

This UI tree view implements the following features (for now):
 - Displaying all the layers with their names and highlighting the active layer.
 - Changing the active layer by clicking on an item.
 - Adding new layers (using a new operator).
 - Removing the active layer (using a new operator).
 - Renaming a layer.

Pull Request: https://projects.blender.org/blender/blender/pulls/109197
2023-06-22 10:51:43 +02:00
Campbell Barton
65f99397ec License headers: use SPDX-FileCopyrightText in all sources 2023-06-15 13:35:34 +10:00
Jacques Lucke
0de54b84c6 Geometry Nodes: add simulation support
This adds support for building simulations with geometry nodes. A new
`Simulation Input` and `Simulation Output` node allow maintaining a
simulation state across multiple frames. Together these two nodes form
a `simulation zone` which contains all the nodes that update the simulation
state from one frame to the next.

A new simulation zone can be added via the menu
(`Simulation > Simulation Zone`) or with the node add search.

The simulation state contains a geometry by default. However, it is possible
to add multiple geometry sockets as well as other socket types. Currently,
field inputs are evaluated and stored for the preceding geometry socket in
the order that the sockets are shown. Simulation state items can be added
by linking one of the empty sockets to something else. In the sidebar, there
is a new panel that allows adding, removing and reordering these sockets.

The simulation nodes behave as follows:
* On the first frame, the inputs of the `Simulation Input` node are evaluated
  to initialize the simulation state. In later frames these sockets are not
  evaluated anymore. The `Delta Time` at the first frame is zero, but the
  simulation zone is still evaluated.
* On every next frame, the `Simulation Input` node outputs the simulation
  state of the previous frame. Nodes in the simulation zone can edit that
  data in arbitrary ways, also taking into account the `Delta Time`. The new
  simulation state has to be passed to the `Simulation Output` node where it
  is cached and forwarded.
* On a frame that is already cached or baked, the nodes in the simulation
  zone are not evaluated, because the `Simulation Output` node can return
  the previously cached data directly.

It is not allowed to connect sockets from inside the simulation zone to the
outside without going through the `Simulation Output` node. This is a necessary
restriction to make caching and sub-frame interpolation work. Links can go into
the simulation zone without problems though.

Anonymous attributes are not propagated by the simulation nodes unless they
are explicitly stored in the simulation state. This is unfortunate, but
currently there is no practical and reliable alternative. The core problem
is detecting which anonymous attributes will be required for the simulation
and afterwards. While we can detect this for the current evaluation, we can't
look into the future in time to see what data will be necessary. We intend to
make it easier to explicitly pass data through a simulation in the future,
even if the simulation is in a nested node group.

There is a new `Simulation Nodes` panel in the physics tab in the properties
editor. It allows baking all simulation zones on the selected objects. The
baking options are intentially kept at a minimum for this MVP. More features
for simulation baking as well as baking in general can be expected to be added
separately.

All baked data is stored on disk in a folder next to the .blend file. #106937
describes how baking is implemented in more detail. Volumes can not be baked
yet and materials are lost during baking for now. Packing the baked data into
the .blend file is not yet supported.

The timeline indicates which frames are currently cached, baked or cached but
invalidated by user-changes.

Simulation input and output nodes are internally linked together by their
`bNode.identifier` which stays the same even if the node name changes. They
are generally added and removed together. However, there are still cases where
"dangling" simulation nodes can be created currently. Those generally don't
cause harm, but would be nice to avoid this in more cases in the future.

Co-authored-by: Hans Goudey <h.goudey@me.com>
Co-authored-by: Lukas Tönne <lukas@blender.org>

Pull Request: https://projects.blender.org/blender/blender/pulls/104924
2023-05-03 13:18:59 +02:00
Sergey Sharybin
03806d0b67 Re-design of submodules used in blender.git
This commit implements described in the #104573.

The goal is to fix the confusion of the submodule hashes change, which are not
ideal for any of the supported git-module configuration (they are either always
visible causing confusion, or silently staged and committed, also causing
confusion).

This commit replaces submodules with a checkout of addons and addons_contrib,
covered by the .gitignore, and locale and developer tools are moved to the
main repository.

This also changes the paths:
- /release/scripts are moved to the /scripts
- /source/tools are moved to the /tools
- /release/datafiles/locale is moved to /locale

This is done to avoid conflicts when using bisect, and also allow buildbot to
automatically "recover" wgen building older or newer branches/patches.

Running `make update` will initialize the local checkout to the changed
repository configuration.

Another aspect of the change is that the make update will support Github style
of remote organization (origin remote pointing to thy fork, upstream remote
pointing to the upstream blender/blender.git).

Pull Request #104755
2023-02-21 16:39:58 +01:00