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

Moves Sync dialog outside of Unreal #2

Conversation

kalisp
Copy link
Member

@kalisp kalisp commented Apr 12, 2024

New hook is created to show blocking dialog to sync specific change list before Unreal will launched.

It is expected that Perforce workspace is created/set and first version of Unreal project is synced (as discussed previously).

(Version-control logic was removed from ayon-core hook, Sync To button was removed from Unreal Ayon menu.)

Requires:

kalisp added 2 commits April 12, 2024 13:23
Allows artists to synch to specific change list before Unreal is launched.
@kalisp kalisp changed the title Fix import Moves Sync dialog outside of Unreal Apr 12, 2024
Copy link
Member

@antirotor antirotor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It cannot be easily tested without solving this:

def get_current_project_name(self):
return "ayon_test" # TEMP!!!
if self._current_project is None:
self._current_project = self.get_current_context()["project_name"]
return self._current_project

@antirotor
Copy link
Member

I think we should move it outside the pre-launch hook - to subprocess at least. Having it in pre-launch hook is troublesome because maybe in the future, we will need to run unreal headlessly for example.

antirotor and others added 5 commits April 29, 2024 16:53
Launch context data must be passed to the Viewer to query connection info properly.
…_viewer-out-of-Unreal-before-launching' into enhancement/AY-4970_Move-changes_viewer-out-of-Unreal-before-launching
@kalisp
Copy link
Member Author

kalisp commented Apr 30, 2024

It cannot be easily tested without solving this:

def get_current_project_name(self):
return "ayon_test" # TEMP!!!
if self._current_project is None:
self._current_project = self.get_current_context()["project_name"]
return self._current_project

Fixed.

Disables Sync button when synchronizing.
Cleaned up model, introduced proxy for integer sorting.
@kalisp kalisp requested a review from antirotor April 30, 2024 13:57
@kalisp
Copy link
Member Author

kalisp commented Apr 30, 2024

I think we should move it outside the pre-launch hook - to subprocess at least. Having it in pre-launch hook is troublesome because maybe in the future, we will need to run unreal headlessly for example.

This feature should be blocking, syncing needs to be done before Unreal editor start. Syncing on Deadline is being handled elsewhere.

Copied from OP which used MongoDB
@kalisp kalisp marked this pull request as draft May 23, 2024 13:44
kalisp added 5 commits May 27, 2024 16:00
Missed updates because of ayon-core:0.3.0
Shouldn't be imported in DCC
This shouldn't be dependent on any backend to limit cross imports of backend libraries.
@antirotor
Copy link
Member

not sure if this shouldl be addressed in this PR, but dumping it here anyway:

image

when you clikc "sync to" button, there is no visual feedback whatsoever - only log in the console if you have it opened. It has the feeling that it doesn't work where it in fact works. Should it (after successful sync) continue to Unreal?

@antirotor antirotor assigned kalisp and unassigned antirotor Jun 5, 2024
@kalisp kalisp marked this pull request as ready for review June 14, 2024 08:53
@kalisp kalisp assigned antirotor and unassigned kalisp Jun 19, 2024
Copy link
Member

@antirotor antirotor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just one typo and comment about product name, can be dismissed if not relevant. Otherwise it works.

client/version_control/addon.py Outdated Show resolved Hide resolved
@antirotor
Copy link
Member

Also - something was lost in the repository transfer. This states that it needs ynput/ayon-core#183 that was closed and replaced by ynput/ayon-core#670 that was closed yet again in favour of ynput/ayon-deadline#1 but I think something in 'ayon_core.modules.webserver` was changed, because it doesn't work with the latest develop version of ynput/ayon-core

Pretty hefty traceback at the start of ayon-launcher
WARNING:TrayAddonsManager:Addon "version_control" crashed on `tray_start`.
Traceback (most recent call last):
  File "C:\Users\annat\Documents\Projects\Ayon\ayon-core\client\ayon_core\tools\tray\addons_manager.py", line 202, in start_addons
    addon.tray_start()
  File "C:\Users\annat\Documents\Projects\Ayon\ayon-version-control\client\version_control\addon.py", line 108, in tray_start
    from version_control.rest.communication_server import WebServer
  File "C:\Users\annat\Documents\Projects\Ayon\ayon-launcher\vendor\python\shiboken2\files.dir\shibokensupport\__feature__.py", line 142, in _import
    return original_import(name, *args, **kwargs)
  File "C:\Users\annat\Documents\Projects\Ayon\ayon-version-control\client\version_control\rest\communication_server.py", line 10, in 
    from version_control.rest.perforce.rest_api import PerforceModuleRestAPI
  File "C:\Users\annat\Documents\Projects\Ayon\ayon-launcher\vendor\python\shiboken2\files.dir\shibokensupport\__feature__.py", line 142, in _import
    return original_import(name, *args, **kwargs)
  File "C:\Users\annat\Documents\Projects\Ayon\ayon-version-control\client\version_control\rest\perforce\rest_api.py", line 4, in 
    from version_control.backends.perforce import rest_routes
  File "C:\Users\annat\Documents\Projects\Ayon\ayon-launcher\vendor\python\shiboken2\files.dir\shibokensupport\__feature__.py", line 142, in _import
    return original_import(name, *args, **kwargs)
  File "C:\Users\annat\Documents\Projects\Ayon\ayon-version-control\client\version_control\backends\perforce\__init__.py", line 38, in __getattr__
    return importlib.import_module(f"{__package__}.{name}")
  File "C:\Users\annat\.pyenv\pyenv-win\versions\3.9.13\lib\importlib\__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "C:\Users\annat\Documents\Projects\Ayon\ayon-version-control\client\version_control\backends\perforce\rest_routes.py", line 7, in 
    from ayon_core.modules.webserver.base_routes import RestApiEndpoint
  File "C:\Users\annat\Documents\Projects\Ayon\ayon-launcher\vendor\python\shiboken2\files.dir\shibokensupport\__feature__.py", line 142, in _import
    return original_import(name, *args, **kwargs)
ModuleNotFoundError: No module named 'ayon_core.modules.webserver.base_routes'

@antirotor antirotor added the type: enhancement Improvement of existing functionality or minor addition label Jul 24, 2024
@kalisp
Copy link
Member Author

kalisp commented Jul 31, 2024

Also - something was lost in the repository transfer. This states that it needs ynput/ayon-core#183 that was closed and replaced by ynput/ayon-core#670 that was closed yet again in favour of ynput/ayon-deadline#1 but I think something in 'ayon_core.modules.webserver` was changed, because it doesn't work with the latest develop version of ynput/ayon-core

Pretty hefty traceback at the start of ayon-launcher

Updated imports.

@kalisp kalisp requested a review from antirotor July 31, 2024 09:38
Publisher expects only 'task'
Copy link
Member

@antirotor antirotor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

works, thanks!

@antirotor antirotor merged commit 0cb42f2 into develop Aug 7, 2024
@antirotor antirotor deleted the enhancement/AY-4970_Move-changes_viewer-out-of-Unreal-before-launching branch August 7, 2024 09:14
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
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants