Finish loader

This commit is contained in:
Petr Kalis 2020-08-20 17:31:20 +02:00
parent 41e2149d12
commit dce5de4938
2 changed files with 7 additions and 3 deletions

View file

@ -208,6 +208,9 @@ class PhotoshopClientStub():
Args:
path (str): File path to import.
"""
self.websocketserver.call(self.client.call
('Photoshop.import_smart_object',
path=path))
def replace_smart_object(self, layer, path):
"""

View file

@ -1,7 +1,8 @@
from avalon import api, photoshop
from pype.modules.websocket_server.clients.photoshop_client \
import PhotoshopClientStub
from pype.modules.websocket_server.clients.photoshop_client import (
PhotoshopClientStub
)
photoshopClient = PhotoshopClientStub()
@ -17,7 +18,7 @@ class ImageLoader(api.Loader):
def load(self, context, name=None, namespace=None, data=None):
with photoshop.maintained_selection():
layer = photoshop.import_smart_object(self.fname)
layer = photoshopClient.import_smart_object(self.fname)
self[:] = [layer]