ynput / ayon-blender

Blender addon for AYON
Apache License 2.0
7 stars 2 forks source link

Blender: Load pointcache loses transformation on top group/empty #2

Closed BigRoy closed 2 months ago

BigRoy commented 5 months ago

Is there an existing issue for this?

Current Behavior:

This logic here makes it so that the objects are re-parented to an 'asset group' but also make it so that any transformation on the loaded top group is lost.

Expected Behavior:

Data should not be lost, and preferably any transform or data in the published output is retained on load.

Version

1.0.0

What platform you are running on?

Windows

Steps To Reproduce:

  1. Create scene with cube
  2. Parent the cube to an empty
  3. Move the empty that has the cube as child.
  4. Publish the empty as a pointcacheMain
  5. Load the pointcache

Now the transformation is lost on load.

Are there any labels you wish to add?

Relevant log output:

No response

Additional context:

No response

BigRoy commented 5 months ago

@LiborBatek can you confirm. @simonebarbieri is there any reason to have load work this way?

LiborBatek commented 5 months ago

@BigRoy yes, its breaking the transforms if the asset got version update via manage tool.

There is a way to not scratch the alembic asset completely when changing version via changing just the file path leading to the abc file instead within the pointcache modifier. Something which we have discussed it would make much more sense but never happened.

I could give more info or record some vid describing the issue if anyone interested...

LiborBatek commented 5 months ago

@BigRoy hmm, reading the issue again Im not sure if this PR refers to loosing any local transform edits on the loaded asset when updated version later on or something else?

...as Im refering to this particular issue

BigRoy commented 5 months ago

reading the issue again Im not sure if this PR refers to loosing any local transform edits on the loaded asset when updated version later on or something else?

The issue is the fact that the TOP groups/empties lose their transformation on load because the load logic seems to replace that top transform/empty with another one (the asset group) instead of parenting to the asset group. So basically the top empty data is lost.