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

QT bind issue fixed for Katana when Renderman plugin loaded. #99

Merged
merged 1 commit into from
Apr 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions docs/source/installation/katana.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,27 @@ Katana Integration

.. tip::

In Windows, it usually is ``%userprofile%/.katana``
In Windows, it is under ``%userprofile%/.katana``

2. If it is not already exists, create `init.py` in startup folder and add the following lines:

::

# Tik Manager 4 [Start]
import sys
import os
tik_path = "PATH/TO/PARENT/FOLDER/OF/TIKMANAGER4/"
if not tik_path in sys.path:
sys.path.append(tik_path)
os.environ["QT_PREFERRED_BINDING_JSON"] = '{"tik_manager4.ui.Qt": ["PyQt5"], "default":["PyQt5"]}'
# Tik Manager 4 [End]

3. Replace ``PATH/TO/PARENT/FOLDER/OF/TIKMANAGER4/`` with the path of where the PARENT of tik_manager folder is. Use forward slashes between folder names.

.. attention::
The Path MUST be the parent of the tik_manager4 folder. If you extracted the contents directly from the zip file it will be something like ``tik_manager4-4.0.1-alpha``.

4. In the same startup directory, locate the `shelves` folder and copy the entire `/tik_manager4/dcc/katana/setup/shelves` folder to the `shelves` folder.
4. In the same startup directory, locate the `shelves` folder and copy the entire `/tik_manager4/dcc/katana/setup/tik4` folder to the `shelves` folder.

5. (Optional) To get the icons to show up in the shelf, you can edit the all shelf files (`main_ui.py`, `new_version.py`, `publish.py`) and replace the icon paths with the correct paths. Simply replace `PATH/TO/PARENT/FOLDER/OF/TIKMANAGER4` parts with the physical path of the parent folder of tik_manager4.

Expand Down
2 changes: 2 additions & 0 deletions tik_manager4/dcc/dcc_install.py
Original file line number Diff line number Diff line change
Expand Up @@ -468,9 +468,11 @@ def katana_setup(self, prompt=True):
init_content = [
"# Tik Manager 4 [Start]\n",
"import sys\n",
"import os\n",
f"tik_path = '{self.tik_root.parent.as_posix()}'\n",
"if not tik_path in sys.path:\n",
" sys.path.append(tik_path)\n",
"""os.environ["QT_PREFERRED_BINDING_JSON"] = '{"tik_manager4.ui.Qt": ["PyQt5"], "default":["PyQt5"]}'\n"""
"# Tik Manager 4 [End]\n"
]

Expand Down
1 change: 0 additions & 1 deletion tik_manager4/dcc/katana/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import logging

# from PyQt5 import QtWidgets, QtGui, QtCore
from tik_manager4.ui.Qt import QtWidgets, QtGui, QtCore
import Katana
from Katana import KatanaFile # pylint: disable=import-error
Expand Down
6 changes: 4 additions & 2 deletions tik_manager4/dcc/katana/setup/how-to-install.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,27 @@ Katana Integration

.. tip::

In Windows, it usually is ``%userprofile%/.katana``
In Windows, it is under ``%userprofile%/.katana``

2. If it is not already exists, create `init.py` in startup folder and add the following lines:

::

# Tik Manager 4 [Start]
import sys
import os
tik_path = "PATH/TO/PARENT/FOLDER/OF/TIKMANAGER4/"
if not tik_path in sys.path:
sys.path.append(tik_path)
os.environ["QT_PREFERRED_BINDING_JSON"] = '{"tik_manager4.ui.Qt": ["PyQt5"], "default":["PyQt5"]}'
# Tik Manager 4 [End]

3. Replace ``PATH/TO/PARENT/FOLDER/OF/TIKMANAGER4/`` with the path of where the PARENT of tik_manager folder is. Use forward slashes between folder names.

.. attention::
The Path MUST be the parent of the tik_manager4 folder. If you extracted the contents directly from the zip file it will be something like ``tik_manager4-4.0.1-alpha``.

4. In the same startup directory, locate the `shelves` folder and copy the entire `/tik_manager4/dcc/katana/setup/tik4` folder into the `shelves` folder.
4. In the same startup directory, locate the `shelves` folder and copy the entire `/tik_manager4/dcc/katana/setup/tik4` folder to the `shelves` folder.

5. (Optional) To get the icons to show up in the shelf, you can edit the all shelf files (`main_ui.py`, `new_version.py`, `publish.py`) and replace the icon paths with the correct paths. Simply replace `PATH/TO/PARENT/FOLDER/OF/TIKMANAGER4` parts with the physical path of the parent folder of tik_manager4.

Expand Down
Loading