Asset Pipeline: Store Asset Catalog in String #230

Merged
Nick Alberelli merged 6 commits from TinyNick/blender-studio-pipeline:fix/asset-catalog into main 2024-02-15 22:54:08 +01:00
Member

Closes: #229

What's Changed?

  • Replace Asset Catalog Enum with String + Search

Breaking Changes

  • This change will clear all existing asset catalogs selections from the working files users will need to re-select the correct asset catalog before sync/push to publish. Otherwise the published file may loose it's asset catalog assignment.

New UI

image

Closes: https://projects.blender.org/studio/blender-studio-pipeline/issues/229 ## What's Changed? - Replace Asset Catalog Enum with String + Search ## Breaking Changes - This change will clear all existing asset catalogs selections from the working files users will need to re-select the correct asset catalog before sync/push to publish. Otherwise the published file may loose it's asset catalog assignment. ## New UI ![image](/attachments/a2b7a104-6836-410f-91d1-8cb887d4ed9a)
Nick Alberelli added 4 commits 2024-02-13 20:04:21 +01:00
Author
Member

@eyecandy This is fix is ready, but it does contain breaking changes, so I have not put this in main yet.

Please let me know if you would like to roll this change out or if we are worried about the breaking changes (having to reset asset catalog on all assets, listed above) I can likely handle the issue using a bbatch script.

I am off Feburary 14th (tomorrow) so please feel free to ask @ZedDB to Squash Commit this PR if you would like to roll this out by updating add-ons. otherwise I will handle any feedback on Thursday Feburary 15th.

