2011-03-21 12:40:06 +00:00
|
|
|
# ##### BEGIN GPL LICENSE BLOCK #####
|
|
|
|
|
#
|
|
|
|
|
# This program is free software; you can redistribute it and/or
|
|
|
|
|
# modify it under the terms of the GNU General Public License
|
|
|
|
|
# as published by the Free Software Foundation; either version 2
|
|
|
|
|
# of the License, or (at your option) any later version.
|
|
|
|
|
#
|
|
|
|
|
# This program is distributed in the hope that it will be useful,
|
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
# GNU General Public License for more details.
|
2014-09-17 18:36:17 +10:00
|
|
|
#
|
2011-03-21 12:40:06 +00:00
|
|
|
# You should have received a copy of the GNU General Public License
|
|
|
|
|
# along with this program; if not, write to the Free Software Foundation,
|
|
|
|
|
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
|
|
|
#
|
|
|
|
|
# ##### END GPL LICENSE BLOCK #####
|
|
|
|
|
|
|
|
|
|
# <pep8 compliant>
|
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",
|
2011-11-07 12:55:18 +00:00
|
|
|
"clip",
|
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",
|
2011-03-21 12:40:06 +00:00
|
|
|
"image",
|
|
|
|
|
"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",
|
|
|
|
|
"vertexpaint_dirt",
|
2011-09-22 19:50:41 +00:00
|
|
|
"view3d",
|
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
|
|
|
|
|
for mod in _modules_loaded:
|
|
|
|
|
for cls in mod.classes:
|
|
|
|
|
register_class(cls)
|
2011-03-21 12:40:06 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
def unregister():
|
2017-03-18 20:03:24 +11:00
|
|
|
from bpy.utils import unregister_class
|
|
|
|
|
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)
|