Skip to content

Make it work with Maya 2022/Python 3 #76

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
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
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
3 changes: 2 additions & 1 deletion capture_gui/lib.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import subprocess
import contextlib
from collections import OrderedDict
from builtins import int

import datetime
import maya.cmds as cmds
Expand Down Expand Up @@ -391,4 +392,4 @@ def get_maya_main_window():
"""
ptr = omui.MQtUtil.mainWindow()
if ptr is not None:
return shiboken.wrapInstance(long(ptr), QtWidgets.QWidget)
return shiboken.wrapInstance(int(ptr), QtWidgets.QWidget)
5 changes: 4 additions & 1 deletion capture_gui/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,10 @@ def discover(paths=None):
module.__file__ = abspath

try:
execfile(abspath, module.__dict__)
try:
execfile(abspath, module.__dict__)
except NameError:
exec(open(abspath).read(), module.__dict__)

# Store reference to original module, to avoid
# garbage collection from collecting it's global
Expand Down
Loading