@eyecandy This is fix is ready, but it does contain breaking changes, so I have not put this in main yet. Please let me know if you would like to roll this change out or if we are worried about the breaking changes (having to reset asset catalog on all assets, listed above) I can likely handle the issue using a bbatch script. I am off Feburary 14th (tomorrow) so please feel free to ask @ZedDB to Squash Commit this PR if you would like to roll this out by [updating add-ons](https://studio.blender.org/pipeline/user-guide/project_tools/project-blender#install-update-add-ons). otherwise I will handle any feedback on Thursday Feburary 15th.
Nick Alberelli changed title from Asset Pipeline: Store Asset Catalog in String instead of Enum to Asset Pipeline: Store Asset Catalog in String 2024-02-13 20:16:19 +01:00
Member

If both @Mets and @SimonThommes are fine with it, feel free to push this change. I'm off on the 14th as well, so I'm fine waiting until the 15th as well. thanks for fixing this so quick!

If both @Mets and @SimonThommes are fine with it, feel free to push this change. I'm off on the 14th as well, so I'm fine waiting until the 15th as well. thanks for fixing this so quick!
Member

Sounds good to me. @TinyNick how is the owner of the set catalog defined right now. Would we only have to change the setting in the publish or in every working file? In case of the latter it would indeed be better to do this with a script.

Sounds good to me. @TinyNick how is the owner of the set catalog defined right now. Would we only have to change the setting in the publish or in every working file? In case of the latter it would indeed be better to do this with a script.
Member

☝️ Same sentiments and questions as Simon, once that's cleared up, this is fine by me.

☝️ Same sentiments and questions as Simon, once that's cleared up, this is fine by me.
Author
Member

@Mets @SimonThommes
Currently you will need to update this string in all working files, but I have decided there is a better way...

I am going to add a getter/setter for this value, so it will be pre-populated with whatever the current state of the asset is based on the blender_assets.cats.txt file. This way the behaviour will be; whatever asset catalog the published file is set to will be populated into the new string value. Bypassing the need for a script to update the value on all these files (and it's better behaviour IMO)

In that case you will only need to change the asset catalog if it catalog is wrong and to make this change you can do it from any of the working files. Once the asset catalog is changed and sync'd to publish it will update the blender_assets.cats.txt which will be reflected in the string property for all working files.

@Mets @SimonThommes Currently you will need to update this string in all working files, but I have decided there is a better way... I am going to add a getter/setter for this value, so it will be pre-populated with whatever the current state of the asset is based on the `blender_assets.cats.txt` file. This way the behaviour will be; whatever asset catalog the published file is set to will be populated into the new string value. Bypassing the need for a script to update the value on all these files (and it's better behaviour IMO) In that case you will only need to change the asset catalog if it catalog is wrong and to make this change you can do it from any of the working files. Once the asset catalog is changed and sync'd to publish it will update the `blender_assets.cats.txt` which will be reflected in the string property for all working files.
Member

I'm not sure what the blender_assets.cats.txt has to do with this. Shouldn't that file just specify the general catalog hierarchy and their UUIDs? It doesn't have anything to do with the actual assets afaik, so we shouldn't have to touch it here.

Am I misunderstanding something?

I'm not sure what the `blender_assets.cats.txt` has to do with this. Shouldn't that file just specify the general catalog hierarchy and their UUIDs? It doesn't have anything to do with the actual assets afaik, so we shouldn't have to touch it here. Am I misunderstanding something?
Author
Member

Yes I take back that comment I had a brain fart, forgot that the actual asset files aren't listed in blender_assets.cats.txt otherwise this would be easy. but the first part of my comment still stands, that you will need to set this string in multiple files so it's better if it is done with a script before I roll this out. I will get to work on that script asap.

Yes I take back that comment I had a brain fart, forgot that the actual asset files aren't listed in `blender_assets.cats.txt` otherwise this would be easy. but the first part of my comment still stands, that you will need to set this string in multiple files so it's better if it is done with a script before I roll this out. I will get to work on that script asap.
Author
Member

@SimonThommes @Mets @eyecandy

Do we have an opinion on which working files can change the asset catalog?

In the current step-up it can be changed by all task layer files but those changes are not sync'd so a change in working file A is reflected in publish but not in working file B.

Personally I think that should be changed. Would you guys prefer to have a single working file control this value, or have all working files share control of this value (assuming they are sync'd up some how)

@SimonThommes @Mets @eyecandy Do we have an opinion on which working files can change the asset catalog? In the current step-up it can be changed by all task layer files but those changes are not sync'd so a change in working file A is reflected in publish but not in working file B. Personally I think that should be changed. Would you guys prefer to have a single working file control this value, or have all working files share control of this value (assuming they are sync'd up some how)
Member

since there is no 'main' working file and this should usually not change anyways, it would be acceptable to me if all files shared the ownership of this setting

since there is no 'main' working file and this should usually not change anyways, it would be acceptable to me if all files shared the ownership of this setting
Nick Alberelli added 1 commit 2024-02-15 21:24:19 +01:00
Nick Alberelli added 1 commit 2024-02-15 22:52:20 +01:00
Author
Member

Alright I have updated this PR, the Asset Catalog ID is now stored in the Task Layer JSON file, this way all task layers are in "sync" when changing this value. I have crawled all the asset files and was able to set this property on your behalf for all the assets that had a category set (which was about half of them). I have updated the task layer JSONs for those files in SVN revision.

Going forward you only need to set the asset catalog in one of the working files, and it will populate to the other working files automatically, and to publish when you Sync/Push.

Changes have been rolled out to your workstations.

Alright I have updated this PR, the Asset Catalog ID is now stored in the Task Layer JSON file, this way all task layers are in "sync" when changing this value. I have crawled all the asset files and was able to set this property on your behalf for all the assets that had a category set (which was about half of them). I have updated the task layer JSONs for those files in SVN revision. Going forward you only need to set the asset catalog in one of the working files, and it will populate to the other working files automatically, and to publish when you Sync/Push. Changes have been rolled out to your workstations.
Nick Alberelli merged commit 13f7b2d84b into main 2024-02-15 22:54:08 +01:00
Nick Alberelli deleted branch fix/asset-catalog 2024-02-15 22:54:09 +01:00
Sign in to join this conversation.
No reviewers
No Milestone
No project
No Assignees
4 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: studio/blender-studio-pipeline#230
No description provided.