I’m trying to bring the Move Render Layers addon back to life. And since the view layers don’t have a template_list like render layers used to, I’m trying to add that too.
I did a first draft in ViewLayerManager.py, but I meet an issue: I need to access the view layer’s active_index, but they don’t seem to exist in modern Blender:
This is used in
def moveViewLayer to change the view layers, as well as in the template_list definition.
Or at least, this is what the original addon used to work with to manage the render layers order in the list.
All I get when running my script are errors like:
Traceback (most recent call last): File "C:\AppInstall\Blender\stable\blender-3.3.1-windows-x64\3.3\scripts\modules\bpy_types.py", line 904, in draw_ls func(self, context) File "C:\Users\Roikku\Documents\Repositories\Move-View-Layers\Workbench\test.blend\ViewLayerManager.py", line 285, in ViewLayerMoveButtons AttributeError: 'RenderSettings' object has no attribute 'layers'
Is there an equivalent I can use instead? Or another method to do basically the same thing?