2023-08-16 00:20:26 +10:00
|
|
|
# SPDX-FileCopyrightText: 2009-2023 Blender Authors
|
2023-06-15 13:09:04 +10:00
|
|
|
#
|
2022-02-11 09:07:11 +11:00
|
|
|
# SPDX-License-Identifier: GPL-2.0-or-later
|
2023-06-15 13:09:04 +10:00
|
|
|
|
2021-02-21 21:21:18 +11:00
|
|
|
from __future__ import annotations
|
2011-03-21 12:40:06 +00:00
|
|
|
|
2016-03-04 06:14:02 +11:00
|
|
|
# support reloading sub-modules
|
2011-03-21 12:40:06 +00:00
|
|
|
if "bpy" in locals():
|
2015-01-23 12:37:58 +11:00
|
|
|
from importlib import reload
|
2017-03-29 12:35:00 +11:00
|
|
|
_modules_loaded[:] = [reload(val) for val in _modules_loaded]
|
2015-01-23 12:37:58 +11:00
|
|
|
del reload
|
2016-03-03 06:31:11 +11:00
|
|
|
|
2012-12-20 07:57:26 +00:00
|
|
|
_modules = [
|
2011-03-21 12:40:06 +00:00
|
|
|
"add_mesh_torus",
|
2011-09-22 19:50:41 +00:00
|
|
|
"anim",
|
Asset System: New Asset Browser editor
This introduces the User Interface part of the Asset Browser, based on the
design in T54642.
Additions:
* New Asset Browser (internally a sub-editor of the File Browser).
* Navigation region showing asset categories.
* Main region showing the assets of the selected asset library with previews.
The assets may be stored over multiple .blends in the directory that's
"mounted" as asset library in the Preferences. They will all be shown in this
list.
* Header with an asset library dropdown, allowing to choose the active asset
library to show. Options are the "Current File" as asset library and all
custom libraries.
* Display popover, filter popover and search box (partially dummies, see
T82680).
* Sidebar showing the metadata of the currently active file (name, preview,
description and tags), which can be edited for assets in the "Current File"
asset library. (For others it will reset on reload.)
* The sidebar includes a button to load a custom preview image from a file.
* Make asset files draggable (with preview image).
* If a library with invalid path is selected, a message is drawn in the main
region to help the user understand what's wrong.
* Operators to add and remove asset tags. Exposed in the sidebar.
* "Only Assets" option for Link/Append.
* Internal utilities for asset UI scripts.
For screenshots or demo videos, please see D9725. Or the 2.92 release notes.
Note that there are many things to be tweaked and polished in the Asset Browser
UI still. For example, the filter and display popovers are mostly dummies. See
T82680.
Part of the first Asset Browser milestone. Check the #asset_browser_milestone_1
project milestone on developer.blender.org.
Differential Revision: https://developer.blender.org/D9725
Reviewed by: Brecht Van Lommel, Hans Goudey
2020-12-14 14:07:42 +01:00
|
|
|
"assets",
|
2024-07-08 12:35:54 +02:00
|
|
|
"bone_selection_sets",
|
2011-11-07 12:55:18 +00:00
|
|
|
"clip",
|
Nodes: port "Connect to Output" operator from Node Wrangler
As Node Wrangler add-on is moving to extensions platform and maybe isn't shipped
with Blender from 4.2 onwards, some of it's more important functionalities which are
crucial for Blender UX can be ported inside core. Also see #121749.
This PR ports "Preview Node" operator from add-on inside `scripts/startup/bl_operators`.
When Shift-Ctrl (or Shift-Alt) clicked on the node operator connects output socket of the
node to active Output node in the tree (group, material, light, or world output). For Geometry
Nodes this is just handy operator, but in Shader Nodes, because Viewer Node isn't
implemented, this has always been the only way to quickly preview nodes by connecting
it to Material Output.
Changes made from Node Wrangler version:
- Renamed operator from "Preview Node" to "**Connect to Output**", because node previews
already mean a different thing in context of compositor and shader editor, and viewer node
is used for previewing in geometry nodes. Connect to Output is correct name because in every
context it's called that's what it does.
- Assigned shortcut Shift-Alt-Click in shader editor as well. Even though Shift-Ctrl click already
works, it's good to have consistency with geometry nodes, so that users can use same shortcut
in both contexts.
Operator doesn't work in compositor. It's not clear if that's wanted (to connect to Composite node),
and if it is it'll be added in separate PR.
Original authors of the add-on: Bartek Skorupa, Greg Zaal, Sebastian Koenig, Christian Brinkmann, Florian Meyer
Pull Request: https://projects.blender.org/blender/blender/pulls/122016
2024-05-28 16:42:55 +02:00
|
|
|
"connect_to_output",
|
2011-09-22 19:50:41 +00:00
|
|
|
"console",
|
2018-07-15 20:39:02 +03:00
|
|
|
"constraint",
|
2015-08-10 17:26:37 +02:00
|
|
|
"file",
|
2020-12-02 13:25:25 +01:00
|
|
|
"geometry_nodes",
|
2025-02-13 12:24:06 +01:00
|
|
|
"grease_pencil",
|
2011-03-21 12:40:06 +00:00
|
|
|
"image",
|
2024-05-27 12:41:25 +10:00
|
|
|
"image_as_planes",
|
2011-03-21 12:40:06 +00:00
|
|
|
"mesh",
|
2012-08-08 16:44:16 +00:00
|
|
|
"node",
|
2011-03-21 12:40:06 +00:00
|
|
|
"object",
|
2019-02-11 23:17:05 +11:00
|
|
|
"object_align",
|
2011-03-30 10:29:32 +00:00
|
|
|
"object_quick_effects",
|
2019-02-11 23:17:05 +11:00
|
|
|
"object_randomize_transform",
|
2011-03-21 12:40:06 +00:00
|
|
|
"presets",
|
2013-01-23 05:56:44 +00:00
|
|
|
"rigidbody",
|
2011-03-21 12:40:06 +00:00
|
|
|
"screen_play_rendered_anim",
|
|
|
|
"sequencer",
|
Spreadsheet: new spreadsheet editor
This implements the MVP for the new spreadsheet editor (T85879). The functionality
is still very limited, but it proved to be useful already. A more complete picture
of where we want to go with the new editor can be found in T86279.
Supported features:
* Show point attributes of evaluated meshes (no original data, no other domains,
no other geometry types, yet). Since only meshes are supported right now, the
output of the Point Distribute is not shown, because it is a point cloud.
* Only show data for selected vertices when the mesh is in edit mode.
Different parts of Blender keep track of selection state and original-indices with
varying degrees of success. Therefore, when the selected-only filter is used, the
result might be a bit confusing when using some modifiers or nodes. This will
be improved in the future.
* All data is readonly. Since only evaluated data is displayed currently, it has to
be readonly. However, this is not an inherent limitation of the spreadsheet editor.
In the future editable data will be displayed as well.
Some boilerplate code for the new editor has been committed before in
rB9cb5f0a2282a7a84f7f8636b43a32bdc04b51cd5.
It would be good to let the spreadsheet editor mature for a couple of weeks as part
of the geometry nodes project. Then other modules are invited to show their own data
in the new editor!
Differential Revision: https://developer.blender.org/D10566
2021-03-10 11:34:36 +01:00
|
|
|
"spreadsheet",
|
2019-02-11 23:17:05 +11:00
|
|
|
"userpref",
|
2011-03-21 12:40:06 +00:00
|
|
|
"uvcalc_follow_active",
|
|
|
|
"uvcalc_lightmap",
|
2022-09-07 13:22:45 +12:00
|
|
|
"uvcalc_transform",
|
2011-03-21 12:40:06 +00:00
|
|
|
"vertexpaint_dirt",
|
2011-09-22 19:50:41 +00:00
|
|
|
"view3d",
|
2024-05-10 12:42:17 +02:00
|
|
|
"world",
|
2011-03-21 12:40:06 +00:00
|
|
|
"wm",
|
2018-06-26 19:41:37 +02:00
|
|
|
]
|
2012-12-20 07:57:26 +00:00
|
|
|
|
|
|
|
import bpy
|
|
|
|
|
2013-01-05 22:24:05 +00:00
|
|
|
if bpy.app.build_options.freestyle:
|
2012-12-20 07:57:26 +00:00
|
|
|
_modules.append("freestyle")
|
2016-03-03 06:31:11 +11:00
|
|
|
|
2011-03-21 12:40:06 +00:00
|
|
|
__import__(name=__name__, fromlist=_modules)
|
|
|
|
_namespace = globals()
|
2016-03-03 06:31:11 +11:00
|
|
|
_modules_loaded = [_namespace[name] for name in _modules]
|
2011-03-21 12:40:06 +00:00
|
|
|
del _namespace
|
|
|
|
|
|
|
|
|
|
|
|
def register():
|
2017-03-18 20:03:24 +11:00
|
|
|
from bpy.utils import register_class
|
2024-07-08 12:35:54 +02:00
|
|
|
from . import bone_selection_sets
|
|
|
|
|
2017-03-18 20:03:24 +11:00
|
|
|
for mod in _modules_loaded:
|
|
|
|
for cls in mod.classes:
|
|
|
|
register_class(cls)
|
2011-03-21 12:40:06 +00:00
|
|
|
|
2024-07-08 12:35:54 +02:00
|
|
|
bone_selection_sets.register()
|
|
|
|
|
2011-03-21 12:40:06 +00:00
|
|
|
|
|
|
|
def unregister():
|
2017-03-18 20:03:24 +11:00
|
|
|
from bpy.utils import unregister_class
|
2024-07-08 12:35:54 +02:00
|
|
|
from . import bone_selection_sets
|
|
|
|
|
|
|
|
bone_selection_sets.unregister()
|
|
|
|
|
2017-03-18 20:03:24 +11:00
|
|
|
for mod in reversed(_modules_loaded):
|
|
|
|
for cls in reversed(mod.classes):
|
2017-03-29 12:35:00 +11:00
|
|
|
if cls.is_registered:
|
|
|
|
unregister_class(cls)
|