Cleanup: defer 'os' imports in startup scripts

This commit is contained in:
Campbell Barton 2021-04-12 13:36:55 +10:00
parent b58c1f6b1c
commit 3a05135e12
2 changed files with 3 additions and 2 deletions

View File

@ -18,7 +18,6 @@
# <pep8 compliant>
import bpy
import os
from bpy.types import Operator
from bpy.props import FloatProperty
from mathutils import (
@ -356,6 +355,7 @@ class CLIP_OT_delete_proxy(Operator):
@staticmethod
def _rmproxy(abspath):
import os
import shutil
if not os.path.exists(abspath):
@ -367,6 +367,7 @@ class CLIP_OT_delete_proxy(Operator):
os.remove(abspath)
def execute(self, context):
import os
sc = context.space_data
clip = sc.clip
if clip.use_proxy_custom_directory:

View File

@ -22,7 +22,6 @@
import bpy
from bpy.types import Operator
import os
from bpy.app.translations import pgettext_tip as tip_
@ -62,6 +61,7 @@ class PlayRenderedAnim(Operator):
bl_options = {'REGISTER'}
def execute(self, context):
import os
import subprocess
from shlex import quote