Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--release/scripts/startup/bl_ui/space_outliner.py21
-rw-r--r--source/blender/editors/space_outliner/outliner_tools.c15
2 files changed, 21 insertions, 15 deletions
diff --git a/release/scripts/startup/bl_ui/space_outliner.py b/release/scripts/startup/bl_ui/space_outliner.py
index ba91b6e8d50..0a4f419362d 100644
--- a/release/scripts/startup/bl_ui/space_outliner.py
+++ b/release/scripts/startup/bl_ui/space_outliner.py
@@ -105,6 +105,10 @@ class OUTLINER_MT_context_menu(Menu):
@staticmethod
def draw_common_operators(layout):
+ layout.menu_contents("OUTLINER_MT_asset")
+
+ layout.separator()
+
layout.menu("OUTLINER_MT_context_menu_view")
layout.separator()
@@ -306,6 +310,22 @@ class OUTLINER_MT_object(Menu):
OUTLINER_MT_context_menu.draw_common_operators(layout)
+class OUTLINER_MT_asset(Menu):
+ bl_label = "Assets"
+
+ @classmethod
+ def poll(cls, context):
+ return context.preferences.experimental.use_asset_browser
+
+ def draw(self, context):
+ layout = self.layout
+
+ space = context.space_data
+
+ layout.operator("asset.mark")
+ layout.operator("asset.clear")
+
+
class OUTLINER_PT_filter(Panel):
bl_space_type = 'OUTLINER'
bl_region_type = 'HEADER'
@@ -451,6 +471,7 @@ classes = (
OUTLINER_MT_collection_visibility,
OUTLINER_MT_collection_view_layer,
OUTLINER_MT_object,
+ OUTLINER_MT_asset,
OUTLINER_MT_context_menu,
OUTLINER_MT_context_menu_view,
OUTLINER_PT_filter,
diff --git a/source/blender/editors/space_outliner/outliner_tools.c b/source/blender/editors/space_outliner/outliner_tools.c
index 8a3ba9a24c2..3edb12c5503 100644
--- a/source/blender/editors/space_outliner/outliner_tools.c
+++ b/source/blender/editors/space_outliner/outliner_tools.c
@@ -1747,8 +1747,6 @@ typedef enum eOutlinerIdOpTypes {
OUTLINER_IDOP_INVALID = 0,
OUTLINER_IDOP_UNLINK,
- OUTLINER_IDOP_MARK_ASSET,
- OUTLINER_IDOP_CLEAR_ASSET,
OUTLINER_IDOP_LOCAL,
OUTLINER_IDOP_OVERRIDE_LIBRARY_CREATE,
OUTLINER_IDOP_OVERRIDE_LIBRARY_CREATE_HIERARCHY,
@@ -1775,8 +1773,6 @@ typedef enum eOutlinerIdOpTypes {
/* TODO: implement support for changing the ID-block used. */
static const EnumPropertyItem prop_id_op_types[] = {
{OUTLINER_IDOP_UNLINK, "UNLINK", 0, "Unlink", ""},
- {OUTLINER_IDOP_MARK_ASSET, "MARK_ASSET", 0, "Mark Asset", ""},
- {OUTLINER_IDOP_CLEAR_ASSET, "CLEAR_ASSET", 0, "Clear Asset", ""},
{OUTLINER_IDOP_LOCAL, "LOCAL", 0, "Make Local", ""},
{OUTLINER_IDOP_SINGLE, "SINGLE", 0, "Make Single User", ""},
{OUTLINER_IDOP_DELETE, "DELETE", ICON_X, "Delete", ""},
@@ -1859,9 +1855,6 @@ static bool outliner_id_operation_item_poll(bContext *C,
}
switch (enum_value) {
- case OUTLINER_IDOP_MARK_ASSET:
- case OUTLINER_IDOP_CLEAR_ASSET:
- return U.experimental.use_asset_browser;
case OUTLINER_IDOP_OVERRIDE_LIBRARY_CREATE:
if (ID_IS_OVERRIDABLE_LIBRARY(tselem->id)) {
return true;
@@ -2016,14 +2009,6 @@ static int outliner_id_operation_exec(bContext *C, wmOperator *op)
}
break;
}
- case OUTLINER_IDOP_MARK_ASSET: {
- WM_operator_name_call(C, "ASSET_OT_mark", WM_OP_EXEC_DEFAULT, NULL);
- break;
- }
- case OUTLINER_IDOP_CLEAR_ASSET: {
- WM_operator_name_call(C, "ASSET_OT_clear", WM_OP_EXEC_DEFAULT, NULL);
- break;
- }
case OUTLINER_IDOP_LOCAL: {
/* make local */
outliner_do_libdata_operation(