-
Notifications
You must be signed in to change notification settings - Fork 128
Fusion: Work with pathmaps #5329
Fusion: Work with pathmaps #5329
Conversation
I'm quite disapointed about the formatting changes. Like PR is changing formatting of files based on preferences of the developer, so the PR has many lines of changes that are totally irrelevant to the PR. And they will be changed back in a future PRs, because preferences of other developer will be different... I'm not saying I don't agree with them, but please, at least do them in different PRs as it's uber confusing to see 50+lines changes when only 7 of them are functional changes. |
@iLLiCiTiT Thanks for the note. I'm running black to fix most problems Hound gave me before. It also do some reformatting. |
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.
Altought I agree with @iLLiCiTiT (And I am the one who would change it to my preferences, which were the original, since they are easier to read from my perspective ;), this PR works as advertised and can be merged.
I'm not too sure about this PR since it seems to be doing the opposite to what some things in OpenPype's Houdini integration tries to explicitly remove from the workfile. For some context, Houdini has a However, on publishing workfiles (and for deadline render submissions) and loading publishes this is explicitly avoided because it will break things in certain occassions:
With that said, I do think there are valid use cases for using So I'd like to take this moment to discuss the approach we want to take from Ynput/AYON's development standpoint. @mkolar @antirotor @jakubjezek001 how would you like to proceed with this. In essence what the PR tries to do is to create saver paths and resolve loaded paths relative to Say I have path maps:
And I have paths like:
Then I assume it path maps as:
|
@BigRoy
Outside of Fusion you would have to parse the fusion config (that OP do create) to get the real path. Inside of Fusion you can use comp.ReverseMapPath() to get the correct path. Your examples are correct, that's how the loaders/savers paths would look like with this PR applied. As mentioned in the first post, path maps are a big part of the Fusion workflow to allow files to be located independently on different OSes and still work. But a conversation on what approach we want to take from Ynput/AYON's development standpoint is welcome if needed. |
…ith-pathmaps' into enhancement/fusion-work-with-pathmaps
I tried quickly setting custom path maps within Fusion but it doesn't seem to allow it for me within Fusion. Likely because the Master Prefs override it and they are 'locked'. Could you explain how you are setting e.g a project-specific path map. Did you change the masterprefs? If so, what did you change them to? How could I e.g. have OpenPype set up a |
Currently I'm opening Fusion outside of OP, set the path maps as needed and then in OP's studio settings I have |
Did you set that path map up in a way that it's still dynamic per project, e.g. mapping it to an env var? |
That would be the dream! But I think that would need to be part of another PR to dynamically generate/modify the profile instead of simply copy the local profile. |
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.
Overall the functionality works - there's only one code change that should be done.
Admittedly setting up the path mapping itself currently is a bit quirky (even though doable for a tech artist). I suppose that could be an issue for another PR because this functionality doesn't seem to break anything.
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.
Works for me.
Co-authored-by: Jakub Trllo <[email protected]>
Co-authored-by: Jakub Trllo <[email protected]>
Look how neat this PR changes turned out - lovely work! |
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.
Hven't tested but code looks good.
Looks like evebody is happy. Merging... |
Changelog Description
Path maps are a big part of our Fusion workflow. We map the project folder to a path map within Fusion so all loaders and savers point to the path map variable. This way any computer on any OS can open any comp no matter where the project folder is located.
Additional info
In OpenPype's default Fusion render location is within the comps root folder. This means every saver node created will get the path
Comp:
and the path will continue from there. This is universal for Fusion and will render on any Fusion renderer.For any other kind of path map the users have to manually enter the path map in Fusions settings for anything different to happen than before this PR.
This feature would fit perfectly with an updated Fusion Profile functionality where the studio could enter in custom path maps per project and they would be added automatically to Fusions prefs when opened through OP.
This would make the whole system super clean and easy to use.
Testing notes:
Comp: