AnimCupboard: ID Management Pie #127

Merged
Demeter Dzadik merged 11 commits from Mets/blender-studio-pipeline:AnimCupboard-relationship-viewer into main 2023-07-19 14:43:14 +02:00
Showing only changes of commit 1a245cc7c2 - Show all commits

View File

@ -289,26 +289,11 @@ class OUTLINER_OT_remap_users(bpy.types.Operator):
) )
def execute(self, context): def execute(self, context):
for area in context.screen.areas:
if area.type == 'VIEW_3D':
break
else:
self.report(
{'ERROR'}, "Error: This operation requires an Outliner to be present."
)
return {'CANCELLED'}
source_id = get_id(self.id_name_source, self.id_type, self.library_path_source) source_id = get_id(self.id_name_source, self.id_type, self.library_path_source)
target_id = get_id(self.id_name_target, self.id_type, self.library_path) target_id = get_id(self.id_name_target, self.id_type, self.library_path)
if not target_id: assert source_id and target_id, "Error: Failed to find source or target."
self.report(
{'ERROR'},
f'Failed to find ID: {self.id_name_target}, {self.id_type}, lib: {self.library_path}',
)
return {'CANCELLED'}
source_id.user_remap(target_id) source_id.user_remap(target_id)
return {'FINISHED'} return {'FINISHED'}