Add simple Create Project Structure launcher action
Imp for AY-5076
Changelog Description
Add simple Create Project Structure launcher action.
Which creates the folder structure as defined in project settings: ayon+settings://core/project_folder_structure
Additional info
It currently only shows when you're in a project in the launcher but have NO folder or task selected to avoid clutter in launcher.
The label unfortunately is a bit too long to be nicely displayed by default, see screenshot. Any ideas for better icon and shorter label that doesn't get cut off?
This feature request came up a few times:
- Ynput Community Forum: How set up custom folder creation when using the launcher
- Ynput Community Forum: Default Project Hierarchy mentions the setting but seemed to describe a different feature.
- Discord
Testing notes:
- Update core addon
- Run the launcher action when you enter a project.
- Folders should now be generated as per settings.
Any ideas for better icon and shorter label that doesn't get cut off?
Your icon choice is already very good.
Shorter labels : The "disk" concept is important, to avoid confusion with the project's folder structure in database. Ideas :
- Add disk proj struct
- Add proj struct on disk
- Create Project Structure (the current label, but with a different icon : mdi.harddisk-plus or mdi.harddisk )
I can think of these names:
Create Dir
Create PRJ
Project Dir
I think maybe it's also worth discussing whether it might be nice to shrink the font sizes just a tad there to ensure there's less cut off. I often see it on other applications as well - which may fix the chosen names here as well?
@iLLiCiTiT what do you think?
@BigRoy btw what happens if user trigger Create Project... if those already existing?? I hope it will just skip the creation :) ?
@BigRoy btw what happens if user trigger
Create Project...if those already existing?? I hope it will just skip the creation :) ?
Not sure - since I didn't implement that code myself. But I suspect it would just generate the folders on disk that currently do not exist yet - so if you've adjusted your studio settings to have new folders in the template - then those get added.
Are you afraid to click the button? If so, what is making you scared and what could we do to make it feel less scary? A tooltip? A pop-up before the creation? (Like a confirmation? Which might make it feel more scary even?)
@BigRoy btw what happens if user trigger
Create Project...if those already existing?? I hope it will just skip the creation :) ?Not sure - since I didn't implement that code myself. But I suspect it would just generate the folders on disk that currently do not exist yet - so if you've adjusted your studio settings to have new folders in the template - then those get added.
Are you afraid to click the button? If so, what is making you scared and what could we do to make it feel less scary? A tooltip? A pop-up before the creation? (Like a confirmation? Which might make it feel more scary even?)
yeah, some popup would do! informing user whats gonna happen...
Thanks a lot for this @BigRoy , this is one of the things I was missing from our current pipeline while testing Ayon.
In our current pipeline we always have a folder called 00_MATERIALS where we save a lot of stuff in different subfolders like audio, references (with more subfolders), logos, client_material...
The production team is who usually save there all the material and they need to have the folder structure created to start copying files.
Now my question. As far as I know you can setup the folder structure in ayon+settings://core/project_folder_structure but there's no way to create these folders automatically before this PR, but if you setup a folder structure in that Ayon setting it's because you want it. So, shouldn't this folder structure be created automatically when you create a new project with that Bundle instead of have to go the the Launcher and click on this icon?
Of course, this is just for that folder structure setting and not for the whole folders/tasks you define inside the Project Settings.
Thanks a lot for this @BigRoy , this is one of the things I was missing from our current pipeline while testing Ayon.
In our current pipeline we always have a folder called
00_MATERIALSwhere we save a lot of stuff in different subfolders likeaudio,references(with more subfolders),logos,client_material...The production team is who usually save there all the material and they need to have the folder structure created to start copying files.
Now my question. As far as I know you can setup the folder structure in
ayon+settings://core/project_folder_structurebut there's no way to create these folders automatically before this PR, but if you setup a folder structure in that Ayon setting it's because you want it. So, shouldn't this folder structure be created automatically when you create a new project with that Bundle instead of have to go the the Launcher and click on this icon?Of course, this is just for that folder structure setting and not for the whole folders/tasks you define inside the
Project Settings.
It's a good question - but admittedly with site sync a project may be accessible from multiple locations and thus may have already been existing before that 'creation'. Also the project creation may happen in any variety of ways, yes currently most likely is the ayon-frontend triggering this but it may even be automated by the API or e.g. occur due to syncing from kitsu, ftrack or shotgrid/flow (which you may not want to automatically flood a local directory with project folders or not). Also, what if a producer just happens to create a project using the web frontend without access to the physical storage | what would create the project folder and files where?
Anyway, nothing is holding anyone from triggering e.g. this logic anytime the AYON Tray Launcher starts up or whatever - I'd just say that from my perspective I don't think I'd recommend that.
Do note that potentially soon using Web Actions from the front-end it may be possible to trigger an action like this from the web front-end, not requiring to do it via the Tray Launcher UI.
Additionally, having it accessible as a callable action does allow you to update the template in settings, and re-run it again if you happened to have changed the template.
I have done one more test run to see what happens if those folders are already present and filled with some content...
The good is, even when re-triggering this Create Proj action nothing happens aka no deleting or similar destructive action.
However still missing that popup info message what are you about to do.... @BigRoy any chance you incorporate it? :)
It's a good question - but admittedly with site sync a project may be accessible from multiple locations and thus may have already been existing before that 'creation'. Also the project creation may happen in any variety of ways, yes currently most likely is the ayon-frontend triggering this but it may even be automated by the API or e.g. occur due to syncing from kitsu, ftrack or shotgrid/flow (which you may not want to automatically flood a local directory with project folders or not). Also, what if a producer just happens to create a project using the web frontend without access to the physical storage | what would create the project folder and files where?
Anyway, nothing is holding anyone from triggering e.g. this logic anytime the AYON Tray Launcher starts up or whatever - I'd just say that from my perspective I don't think I'd recommend that.
Do note that potentially soon using Web Actions from the front-end it may be possible to trigger an action like this from the web front-end, not requiring to do it via the Tray Launcher UI.
Additionally, having it accessible as a callable action does allow you to update the template in settings, and re-run it again if you happened to have changed the template.
Yes, it makes sense.
I'm still don't know how Web Actions will work but it sounds like a nice way for doing this, better than the Tray Launcher as everything stay in the web front-end, IMHO.
@iLLiCiTiT any preference where to go from here aside of the icon and label cosmetics?
any preference where to go from here aside of the icon and label cosmetics?
Not from my point of view. Code is ok.
The question is, if it is "pipeline ok". Not sure if any artist should be able to run the action?
The question is, if it is "pipeline ok". Not sure if any artist should be able to run the action?
Or should the option be like, select the folders/shots on the left pane and choose the option!? even creating all the folders by artists is also okay, there is no harm I believe, anyway production already carefully adds the shots in ayon web. We are waiting for this option, everytime when we wanted to paste something inside shots its manual, I think this helps a lot
Just commenting that I'm not working on this currently - so it may be stale until there's more details on how to best proceed with this? I believe Web Actions might take precedence on this and 'replace' it? But maybe @LiborBatek 's comment here is still relevant if there is a time and place for having this also directly in launcher.
@iLLiCiTiT so FYI - I'll hold of changes to this until there's a clear route of action.
For the first glance when I read the PR's description (sorry if it was mentioned before) I had these thoughts:
- What will happen if the
ayon+settings://core/project_folder_structuredoesn't match my actual project structure in the project editor ? - What should be the source of truth for the folder creation ?
For the first glance when I read the PR's description (sorry if it was mentioned before) I had these thoughts:
- What will happen if the
ayon+settings://core/project_folder_structuredoesn't match my actual project structure in the project editor ?- What should be the source of truth for the folder creation ?
I think "Create Project Structure" (on disk, for assets that are not handled by Ayon) should follow "ayon+settings://core/project_folder_structure".
It's really different from the Logical structure (in Editor), which is only for Ayon managed stuff.
Look at Jakub's message on that matter (a year ago) :
This particular settings is at wrong place even in OpenPype...
The same settings are used for 2 features: 1 : Create default folder structure (on disk) 2 : Create default project hierarchy (in project manager) Which usually cause many troubles..
Found here : https://discord.com/channels/517362899170230292/890894521817260052/1147160515576082552
For the first glance when I read the PR's description (sorry if it was mentioned before) I had these thoughts:
* What will happen if the `ayon+settings://core/project_folder_structure` doesn't match my actual project structure in the project editor ? * What should be the source of truth for the folder creation ?
AFAIK this is not at all about creating folders for "folder" entities or tasks, etc. It's to create generic folders for your project that you may want to populate for "a project". Like e.g. you may - out of the pipeline - have a static "resources" folder, or a static "documents" folder where producers maybe put in some stuff. Etc.
So it's more of a "Please just create me some standard folders for the project" that are not related to actual assets or shots.
@krishnaavril this action is not intended as a substitution for creation of AYON driven project folders (assets, shots etc) but for additional folders predefined in the ayon-core settings ayon+settings://core/project_folder_structure (for resources like plates, footage, offline and other items production might need and to save those in a standard places)
@BigRoy as the confusion already happening I think we definetely should use different naming than Create Project Folders but refer more to Resources folders or similar.
@LiborBatek
I agree we should use different naming than Create Project Folders, to avoid confusion.
For that, the "disk" concept is important.
Here are alternatives (very short ones, to not clutter GUI) :
- Add disk proj struct
- Add proj struct on disk
@BigRoy @iLLiCiTiT @dee-ynput should we convert this to draft since it may be replaced by a web action?
@dee-ynput could you answer the remaining questions:
- What should be the label on the action? It must be short because as can be seen from the screenshot - it gets cut off. These have come up:
Add disk proj struct
Add proj struct on disk
Create Project Structure (will be cut off after "Project...")
Create Project Folders (will be cut off after "Project...")
- What's a sensible icon to use. I think you can pick one from: https://fontawesome.com/v4/icons/
- Should it pop up a confirmation dialog (maybe even explaining which folders would get created; it could even report if they already exist too) to avoid accidental clicks?
- Should it appear for ALL users? Or just certain roles? (If so, which?)
- Should it have a setting to enable/disable the action completely?
Thanks for the summary @BigRoy!
- What should be the label on the action? It must be short because as can be seen from the screenshot - it gets cut off. These have come up:
Let's match the setting name "Project folder structure", so: Create Project Folders.
The name being cut off indeed sucks, but that's something we'll fix at UI level (this limitation is a bummer for many other situations)
- What's a sensible icon to use. I think you can pick one from: fontawesome.com/v4/icons
The sitemap icon kinda works. I could consider a simple folder icon or the hdd icon...
- Should it pop up a confirmation dialog (maybe even explaining which folders would get created; it could even report if they already exist too) to avoid accidental clicks?
Let's add this later if requested 👍 (I do like it)
- Should it appear for ALL users? Or just certain roles? (If so, which?)
I need to check with CS team, but worst case would be to have a setting to state if it's managers only or for artists too.
- Should it have a setting to enable/disable the action completely?
Having the setting value empty should disable it. It must be stated in the settings inline help / tooltip.
Task linked: AY-5076 Ayon: Folder creation
@BigRoy After reviewing the CS request:
- Should it appear for ALL users? Or just certain roles? (If so, which?)
Let's do it for all users. The restriction will be implemented if/when we move this to a proper web action 👍
Let's match the setting name "Project folder structure", so: Create Project Folders. The name being cut off indeed sucks, but that's something we'll fix at UI level (this limitation is a bummer for many other situations)
Done.
Unfortunately reads like this:
Having the setting value empty should disable it. It must be stated in the settings inline help / tooltip.
Done.
The sitemap icon kinda works. I could consider a simple folder icon or the hdd icon...
I'll keep sitemap for now.
I used {root[work]}/{project[name]} instead of
__project_root__, because the later is marked as legacy in the code (and it tries to create the same folder tree on all Anatomy roots, a behaviour that we don't want).
Separate from this PR - should we update the default settings @m-u-r-p-h-y @LiborBatek to use {root[work]}/{project[name]} instead? Or?
@BigRoy Is this still something we want ?
Yes, last I heard this is still a valid request but we did not want it inside the launcher, but instead wanted it to become a web action - so this was left here dangling.
@BigRoy I guess theres no way to show the action only for certain user role atm, right?
@BigRoy I guess theres no way to show the action only for certain user role atm, right?
It's possible - not sure how fast the exact query would be, but it should be possible. Do we still want it in launcher, or are you asking web actions?