mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-25 13:24:54 +01:00
OP-1206 - added reference loader wip
This commit is contained in:
parent
b0628953d8
commit
3fd25b14a7
4 changed files with 28 additions and 5 deletions
|
|
@ -21,7 +21,7 @@ class ImageLoader(api.Loader):
|
|||
context["asset"]["name"],
|
||||
name)
|
||||
with photoshop.maintained_selection():
|
||||
layer = stub.import_smart_object(self.fname, layer_name)
|
||||
layer = self.import_layer(self.fname, layer_name)
|
||||
|
||||
self[:] = [layer]
|
||||
namespace = namespace or layer_name
|
||||
|
|
@ -72,3 +72,6 @@ class ImageLoader(api.Loader):
|
|||
|
||||
def switch(self, container, representation):
|
||||
self.update(container, representation)
|
||||
|
||||
def import_layer(self, file_name, layer_name):
|
||||
return stub.import_smart_object(file_name, layer_name)
|
||||
|
|
|
|||
22
openpype/hosts/photoshop/plugins/load/load_reference.py
Normal file
22
openpype/hosts/photoshop/plugins/load/load_reference.py
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
import re
|
||||
|
||||
from avalon import api, photoshop
|
||||
|
||||
from openpype.hosts.photoshop.plugins.lib import get_unique_layer_name
|
||||
from openpype.hosts.photoshop.plugins.load.load_image import ImageLoader
|
||||
|
||||
stub = photoshop.stub()
|
||||
|
||||
|
||||
class ReferenceLoader(ImageLoader):
|
||||
"""Load reference images
|
||||
|
||||
Stores the imported asset in a container named after the asset.
|
||||
"""
|
||||
|
||||
families = ["image", "render"]
|
||||
representations = ["*"]
|
||||
|
||||
def import_layer(self, file_name, layer_name):
|
||||
return stub.import_smart_object(file_name, layer_name,
|
||||
as_reference=True)
|
||||
|
|
@ -6,7 +6,7 @@ import pyblish.api
|
|||
class CollectDefaultDeadlineServer(pyblish.api.ContextPlugin):
|
||||
"""Collect default Deadline Webservice URL."""
|
||||
|
||||
order = pyblish.api.CollectorOrder
|
||||
order = pyblish.api.CollectorOrder + 0.01
|
||||
label = "Default Deadline Webservice"
|
||||
|
||||
def process(self, context):
|
||||
|
|
|
|||
|
|
@ -162,9 +162,7 @@
|
|||
]
|
||||
}
|
||||
],
|
||||
"customNodes": [
|
||||
|
||||
]
|
||||
"customNodes": []
|
||||
},
|
||||
"regexInputs": {
|
||||
"inputs": [
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue