Conversation
BigRoy
left a comment
There was a problem hiding this comment.
Nice! Looks good @moonyuet
Did you test run it as well? Or do we need more thorough testing from @LiborBatek ?
Co-authored-by: Roy Nieterau <roy_nieterau@hotmail.com>
Co-authored-by: Roy Nieterau <roy_nieterau@hotmail.com>
Co-authored-by: Roy Nieterau <roy_nieterau@hotmail.com>
Co-authored-by: Roy Nieterau <roy_nieterau@hotmail.com>
There was a problem hiding this comment.
The Always Add Cache Reader works as expected...it also propagates from settings to the loader and options which is right.
All been working nicely.
There is only one flaw and that is when version managed and setting different version.
as the cache file is not properly connected to the Cache reader.
so the updated version is not animated anymore. However the Alembic cache file got swapped for correct version but unassigned to the cache reader
Not sure tho if connected to this PR or unrelated...leaving it to your decision.
|
I think that is a bug actually - probably even for animated transforms even before this PR (that did require a cache attached too)... Seems like we're not processing @LiborBatek may be nice if you share with Kayla your test scene so she can reproduce easily and tweak it and confirm herself first it's stable when committing changes. |
…ct_path during update
…ive children too with Cache Loader
|
@BigRoy Although the fixes appear to simplify the codebase, it doesn't seems to be working to setting correct filepath when setting version/upversioning. Similar things happened to the cache loader too (Mesh_Sequence_Modifier has disappeared), but I don't have generic example for testing the cache loader. As this PR is more about adding |
|
I have tested it again and even tho there are no issues with Please see vid below. Generally it can work for a first time when using e.g. However it does set object path within the modifier in most occasions. Still not functional and reliable atm blender-abc-manage.mp4Note: I have tested it with both Alembic caches originating from the blender and also from outside (maya based ones) behaves very much the same in both occasions... |
Let's discuss these issues in a call where you can show what's happening please. |
So the case here is that inside the alembics you're updating between is that the object paths have changed. So I'll add some behavior that finds the best match. |
…to (longest matching suffix)
…ng-Always-Add-Cache-Reader-argument' of https://github.com/ynput/ayon-blender into enhancement/YN-0479--Blender-Alembic-Loader-allow-setting-Always-Add-Cache-Reader-argument # Conflicts: # client/ayon_blender/plugins/load/load_cache.py
…en assigned to a single modifier or constraints
…n't create extra duplciate when the always_create_cache_loader is False
…9--Blender-Alembic-Loader-allow-setting-Always-Add-Cache-Reader-argument
| cache for cache in bpy.data.cache_files | ||
| if cache in remove_caches and not lib.has_users(cache) | ||
| } | ||
|
|
There was a problem hiding this comment.
I don't see what this has to do with always_add_cache_reader. It also applies if it just happen to have applied cache to just a few.
Also, I may be misreading this, but this would essentially always result in the exact same remove_caches as just above. Because it will be in bpy.data.cache_files, it will be in remove_caches and the not lib.has_users check was also alreayd perform on the cache. As such, this logic can be removed.
There was a problem hiding this comment.
I don't see what this has to do with
always_add_cache_reader. It also applies if it just happen to have applied cache to just a few.
Not really, it would add up but not remove the target from bpy.data.cache_files. like I showed in #252 (comment) but this time is the cache loader.
There was a problem hiding this comment.
I don't understand, sorry. Can you explain how this differs?
There was a problem hiding this comment.
I don't understand, sorry. Can you explain how this differs?
Okay. My bad, let's clean this up(407fbd9). We can fix it later, the issue is still there when the always_add_cache_reader disabled with/without the cache
Recording.2026-02-13.164655.mp4
LiborBatek
left a comment
There was a problem hiding this comment.
Im still getting errors while trying to version manage Animation in Abc which differs in object paths unfortunatelly...
getting this traceback in the console:
Running callback: <bound method CacheModelLoader.exec_update of []>
*** WRN: >>> { ProductLoader }: [ Object path '/vanguard_01_rigMain/vanguard_01_rigMain_model/vanguard_01_rigMain_vanguard_Mesh/vanguard_01_rigMain_vanguard_Mesh' not found in new cache file 'C:/projects/Blender/Shots/sh010/publish/animation/animationMain/v003/Blnd_sh010_animationMain_v003.abc' ]
*** WRN: >>> { ProductLoader }: [ No replacement found for object path '/vanguard_01_rigMain/vanguard_01_rigMain_model/vanguard_01_rigMain_vanguard_Mesh/vanguard_01_rigMain_vanguard_Mesh' ]
*** WRN: >>> { ProductLoader }: [ Object path '/vanguard_01_rigMain/vanguard_01_rigMain_model/vanguard_01_rigMain_vanguard_visor/vanguard_01_rigMain_vanguard_visor' not found in new cache file 'C:/projects/Blender/Shots/sh010/publish/animation/animationMain/v003/Blnd_sh010_animationMain_v003.abc' ]
*** WRN: >>> { ProductLoader }: [ No replacement found for object path '/vanguard_01_rigMain/vanguard_01_rigMain_model/vanguard_01_rigMain_vanguard_visor/vanguard_01_rigMain_vanguard_visor' ]
*** WRN: >>> { ProductLoader }: [ Object path '/vanguard_01_rigMain/vanguard_01_rigMain_model/vanguard_01_rigMain_vanguard_Mesh/vanguard_01_rigMain_vanguard_Mesh' not found in new cache file 'C:/projects/Blender/Shots/sh010/publish/animation/animationMain/v003/Blnd_sh010_animationMain_v003.abc' ]
*** WRN: >>> { ProductLoader }: [ No replacement found for object path '/vanguard_01_rigMain/vanguard_01_rigMain_model/vanguard_01_rigMain_vanguard_Mesh/vanguard_01_rigMain_vanguard_Mesh' ]
*** WRN: >>> { ProductLoader }: [ Object path '/vanguard_01_rigMain/vanguard_01_rigMain_model' not found in new cache file 'C:/projects/Blender/Shots/sh010/publish/animation/animationMain/v003/Blnd_sh010_animationMain_v003.abc' ]
*** WRN: >>> { ProductLoader }: [ No replacement found for object path '/vanguard_01_rigMain/vanguard_01_rigMain_model' ]
*** WRN: >>> { ProductLoader }: [ Object path '/vanguard_01_rigMain/vanguard_01_rigMain_model/vanguard_01_rigMain_vanguard_visor/vanguard_01_rigMain_vanguard_visor' not found in new cache file 'C:/projects/Blender/Shots/sh010/publish/animation/animationMain/v003/Blnd_sh010_animationMain_v003.abc' ]
*** WRN: >>> { ProductLoader }: [ No replacement found for object path '/vanguard_01_rigMain/vanguard_01_rigMain_model/vanguard_01_rigMain_vanguard_visor/vanguard_01_rigMain_vanguard_visor' ]
*** WRN: >>> { ProductLoader }: [ Object path '/vanguard_01_rigMain' not found in new cache file 'C:/projects/Blender/Shots/sh010/publish/animation/animationMain/v003/Blnd_sh010_animationMain_v003.abc' ]
*** WRN: >>> { ProductLoader }: [ No replacement found for object path '/vanguard_01_rigMain' ]
Done
Alembic: unknown how to handle objects of schema '', skipping object ''
Alembic: unknown how to handle objects of schema '02:15.813 object.modifier | WARNING Object: "sh010_01_animationMain:vanguard_01_rigMain_vanguard_visor", Modifier: "MeshSequenceCache", Could not create cache reader for file C:/projects/Blender/Shots/sh010/publish/animation/animationMain/v003/Blnd_sh010_animationMain_v003.abc
', skipping object ''Alembic: unknown how to handle objects of schema '
', skipping object ''
Alembic: unknown how to handle objects of schema '', skipping object '02:15.813 object.modifier | WARNING Object: "sh010_01_animationMain:vanguard_01_rigMain_vanguard_Mesh", Modifier: "MeshSequenceCache", Could not create cache reader for file C:/projects/Blender/Shots/sh010/publish/animation/animationMain/v003/Blnd_sh010_animationMain_v003.abc
'
Alembic: unknown how to handle objects of schema '', skipping object ''
|
|
||
| def _process(self, libpath, asset_group, group_name, options=None): | ||
| def _process(self, libpath, asset_group, group_name, | ||
| options: Optional[Dict] = None): |
There was a problem hiding this comment.
Just to be clear, the code in this method does not expect this to be None for the Alembic case - because None.get("always_add_cache_reader") would fail. So either we need
if options is None:
options = {}
Or it should not have it as optional, and just require the dict.
@moonyuet it may be worth logging the Then with those logs - would be good to debug with Libor why his case fails. |
… not None for the dictionary data
Co-authored-by: Roy Nieterau <roy_nieterau@hotmail.com>
|
@BigRoy I got the files from Libor and find out that the empty lists from the new_cache.object_paths. |
|
I tested with blender 5.0.1, it works correctly as expected. testing_video.mp4 |
Changelog Description
This PR is to add the setting of
Always Add Cache Renderfor the alembic loader options, it would also support to synchronize the related settings from AYON.Resolve #251
Additional review information
n/a
Testing notes:
ayon+settings://blender/load/AbcCameraLoader/always_add_cache_readerorayon+settings://blender/load/CacheModelLoader/always_add_cache_reader