ynput / ayon-fusion

Fusion integration for AYON
Apache License 2.0
2 stars 2 forks source link

AY-1292_Fusion Context Switching Bug #15

Open ynbot opened 2 months ago

ynbot commented 2 months ago

Please describe the issue you have acountered?

: Fusion Context Switching Bug : Heya, <@> so found a very specific Fusion Bug. Here are the steps to recreate the fusion bug. 1) Launch Fusion with Task A. 2) Open Fusion Menu and switch to a different context by using workfiles saving to save into Task B. 3) The Fusion Menu reflects the change in context and is now pointing to Task B. 4) Close The Fusion Menu. Reopen the fusion menu. 5) Fusion menu now is showing the Task A context. It seems to remember the context Fusion was launched in instead of the current fusion context.

How to replicate the issue?

No response

Additional context:

link to discussion on Discord (might be a private channel)

This issue was automatically created from Clickup ticket AY-1292

BigRoy commented 2 months ago

Unfortunately this is the case, and I haven't found a 'decent' way around this.

Basically Python scripts launched for Fusion launch into its own Python interpreter, each time, as separate "fuscript" executions. They are completely isolated from Fusion itself - which means even if we persist some environment variables or context changes, those do not persist in the upstream Fusion.

Whatever capabilities we have to store metadata into e.g. the Fusion process or the current comp unfortunately gets saved into the files - I have found no "runtime metadata" just for the current Fusion session.

Which leaves, potentially, the only remaining workaround - somehow get the process id or uuid of the actual Fusion the scripts run against - and use that to detect a temp file on disk that we use to store the context of that fusion - regardless of the Python process starting.

I've never found anything better for Fusion.