AnimCupboard: ID Management Pie #127
@ -6,6 +6,7 @@ from bpy_extras import id_map_utils
|
||||
|
||||
import os
|
||||
from ..utils import hotkeys
|
||||
from .relink_overridden_asset import OUTLINER_OT_relink_overridden_asset
|
||||
|
||||
|
||||
class RelationshipOperatorMixin:
|
||||
@ -61,6 +62,11 @@ class RelationshipOperatorMixin:
|
||||
|
||||
layout.separator()
|
||||
|
||||
datablocks = self.get_datablocks_to_display(datablock)
|
||||
if not datablocks:
|
||||
layout.label(text="There are none.")
|
||||
return
|
||||
|
||||
for user in self.get_datablocks_to_display(datablock):
|
||||
if user == datablock:
|
||||
# Scenes are users of themself for technical reasons,
|
||||
@ -226,18 +232,23 @@ class IDMAN_MT_relationship_pie(bpy.types.Menu):
|
||||
# >
|
||||
pie.operator(
|
||||
OUTLINER_OT_list_dependencies_of_datablock.bl_idname, icon='LOOP_FORWARDS')
|
||||
# ^
|
||||
pie.operator('outliner.better_purge', icon='TRASH')
|
||||
# V
|
||||
pie.operator('outliner.better_purge', icon='TRASH')
|
||||
# ^
|
||||
|
||||
pie.operator('outliner.id_operation', icon='FILE_REFRESH',
|
||||
text="Remap Users").type = 'REMAP'
|
||||
|
||||
# <V
|
||||
pie.operator('object.relink_overridden_asset',
|
||||
icon='LIBRARY_DATA_OVERRIDE')
|
||||
# ^>
|
||||
id = OUTLINER_OT_relink_overridden_asset.get_id(context)
|
||||
if id:
|
||||
pie.operator('object.relink_overridden_asset',
|
||||
icon='LIBRARY_DATA_OVERRIDE')
|
||||
|
||||
pie.operator('outliner.liboverride_troubleshoot_operation', icon='UV_SYNC_SELECT',
|
||||
text="Resync Override Hierarchy").type = 'OVERRIDE_LIBRARY_RESYNC_HIERARCHY_ENFORCE'
|
||||
# <^
|
||||
if id and id.override_library:
|
||||
pie.operator('outliner.liboverride_troubleshoot_operation', icon='UV_SYNC_SELECT',
|
||||
text="Resync Override Hierarchy").type = 'OVERRIDE_LIBRARY_RESYNC_HIERARCHY_ENFORCE'
|
||||
|
||||
|
||||
registry = [
|
||||
|
Loading…
Reference in New Issue
Block a user