-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AY-7442 Dissociate file_type and ext knob computation (SXR and JPG extension support). #81
base: develop
Are you sure you want to change the base?
Conversation
# Determine defined file type | ||
path = node["file"].value() | ||
_, ext = os.path.splitext(path) | ||
_, ext = ext.split(".", 1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This would mean the file extension drives the representation name and not the file_type anymore, is that OK ?
This means those would be different jpg
vs jpeg
and exr
vs sxr
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be question for @jakubjezek001 .
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, and the solution is great! We will need to also add this into documentation please. Ideally around this section please https://ayon.ynput.io/docs/addon_nuke_admin#creator-plugins
ext = write_node["file_type"].value() | ||
path = write_node["file"].value() | ||
_, ext = os.path.splitext(path) | ||
_, ext = ext.split(".", 1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
_, ext = ext.split(".", 1) | |
ext = ext.lstrip(".") |
_, ext = os.path.splitext(path) | ||
_, ext = ext.split(".", 1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
_, ext = os.path.splitext(path) | |
_, ext = ext.split(".", 1) | |
ext = os.path.splitext(path)[1].lstrip(".") |
nuke.message( | ||
"ERROR: No file type found in the subset's knobs." | ||
"ERROR: No 'file_type' nor 'ext' found in the subset's knobs." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this subset
be refactored to product
now too? While we're at it.
"ERROR: No 'file_type' nor 'ext' found in the subset's knobs." | |
"ERROR: No 'file_type' nor 'ext' found in the product's knobs." |
Changelog Description
resolve: #69
resolve: #72
Changes to ensure SXR (exr) and JPG (jpeg) can be rendered out of our
Render
write nodes through AYON settings.Needs to be tested with ynput/ayon-core#1165 to ensure loader is OK.
Additional review information
Current implementation in Nuke assumes that
file_type
and output file extension are always matching.However Nuke has some disperencies here:
These changes ensure extension is set from an
ext
knob if defined, then computed from thepath
knob.Testing notes:
Render SXR output:
Render (write)
node knobs settings (ayon+settings://nuke/imageio/nodes/required_nodes/0/knobs
) to:file_type
: exr (Text)ext
: sxr (Text)Render JPG output:
Set
Render (write)
node knobs settings (ayon+settings://nuke/imageio/nodes/required_nodes/0/knobs
) to:file_type
: jpeg (Text)ext
: jpg (Text)Create a new
Render
productPublisher the
Render
productEnsure the
sxr
orjpg
representation if properly published