move psd_tools import into the export_psd only

master
ChristopheSeux 2023-09-28 11:46:51 +02:00
parent cb3c5d800f
commit ba5084e458
2 changed files with 8 additions and 4 deletions

View File

@ -4,7 +4,7 @@ bl_info = {
"name": "Background plane manager", "name": "Background plane manager",
"description": "Manage the background image planes and grease pencil object relative to a camera", "description": "Manage the background image planes and grease pencil object relative to a camera",
"author": "Samuel Bernou", "author": "Samuel Bernou",
"version": (0, 4, 2), "version": (0, 4, 3),
"blender": (3, 5, 0), "blender": (3, 5, 0),
"location": "View3D", "location": "View3D",
"warning": "", "warning": "",
@ -22,8 +22,8 @@ from . import preferences
from . import fn from . import fn
from . file_utils import install_module #from . file_utils import install_module
install_module('psd_tools', 'psd-tools') #install_module('psd_tools', 'psd-tools')
""" """
from . import auto_modules from . import auto_modules

View File

@ -4,10 +4,12 @@ from bpy_extras.io_utils import ImportHelper
import sys import sys
import os import os
import json import json
import psd_tools #import psd_tools
from pathlib import Path from pathlib import Path
from time import time from time import time
from . import fn from . import fn
from . file_utils import install_module
def print_progress(progress, min=0, max=100, barlen=50, prefix='', suffix='', line_width=80): def print_progress(progress, min=0, max=100, barlen=50, prefix='', suffix='', line_width=80):
@ -32,6 +34,8 @@ def export_psd(psd_file, output=None, scale=0.5):
string psd_file - the filepath of the psd file string psd_file - the filepath of the psd file
''' '''
psd_tools = install_module('psd_tools', 'psd-tools')
# def get_layers(layer, all_layers=[]): # def get_layers(layer, all_layers=[]):
# if not layer.is_group(): # if not layer.is_group():
# return # return