Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pointcache - "Manage > Set Version" and "Update to latest" action fails with error #40

Open
2 tasks done
LiborBatek opened this issue Sep 17, 2024 · 5 comments
Open
2 tasks done
Assignees
Labels
type: bug Something isn't working

Comments

@LiborBatek
Copy link
Member

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior:

When having loaded pointcache product in workfile and trying to perform Manage > Set Version it throws an error and not perform the action.

Traceback (most recent call last):

  File "C:\Users\lbate\AppData\Local\Ynput\AYON\addons\blender_0.2.4-dev.1\ayon_blender\api\ops.py", line 128, in execute
    result = callback(*args, **kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^

  File "C:\Users\lbate\AppData\Local\Ynput\AYON\addons\blender_0.2.4-dev.1\ayon_blender\plugins\load\load_cache.py", line 276, in exec_update
    libpath = self._update_transform_cache_path(asset_group, libpath, prev_filename)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "C:\Users\lbate\AppData\Local\Ynput\AYON\addons\blender_0.2.4-dev.1\ayon_blender\plugins\load\load_cache.py", line 58, in _update_transform_cache_path
    modifier.cache_file = bpy.data.cache_files[-1]
    ^^^^^^^^^^^^^^^^^^^

AttributeError: 'NoneType' object has no attribute 'cache_file'

Expected Behavior:

Manage action must work on any product.

Version

1.0.0

What platform you are running on?

Windows

Steps To Reproduce:

  1. Load some pointcache product
  2. Try perform AYON > Manage> Set Version
  3. Will crash and not perform the action

Are there any labels you wish to add?

  • I have added the relevant labels to the bug report.

Relevant log output:

No response

Additional context:

No response

@LiborBatek LiborBatek added the type: bug Something isn't working label Sep 17, 2024
@BigRoy
Copy link
Contributor

BigRoy commented Sep 17, 2024

Updating works for me in Blender 4.2 LTS.

The filter to outdated toggle does not work, but is a known ayon-core issue here.

So this may be something specific on your end with the product you're loading?

It's odd that it gets a None type as modifier because here just the line before it creates a new one. Are you able to pinpoint when exactly this occurs? If not, then this may be best to delve deeper with your specific scenes or files.

@BigRoy
Copy link
Contributor

BigRoy commented Sep 19, 2024

So - yes, this is broken for any updates between versions that have MeshSequenceCache applied (any pointcaches that have vertex deformations, e.g. skinned characters).

But the issue is much bigger than that:

  1. The error here is on updating the MeshSequenceCache modifiers on meshes:
    image

The error is that it's trying to add the modifier also to e.g. Empties - but there the modifier can't be created and returns None. We can skip that to "fix" the error, but that doesn't solve the updating of pointcaches.

  1. We're not applying/removing TransformCache connections on updates:
    image

  2. We're not updating transforms or shapes for NON-animated meshes on updates. Those do not have the modifiers nor the constraints so are not updated through a 'live link' - meaning that those are NOT updated if the transforms or meshes have changed since last version update. We should.

  3. (Nice-to-have): Likely we'll want to make sure when adding/updating modifiers/constraints that we preserve them in the modifier/constraint stack so any local changes aside of that are maintained.

  4. We're not adding/removing empties or meshes that are removed or added between pointcache versions - hence, we're not updating those correctly either.

So basically we're not correctly updating all the data that may change between pointcache versions.

@LiborBatek
Copy link
Member Author

Is there a way to fix the bare minimum atm (e.g. to not care about those non deformed meshes and empties but the deformed only)

I can imagine it might work in 85% scenarios and if not user could swipe the version present and bring fresh new instead.

@LiborBatek
Copy link
Member Author

@moonyuet or maybe you could be involved in this as well :)

@moonyuet
Copy link
Member

moonyuet commented Sep 30, 2024

@moonyuet or maybe you could be involved in this as well :)

I tested in my side just now, I can't really replicate the issue you mentioned but rather updating the object path issue. Guess the short-term fix can be checking on the bpy.data.cache_file issue first and get the correct file. But we definitely need some long-term solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants