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

Open latest workfile #8

Open
2 tasks done
johhnry opened this issue Oct 23, 2024 · 4 comments · May be fixed by #11
Open
2 tasks done

Open latest workfile #8

johhnry opened this issue Oct 23, 2024 · 4 comments · May be fixed by #11
Labels
type: enhancement Improvement of existing functionality or minor addition

Comments

@johhnry
Copy link

johhnry commented Oct 23, 2024

Is there an existing issue for this?

  • I have searched the existing issues.

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?

  • I have added the relevant labels to the enhancement request.

Describe alternatives you've considered:

No response

Additional context:

No response

@BigRoy
Copy link

BigRoy commented Oct 23, 2024

@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

@BigRoy BigRoy added the type: enhancement Improvement of existing functionality or minor addition label Oct 23, 2024
@johhnry
Copy link
Author

johhnry commented Oct 23, 2024

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

  • -open - open specified project file on startup. so we could do 3DE4.exe -open file.3de
  • -run_script - run specified python script file on startup. and open the latest workfile with AYON_LAST_WORKFILE if it exists

@BigRoy
Copy link

BigRoy commented Oct 23, 2024

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
Copy link
Author

johhnry commented Oct 23, 2024

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

@johhnry johhnry linked a pull request Nov 4, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement Improvement of existing functionality or minor addition
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants