OpenPype
OpenPype copied to clipboard
Resolve: Match folder structure to other hosts
Brief description
Make sure that code related to in-DCC logic is not imported in main host directory. This change gives ability to have resolve as module which is not possible at the moment.
Description
Changed all import to point directly to function locations or to openpype.hosts.resolve.api
instead of openpype.hosts.resolve
. Moved setup
function from in-DCC functions to public code because is used in prelaunch hook.
Additional info
I don't have resolve so all changes are made blindly, please report any issues. Current structure would block development of some features thus this changes are needed to move on.
There is a lot of script files that seems to be duplicated or not used, we should consider remove those unused.
Testing notes:
- Resolve should work at least the same as before this PR
Resolves https://github.com/pypeclub/OpenPype/issues/3406
I would love to check, but I am not able to make the Resolve work. Attempt to run Openpype_Menu script stops at importing OTIO:
from opentimelineio import opentime
File "C:\Users\robur\OpenPype\.venv\Lib\site-packages\opentimelineio\__init__.py", line 35, in <module>
from . import (
File "C:\Users\robur\OpenPype\.venv\Lib\site-packages\opentimelineio\opentime.py", line 1, in <module>
from . _opentime import ( # noqa
ModuleNotFoundError: No module named 'opentimelineio._opentime'
Resolve 17.4.6 build 4 Python 3.6 Windows 10
I would love to check, but I am not able to make the Resolve work. Attempt to run Openpype_Menu script stops at importing OTIO:
from opentimelineio import opentime File "C:\Users\robur\OpenPype\.venv\Lib\site-packages\opentimelineio\__init__.py", line 35, in <module> from . import ( File "C:\Users\robur\OpenPype\.venv\Lib\site-packages\opentimelineio\opentime.py", line 1, in <module> from . _opentime import ( # noqa ModuleNotFoundError: No module named 'opentimelineio._opentime'
Resolve 17.4.6 build 4 Python 3.6 Windows 10
You have to install OpenTimelineIO separately into p3.6. The process should be explained in documentation I believe.
@iLLiCiTiT please also fix the pep8 before the merge ;)
please also fix the pep8 before the merge ;)
I can't. It's because the imports are after definition of bmdvr
and bmdvf
, but they must be defined before those imports because are replaced during that time. To fix it I would have to move those global variables elsewhere and change all related imports.