-
Notifications
You must be signed in to change notification settings - Fork 129
Settings: Move imageio from project anatomy to project settings #3909
Conversation
- Note: There is no backwards compatibility implemented
schema/config-2.0.json
Outdated
"imageio": { | ||
"type": "object" | ||
}, |
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.
Can we just remove this? Are old projects ever checked against this schema and invalidated if it finds an entry that isn't in this config?
It's not a required key so that helps, but still.
def _project_anatomy_backwards_compatible_conversion(project_anatomy): | ||
# Backwards compatibility of node settings in Nuke 3.9.x - 3.10.0 | ||
# - source PR - https://github.com/pypeclub/OpenPype/pull/3143 | ||
value = project_anatomy | ||
for key in ("imageio", "nuke", "nodes", "requiredNodes"): | ||
if key not in value: | ||
return | ||
value = value[key] | ||
|
||
for item in value: | ||
for node in item.get("knobs") or []: | ||
if "type" in node: | ||
break | ||
node["type"] = "__legacy__" | ||
|
||
|
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.
Had no use with this move of the settings as far as I know - so burned it down to the floor.
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.
I would keep schemas for |
Since we are matching the settings 1-to-1 wouldn't it be much nicer if it'd automatically transfer the settings from Project Anatomy somehow? I feel from a User perspective that'd be much nicer than still having to "fix" each project manually (even though sure, you could copy/paste the values - but similarly we could offer a "click here and it's fixed button" by copying the data project anatomy in database to the settings? I'm mostly worried about having both setting visible and the user misunderstanding that those in Project Anatomy essentially do nothing. We could put in a big deprecation label in the UI, but still. If the intend is for production to notice the least the settings should be copied over thus it sounds like we should just make that happen. |
The problem is that you will loose all those data from anatomy on first save of project setting. So if you're "testing" new version in production you will actually break all projects on project settings save. NOTE: We're first testing OpenPype as staging before full deploy to production. |
- This way project save will not delete the old settings
Question: Should we maybe swap these around so the settings are
instead of
The benefit I'd see from that is that we can just make one MASTER config setting that sets Or is it very likely that the different applications should use different OCIO configs in a project. What do we feel is the most sensible 'project setting'? @mkolar @maxpareschi Of course this is very related to Colorspace Distribution and Management |
That is ultimate goal but we can't do it at this moment. Nuke imageio has totally different settings then Maya or Flame or Hiero. We need this PR to move the settings from anatomy to project setting so we can possibly change their behavior from version to version with versioned settings which is not possible if they're in anatomy. |
Great - then I suspect this PR should be ok to start that transition. |
@@ -563,7 +563,7 @@ def get_node_path(path, padding=4): | |||
|
|||
|
|||
def get_nuke_imageio_settings(): | |||
return get_anatomy_settings(Context.project_name)["imageio"]["nuke"] | |||
return get_project_settings(Context.project_name)["nuke"]["imageio"] |
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.
I believe there should be some backward compatibility check. Some clients might have Anatomy ImageIO set from 3.9 and they didn't change __legacy__
type yet. We would need to go trough all projects and do this manually (impossible).
For those projects it doesnt even make sense to copy paste it from Anatomy to ./nuke/imageio
.
I will do the changes in separate PR. Please could you return the ___legacy__
check (#3909 (comment))
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.
good for merge.. tested Nuke, Hiero. Resolve is not done anyway. Flame should be fine, too.
huh.. just realized that the |
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.
We need explicit backwards compatibility in project settings. @jakubjezek001 can you do required changes in new branch (sourcing from this) and create new PR?
This PR is closing in favor of #3959 |
Brief description
This implements #3865 by moving
imageio
settings per host from project anatomy to project settings.Before:
After:
Description
Currently untested - no backwards compatible or fallbacks implemented. Basically your old project anatomy customized settings will be lost. 🔥 - So as #3865 we'll need to look into how we'll want to transfer those settings over automagically 🪄 .
Additional info
Note that each
imageio
group has now setis_group
to True as such changing one setting in the imageio for a host will now override that full imageio block of settings for the project. It's up for discussion whether we want that - if we want to change around we'll need to add some labels to some of the settings (required foris_group
to be False) but that should be fine.It could be that some documentation might also need to be updated along.
Copying ImageIO settings from Anatomy to Project Settings
Any potential backwards compatible "updating" would only need to basically 'copy the settings values' from
project_anatomy/imageio/{app}
on top ofproject_settings/{app}/imageio
to transfer the exact settings. So in essence it is:I'm not awaiting the moment this PR gets 'assigned' to me and I get all the blame in the future. 🗡️
Testing notes: