3.1 KiB
Operator classes update in operators.py (2026-03-10 16:17Z)
User
Update T:\Dynamic-Link-Manager\ui\operators.py to add DLM_OT_migrator_remove_original to the OPERATOR_CLASSES list.
The class should be added right before DLM_OT_run_character_migration (since that's where it appears in the UI).
Find the OPERATOR_CLASSES list and change:
DLM_OT_relocate_single_library,
DLM_OT_run_character_migration,
To:
DLM_OT_relocate_single_library,
DLM_OT_migrator_remove_original,
DLM_OT_run_character_migration,
Use Python to make this edit.
Agent (model accounts/fireworks/models/kimi-k2p5, mode Agent)
Thought Process
The user wants me to update theui/operators.py file to add DLM_OT_migrator_remove_original to the OPERATOR_CLASSES list, specifically right before DLM_OT_run_character_migration.
Let me first read the file to find the OPERATOR_CLASSES list and then make the edit using Python.
Tool use: **run_terminal_command_v2** • Run command: cd T:\Dynamic-Link-Manager && python -c "
import re
with open('ui/operators.py', 'r') as f:
content = f.read()
Find and replace the specific pattern
old = ''' DLM_OT_relocate_single_library,
DLM_OT_run_character_migration,'''
new = ''' DLM_OT_relocate_single_library,
DLM_OT_migrator_remove_original,
DLM_OT_run_character_migration,'''
if old in content:
content = content.replace(old, new)
with open('ui/operators.py', 'w') as f:
f.write(content)
print('Successfully updated OPERATOR_CLASSES')
else:
print('Pattern not found - checking for alternative patterns')
# Show context around OPERATOR_CLASSES
match = re.search(r'OPERATOR_CLASSES.*?(?=\n\n|\Z)', content, re.DOTALL)
if match:
print('Found OPERATOR_CLASSES at:', match.start())
print('Content:', match.group()[:500])
"
cd T:\Dynamic-Link-Manager && python -c "
import re
with open('ui/operators.py', 'r') as f:
content = f.read()
# Find and replace the specific pattern
old = ''' DLM_OT_relocate_single_library,
DLM_OT_run_character_migration,'''
new = ''' DLM_OT_relocate_single_library,
DLM_OT_migrator_remove_original,
DLM_OT_run_character_migration,'''
if old in content:
content = content.replace(old, new)
with open('ui/operators.py', 'w') as f:
f.write(content)
print('Successfully updated OPERATOR_CLASSES')
else:
print('Pattern not found - checking for alternative patterns')
# Show context around OPERATOR_CLASSES
match = re.search(r'OPERATOR_CLASSES.*?(?=\n\n|\Z)', content, re.DOTALL)
if match:
print('Found OPERATOR_CLASSES at:', match.start())
print('Content:', match.group()[:500])
"
Successfully updated OPERATOR_CLASSES