ynput / ayon-houdini

Houdini addon for AYON
Apache License 2.0
6 stars 2 forks source link

Load Asset LOP: Representation does not update when saving to another context #32

Open BigRoy opened 1 week ago

BigRoy commented 1 week ago

Is there an existing issue for this?

Current Behavior:

When the AYON Load Asset LOP is set to load using e.g. folder path $AYON_FOLDER_PATH then upon change of that Houdini variable the 'parameter changed' callback does not seem to trigger for the HDA and thus the representation ID remains the old value - which seems counter-intuitive.

image

Expected Behavior:

On change of one of the variables, like $AYON_FOLDER_PATH preferably we're able to respond to that change and then re-evaluate the loaded representation id.

Version

1.0.0

What platform you are running on?

Windows

Steps To Reproduce:

  1. Load using Load Asset LOP
  2. Save scene to another context.
  3. Load asset lop is not updated to new context.

Are there any labels you wish to add?

Relevant log output:

No response

Additional context:

No response

MustafaJafar commented 1 week ago

I think the source of the problem is the representation name. we should update the representation name before calling get_representation_id

https://github.com/ynput/ayon-houdini/blob/701d46ce94f79955519ff262f250369785a7ccc4/client/ayon_houdini/api/hda_utils.py#L281

image

So, I have to change it manually, in order to continue the execution flow as expected. image