I got an error when running the code below (is part of addon) saying that the tabs or identation is not good:
class ADD_OT_nms_lockcamera(bpy.types.Operator):
bl_idname = 'add.nms_lockcamera'
bl_description = 'Lock to view'
bl_category = 'NMS'
bl_label = 'Lock to view'
def execute(self, context):
for area in bpy.context.screen.areas:
if area.type == 'VIEW_3D':
for space in area.spaces:
if space.type == 'VIEW_3D':
space.lock_camera = True
return {"FINISHED"}
Any Idea how to fix this?