add options to read the deepexr file

This commit is contained in:
Kayla Man 2024-05-27 20:45:55 +08:00
parent c7723bb4ea
commit 6e0491af06
3 changed files with 31 additions and 11 deletions

View file

@ -61,7 +61,8 @@ class LoadClip(plugin.NukeLoader):
# option gui
options_defaults = {
"start_at_workfile": True,
"add_retime": True
"add_retime": True,
"deep_exr": False
}
node_name_template = "{class_name}_{ext}"
@ -78,6 +79,11 @@ class LoadClip(plugin.NukeLoader):
"add_retime",
help="Load with retime",
default=cls.options_defaults["add_retime"]
),
qargparse.Boolean(
"deep_exr",
help="Read with deep exr",
default=cls.options_defaults["deep_exr"]
)
]
@ -113,6 +119,9 @@ class LoadClip(plugin.NukeLoader):
add_retime = options.get(
"add_retime", self.options_defaults["add_retime"])
deep_exr = options.get(
"deep_exr", self.options_defaults["deep_exr"])
repre_id = repre_entity["id"]
self.log.debug(
@ -153,13 +162,21 @@ class LoadClip(plugin.NukeLoader):
return
read_name = self._get_node_name(context)
# Create the Loader with the filename path set
read_node = nuke.createNode(
"Read",
"name {}".format(read_name),
inpanel=False
)
read_node = None
if deep_exr:
# Create the Loader with the filename path set
read_node = nuke.createNode(
"DeepRead",
"name {}".format(read_name),
inpanel=False
)
else:
# Create the Loader with the filename path set
read_node = nuke.createNode(
"Read",
"name {}".format(read_name),
inpanel=False
)
# get colorspace
colorspace = (

View file

@ -1,3 +1,3 @@
name = "nuke"
title = "Nuke"
version = "0.1.14"
version = "0.1.15"

View file

@ -22,7 +22,9 @@ class LoadClipOptionsModel(BaseSettingsModel):
add_retime: bool = SettingsField(
title="Add retime"
)
deep_exr: bool = SettingsField(
title="Deep Exr Read Node"
)
class LoadClipModel(BaseSettingsModel):
enabled: bool = SettingsField(
@ -65,7 +67,8 @@ DEFAULT_LOADER_PLUGINS_SETTINGS = {
"node_name_template": "{class_name}_{ext}",
"options_defaults": {
"start_at_workfile": True,
"add_retime": True
"add_retime": True,
"deep_exr": False
}
}
}