ynput / ayon-equalizer

AYON Integration for 3DEqualizer4 from Science-D-Vision
Apache License 2.0
0 stars 1 forks source link

Open latest workfile #8

Open johhnry opened 1 week ago

johhnry commented 1 week ago

Is there an existing issue for this?

Please describe the feature you have in mind and explain what the current shortcomings are?

It would be nice to open the latest workfile when launching 3DE from the Launcher.

How would you imagine the implementation of the feature?

Do the same as Maya, Houdini, Nuke etc...

Like in Maya, using the AYON_LAST_WORKFILE env variable:

https://github.com/ynput/ayon-maya/blob/265d1d8c38113043518cb5c0a1924dd5b3dca8de/client/ayon_maya/startup/userSetup.py#L41

Are there any labels you wish to add?

Describe alternatives you've considered:

No response

Additional context:

No response

BigRoy commented 1 week ago

@johhnry Question - if you pass the filename as an argument to 3DE? Does it auto-open it?

If so, it'd be a matter of adding the 3d equalizer app group into this list in ayon-core: https://github.com/ynput/ayon-core/blob/develop/client/ayon_core/hooks/pre_add_last_workfile_arg.py#L16-L33

johhnry commented 1 week ago

@BigRoy 3DE has two options that we can use to specify the workfile to load:

BigRoy commented 1 week ago

I see - then we must add similar functionality as that hook in core, but add the hook here in ayon-equalizer because it'll be equalizer specific.

And change the last line to:

        self.launch_context.launch_args.extend(["-open", last_workfile])

When copying the hook to this repo, make sure to give it a unique class name. Then test run it (you may need to restart the launcher)

johhnry commented 1 week ago

Nice, I'll do a PR then thanks for pointing me in the right direction!