mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 16:34:53 +01:00
added options to imagel oader
This commit is contained in:
parent
7c87d2c114
commit
05f6d92f8d
1 changed files with 22 additions and 0 deletions
|
|
@ -1,4 +1,5 @@
|
||||||
from avalon import api
|
from avalon import api
|
||||||
|
from avalon.vendor import qargparse
|
||||||
from avalon.tvpaint import CommunicatorWrapper
|
from avalon.tvpaint import CommunicatorWrapper
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -20,6 +21,27 @@ class ImportImage(api.Loader):
|
||||||
"tv_layerrename layer_id layer_name"
|
"tv_layerrename layer_id layer_name"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
options = [
|
||||||
|
qargparse.Boolean(
|
||||||
|
"stretch",
|
||||||
|
label="Stretch to project size",
|
||||||
|
default=True,
|
||||||
|
help="Stretch loaded image/s to project resolution?"
|
||||||
|
),
|
||||||
|
qargparse.Boolean(
|
||||||
|
"timestretch",
|
||||||
|
label=" Stretch to timeline length",
|
||||||
|
default=True,
|
||||||
|
help="Clip loaded image/s to timeline length?"
|
||||||
|
),
|
||||||
|
qargparse.Boolean(
|
||||||
|
"preload",
|
||||||
|
label="Preload loaded image/s",
|
||||||
|
default=True,
|
||||||
|
help="Preload image/s?"
|
||||||
|
)
|
||||||
|
]
|
||||||
|
|
||||||
def load(self, context, name, namespace, options):
|
def load(self, context, name, namespace, options):
|
||||||
# Prepare layer name
|
# Prepare layer name
|
||||||
asset_name = context["asset"]["name"]
|
asset_name = context["asset"]["name"]
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue