AnimCupboard: ID Management Pie #127
@ -289,26 +289,11 @@ class OUTLINER_OT_remap_users(bpy.types.Operator):
|
||||
)
|
||||
|
||||
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)
|
||||
|
||||
target_id = get_id(self.id_name_target, self.id_type, self.library_path)
|
||||
if not target_id:
|
||||
self.report(
|
||||
{'ERROR'},
|
||||
f'Failed to find ID: {self.id_name_target}, {self.id_type}, lib: {self.library_path}',
|
||||
)
|
||||
return {'CANCELLED'}
|
||||
assert source_id and target_id, "Error: Failed to find source or target."
|
||||
|
||||
source_id.user_remap(target_id)
|
||||
|
||||
return {'FINISHED'}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user
This loop is looking for a
VIEW_3D
but the report says it is checking if an outliner is present. Assuming the outliner is what you are looking for wouldn't it be more explicit to do...