Merge remote-tracking branch 'origin/develop' into bugfix/houdini-publisher-fixes

This commit is contained in:
Ondrej Samohel 2022-12-16 16:35:28 +01:00
commit afedd87f68
No known key found for this signature in database
GPG key ID: 02376E18990A97C6
90 changed files with 372 additions and 158 deletions

View file

@ -1,5 +1,73 @@
# Changelog
## [3.14.9](https://github.com/pypeclub/OpenPype/tree/3.14.9)
[Full Changelog](https://github.com/pypeclub/OpenPype/compare/3.14.8...3.14.9)
### 📖 Documentation
- Documentation: Testing on Deadline [\#4185](https://github.com/pypeclub/OpenPype/pull/4185)
- Consistent Python version [\#4160](https://github.com/pypeclub/OpenPype/pull/4160)
**🆕 New features**
- Feature/op 4397 gl tf extractor for maya [\#4192](https://github.com/pypeclub/OpenPype/pull/4192)
- Maya: Extractor for Unreal SkeletalMesh [\#4174](https://github.com/pypeclub/OpenPype/pull/4174)
- 3dsmax: integration [\#4168](https://github.com/pypeclub/OpenPype/pull/4168)
- Blender: Extract Alembic Animations [\#4128](https://github.com/pypeclub/OpenPype/pull/4128)
- Unreal: Load Alembic Animations [\#4127](https://github.com/pypeclub/OpenPype/pull/4127)
**🚀 Enhancements**
- Houdini: Use new interface class name for publish host [\#4220](https://github.com/pypeclub/OpenPype/pull/4220)
- General: Default command for headless mode is interactive [\#4203](https://github.com/pypeclub/OpenPype/pull/4203)
- Maya: Enhanced ASS publishing [\#4196](https://github.com/pypeclub/OpenPype/pull/4196)
- Feature/op 3924 implement ass extractor [\#4188](https://github.com/pypeclub/OpenPype/pull/4188)
- File transactions: Source path is destination path [\#4184](https://github.com/pypeclub/OpenPype/pull/4184)
- Deadline: improve environment processing [\#4182](https://github.com/pypeclub/OpenPype/pull/4182)
- General: Comment per instance in Publisher [\#4178](https://github.com/pypeclub/OpenPype/pull/4178)
- Ensure Mongo database directory exists in Windows. [\#4166](https://github.com/pypeclub/OpenPype/pull/4166)
- Note about unrestricted execution on Windows. [\#4161](https://github.com/pypeclub/OpenPype/pull/4161)
- Maya: Enable thumbnail transparency on extraction. [\#4147](https://github.com/pypeclub/OpenPype/pull/4147)
- Maya: Disable viewport Pan/Zoom on playblast extraction. [\#4146](https://github.com/pypeclub/OpenPype/pull/4146)
- Maya: Optional viewport refresh on pointcache extraction [\#4144](https://github.com/pypeclub/OpenPype/pull/4144)
- CelAction: refactory integration to current openpype [\#4140](https://github.com/pypeclub/OpenPype/pull/4140)
- Maya: create and publish bounding box geometry [\#4131](https://github.com/pypeclub/OpenPype/pull/4131)
- Changed the UOpenPypePublishInstance to use the UDataAsset class [\#4124](https://github.com/pypeclub/OpenPype/pull/4124)
- General: Collection Audio speed up [\#4110](https://github.com/pypeclub/OpenPype/pull/4110)
- Maya: keep existing AOVs when creating render instance [\#4087](https://github.com/pypeclub/OpenPype/pull/4087)
- General: Oiio conversion multipart fix [\#4060](https://github.com/pypeclub/OpenPype/pull/4060)
**🐛 Bug fixes**
- Publisher: Signal type issues in Python 2 DCCs [\#4230](https://github.com/pypeclub/OpenPype/pull/4230)
- Blender: Fix Layout Family Versioning [\#4228](https://github.com/pypeclub/OpenPype/pull/4228)
- Blender: Fix Create Camera "Use selection" [\#4226](https://github.com/pypeclub/OpenPype/pull/4226)
- TrayPublisher - join needs list [\#4224](https://github.com/pypeclub/OpenPype/pull/4224)
- General: Event callbacks pass event to callbacks as expected [\#4210](https://github.com/pypeclub/OpenPype/pull/4210)
- Build:Revert .toml update of Gazu [\#4207](https://github.com/pypeclub/OpenPype/pull/4207)
- Nuke: fixed imageio node overrides subset filter [\#4202](https://github.com/pypeclub/OpenPype/pull/4202)
- Maya: pointcache [\#4201](https://github.com/pypeclub/OpenPype/pull/4201)
- Unreal: Support for Unreal Engine 5.1 [\#4199](https://github.com/pypeclub/OpenPype/pull/4199)
- General: Integrate thumbnail looks for thumbnail to multiple places [\#4181](https://github.com/pypeclub/OpenPype/pull/4181)
- Various minor bugfixes [\#4172](https://github.com/pypeclub/OpenPype/pull/4172)
- Nuke/Hiero: Remove tkinter library paths before launch [\#4171](https://github.com/pypeclub/OpenPype/pull/4171)
- Flame: vertical alignment of layers [\#4169](https://github.com/pypeclub/OpenPype/pull/4169)
- Nuke: correct detection of viewer and display [\#4165](https://github.com/pypeclub/OpenPype/pull/4165)
- Settings UI: Don't create QApplication if already exists [\#4156](https://github.com/pypeclub/OpenPype/pull/4156)
- General: Extract review handle start offset of sequences [\#4152](https://github.com/pypeclub/OpenPype/pull/4152)
- Maya: Maintain time connections on Alembic update. [\#4143](https://github.com/pypeclub/OpenPype/pull/4143)
**🔀 Refactored code**
- General: Use qtpy in modules and hosts UIs which are running in OpenPype process [\#4225](https://github.com/pypeclub/OpenPype/pull/4225)
- Tools: Use qtpy instead of Qt in standalone tools [\#4223](https://github.com/pypeclub/OpenPype/pull/4223)
- General: Use qtpy in settings UI [\#4215](https://github.com/pypeclub/OpenPype/pull/4215)
**Merged pull requests:**
- layout publish more than one container issue [\#4098](https://github.com/pypeclub/OpenPype/pull/4098)
## [3.14.8](https://github.com/pypeclub/OpenPype/tree/3.14.8)
[Full Changelog](https://github.com/pypeclub/OpenPype/compare/3.14.7...3.14.8)
@ -21,7 +89,6 @@
- Maya: Looks - add all connections [\#4135](https://github.com/pypeclub/OpenPype/pull/4135)
- General: Fix variable check in collect anatomy instance data [\#4117](https://github.com/pypeclub/OpenPype/pull/4117)
## [3.14.7](https://github.com/pypeclub/OpenPype/tree/3.14.7)
[Full Changelog](https://github.com/pypeclub/OpenPype/compare/3.14.6...3.14.7)

View file

@ -1,5 +1,74 @@
# Changelog
## [3.14.9](https://github.com/pypeclub/OpenPype/tree/3.14.9)
[Full Changelog](https://github.com/pypeclub/OpenPype/compare/3.14.8...3.14.9)
### 📖 Documentation
- Documentation: Testing on Deadline [\#4185](https://github.com/pypeclub/OpenPype/pull/4185)
- Consistent Python version [\#4160](https://github.com/pypeclub/OpenPype/pull/4160)
**🆕 New features**
- Feature/op 4397 gl tf extractor for maya [\#4192](https://github.com/pypeclub/OpenPype/pull/4192)
- Maya: Extractor for Unreal SkeletalMesh [\#4174](https://github.com/pypeclub/OpenPype/pull/4174)
- 3dsmax: integration [\#4168](https://github.com/pypeclub/OpenPype/pull/4168)
- Blender: Extract Alembic Animations [\#4128](https://github.com/pypeclub/OpenPype/pull/4128)
- Unreal: Load Alembic Animations [\#4127](https://github.com/pypeclub/OpenPype/pull/4127)
**🚀 Enhancements**
- Houdini: Use new interface class name for publish host [\#4220](https://github.com/pypeclub/OpenPype/pull/4220)
- General: Default command for headless mode is interactive [\#4203](https://github.com/pypeclub/OpenPype/pull/4203)
- Maya: Enhanced ASS publishing [\#4196](https://github.com/pypeclub/OpenPype/pull/4196)
- Feature/op 3924 implement ass extractor [\#4188](https://github.com/pypeclub/OpenPype/pull/4188)
- File transactions: Source path is destination path [\#4184](https://github.com/pypeclub/OpenPype/pull/4184)
- Deadline: improve environment processing [\#4182](https://github.com/pypeclub/OpenPype/pull/4182)
- General: Comment per instance in Publisher [\#4178](https://github.com/pypeclub/OpenPype/pull/4178)
- Ensure Mongo database directory exists in Windows. [\#4166](https://github.com/pypeclub/OpenPype/pull/4166)
- Note about unrestricted execution on Windows. [\#4161](https://github.com/pypeclub/OpenPype/pull/4161)
- Maya: Enable thumbnail transparency on extraction. [\#4147](https://github.com/pypeclub/OpenPype/pull/4147)
- Maya: Disable viewport Pan/Zoom on playblast extraction. [\#4146](https://github.com/pypeclub/OpenPype/pull/4146)
- Maya: Optional viewport refresh on pointcache extraction [\#4144](https://github.com/pypeclub/OpenPype/pull/4144)
- CelAction: refactory integration to current openpype [\#4140](https://github.com/pypeclub/OpenPype/pull/4140)
- Maya: create and publish bounding box geometry [\#4131](https://github.com/pypeclub/OpenPype/pull/4131)
- Changed the UOpenPypePublishInstance to use the UDataAsset class [\#4124](https://github.com/pypeclub/OpenPype/pull/4124)
- General: Collection Audio speed up [\#4110](https://github.com/pypeclub/OpenPype/pull/4110)
- Maya: keep existing AOVs when creating render instance [\#4087](https://github.com/pypeclub/OpenPype/pull/4087)
- General: Oiio conversion multipart fix [\#4060](https://github.com/pypeclub/OpenPype/pull/4060)
**🐛 Bug fixes**
- Publisher: Signal type issues in Python 2 DCCs [\#4230](https://github.com/pypeclub/OpenPype/pull/4230)
- Blender: Fix Layout Family Versioning [\#4228](https://github.com/pypeclub/OpenPype/pull/4228)
- Blender: Fix Create Camera "Use selection" [\#4226](https://github.com/pypeclub/OpenPype/pull/4226)
- TrayPublisher - join needs list [\#4224](https://github.com/pypeclub/OpenPype/pull/4224)
- General: Event callbacks pass event to callbacks as expected [\#4210](https://github.com/pypeclub/OpenPype/pull/4210)
- Build:Revert .toml update of Gazu [\#4207](https://github.com/pypeclub/OpenPype/pull/4207)
- Nuke: fixed imageio node overrides subset filter [\#4202](https://github.com/pypeclub/OpenPype/pull/4202)
- Maya: pointcache [\#4201](https://github.com/pypeclub/OpenPype/pull/4201)
- Unreal: Support for Unreal Engine 5.1 [\#4199](https://github.com/pypeclub/OpenPype/pull/4199)
- General: Integrate thumbnail looks for thumbnail to multiple places [\#4181](https://github.com/pypeclub/OpenPype/pull/4181)
- Various minor bugfixes [\#4172](https://github.com/pypeclub/OpenPype/pull/4172)
- Nuke/Hiero: Remove tkinter library paths before launch [\#4171](https://github.com/pypeclub/OpenPype/pull/4171)
- Flame: vertical alignment of layers [\#4169](https://github.com/pypeclub/OpenPype/pull/4169)
- Nuke: correct detection of viewer and display [\#4165](https://github.com/pypeclub/OpenPype/pull/4165)
- Settings UI: Don't create QApplication if already exists [\#4156](https://github.com/pypeclub/OpenPype/pull/4156)
- General: Extract review handle start offset of sequences [\#4152](https://github.com/pypeclub/OpenPype/pull/4152)
- Maya: Maintain time connections on Alembic update. [\#4143](https://github.com/pypeclub/OpenPype/pull/4143)
**🔀 Refactored code**
- General: Use qtpy in modules and hosts UIs which are running in OpenPype process [\#4225](https://github.com/pypeclub/OpenPype/pull/4225)
- Tools: Use qtpy instead of Qt in standalone tools [\#4223](https://github.com/pypeclub/OpenPype/pull/4223)
- General: Use qtpy in settings UI [\#4215](https://github.com/pypeclub/OpenPype/pull/4215)
**Merged pull requests:**
- layout publish more than one container issue [\#4098](https://github.com/pypeclub/OpenPype/pull/4098)
## [3.14.8](https://github.com/pypeclub/OpenPype/tree/3.14.8)
[Full Changelog](https://github.com/pypeclub/OpenPype/compare/3.14.7...3.14.8)

View file

@ -10,7 +10,7 @@ from wsrpc_aiohttp import (
WebSocketAsync
)
from Qt import QtCore
from qtpy import QtCore
from openpype.lib import Logger
from openpype.pipeline import legacy_io

View file

@ -7,7 +7,7 @@ import traceback
import logging
from functools import partial
from Qt import QtWidgets
from qtpy import QtWidgets
from openpype.pipeline import install_host
from openpype.modules import ModulesManager

View file

@ -1,6 +1,6 @@
import os
from Qt import QtWidgets
from qtpy import QtWidgets
import pyblish.api

View file

@ -10,7 +10,7 @@ from pathlib import Path
from types import ModuleType
from typing import Dict, List, Optional, Union
from Qt import QtWidgets, QtCore
from qtpy import QtWidgets, QtCore
import bpy
import bpy.utils.previews

View file

@ -48,8 +48,14 @@ class BlendLayoutLoader(plugin.AssetLoader):
bpy.data.objects.remove(obj)
def _remove_asset_and_library(self, asset_group):
if not asset_group.get(AVALON_PROPERTY):
return
libpath = asset_group.get(AVALON_PROPERTY).get('libpath')
if not libpath:
return
# Check how many assets use the same library
count = 0
for obj in bpy.data.collections.get(AVALON_CONTAINERS).all_objects:
@ -63,10 +69,12 @@ class BlendLayoutLoader(plugin.AssetLoader):
# If it is the last object to use that library, remove it
if count == 1:
library = bpy.data.libraries.get(bpy.path.basename(libpath))
bpy.data.libraries.remove(library)
if library:
bpy.data.libraries.remove(library)
def _process(
self, libpath, asset_group, group_name, asset, representation, actions
self, libpath, asset_group, group_name, asset, representation,
actions, anim_instances
):
with bpy.data.libraries.load(
libpath, link=True, relative=False
@ -140,12 +148,12 @@ class BlendLayoutLoader(plugin.AssetLoader):
elif local_obj.type == 'ARMATURE':
plugin.prepare_data(local_obj.data)
if action is not None:
if action:
if local_obj.animation_data is None:
local_obj.animation_data_create()
local_obj.animation_data.action = action
elif (local_obj.animation_data and
local_obj.animation_data.action is not None):
local_obj.animation_data.action):
plugin.prepare_data(
local_obj.animation_data.action)
@ -157,19 +165,26 @@ class BlendLayoutLoader(plugin.AssetLoader):
t.id = local_obj
elif local_obj.type == 'EMPTY':
creator_plugin = get_legacy_creator_by_name("CreateAnimation")
if not creator_plugin:
raise ValueError("Creator plugin \"CreateAnimation\" was "
"not found.")
if (not anim_instances or
(anim_instances and
local_obj.name not in anim_instances.keys())):
avalon = local_obj.get(AVALON_PROPERTY)
if avalon and avalon.get('family') == 'rig':
creator_plugin = get_legacy_creator_by_name(
"CreateAnimation")
if not creator_plugin:
raise ValueError(
"Creator plugin \"CreateAnimation\" was "
"not found.")
legacy_create(
creator_plugin,
name=local_obj.name.split(':')[-1] + "_animation",
asset=asset,
options={"useSelection": False,
"asset_group": local_obj},
data={"dependencies": representation}
)
legacy_create(
creator_plugin,
name=local_obj.name.split(':')[-1] + "_animation",
asset=asset,
options={"useSelection": False,
"asset_group": local_obj},
data={"dependencies": representation}
)
if not local_obj.get(AVALON_PROPERTY):
local_obj[AVALON_PROPERTY] = dict()
@ -272,7 +287,8 @@ class BlendLayoutLoader(plugin.AssetLoader):
avalon_container.objects.link(asset_group)
objects = self._process(
libpath, asset_group, group_name, asset, representation, None)
libpath, asset_group, group_name, asset, representation,
None, None)
for child in asset_group.children:
if child.get(AVALON_PROPERTY):
@ -352,10 +368,20 @@ class BlendLayoutLoader(plugin.AssetLoader):
return
actions = {}
anim_instances = {}
for obj in asset_group.children:
obj_meta = obj.get(AVALON_PROPERTY)
if obj_meta.get('family') == 'rig':
# Get animation instance
collections = list(obj.users_collection)
for c in collections:
avalon = c.get(AVALON_PROPERTY)
if avalon and avalon.get('family') == 'animation':
anim_instances[obj.name] = c.name
break
# Get armature's action
rig = None
for child in obj.children:
if child.type == 'ARMATURE':
@ -384,9 +410,26 @@ class BlendLayoutLoader(plugin.AssetLoader):
# If it is the last object to use that library, remove it
if count == 1:
library = bpy.data.libraries.get(bpy.path.basename(group_libpath))
bpy.data.libraries.remove(library)
if library:
bpy.data.libraries.remove(library)
self._process(str(libpath), asset_group, object_name, actions)
asset = container.get("asset_name").split("_")[0]
self._process(
str(libpath), asset_group, object_name, asset,
str(representation.get("_id")), actions, anim_instances
)
# Link the new objects to the animation collection
for inst in anim_instances.keys():
try:
obj = bpy.data.objects[inst]
bpy.data.collections[anim_instances[inst]].objects.link(obj)
except KeyError:
self.log.info(f"Object {inst} does not exist anymore.")
coll = bpy.data.collections.get(anim_instances[inst])
if (coll):
bpy.data.collections.remove(coll)
avalon_container = bpy.data.collections.get(AVALON_CONTAINERS)
for child in asset_group.children:

View file

@ -1,6 +1,6 @@
import sys
from Qt import QtWidgets, QtCore, QtGui
from qtpy import QtWidgets, QtCore, QtGui
from openpype.tools.utils import host_tools
from openpype.style import load_stylesheet

View file

@ -6,7 +6,7 @@ import sys
import logging
import pyblish.api
from Qt import QtCore
from qtpy import QtCore
from openpype.lib import (
Logger,

View file

@ -1,7 +1,7 @@
import os
import sys
from Qt import QtCore
from qtpy import QtCore
class PulseThread(QtCore.QThread):

View file

@ -6,10 +6,10 @@ import importlib
try:
from Qt import QtWidgets # noqa: F401
from Qt import __binding__
print(f"Qt binding: {__binding__}")
mod = importlib.import_module(__binding__)
from qtpy import API_NAME
print(f"Qt binding: {API_NAME}")
mod = importlib.import_module(API_NAME)
print(f"Qt path: {mod.__file__}")
print("Qt library found, nothing to do..")

View file

@ -3,7 +3,7 @@ import sys
import glob
import logging
from Qt import QtWidgets, QtCore
from qtpy import QtWidgets, QtCore
import qtawesome as qta

View file

@ -1,4 +1,4 @@
from Qt import QtGui, QtWidgets
from qtpy import QtGui, QtWidgets
from openpype.pipeline import InventoryAction
from openpype import style

View file

@ -1,4 +1,4 @@
from Qt import QtWidgets
from qtpy import QtWidgets
import qtawesome
from openpype.hosts.fusion.api import get_current_comp

View file

@ -14,7 +14,7 @@ import json
import signal
import time
from uuid import uuid4
from Qt import QtWidgets, QtCore, QtGui
from qtpy import QtWidgets, QtCore, QtGui
import collections
from .server import Server

View file

@ -611,7 +611,10 @@ def get_created_node_imageio_setting_legacy(nodeclass, creator, subset):
if (
onode["subsets"]
and not any(re.search(s, subset) for s in onode["subsets"])
and not any(
re.search(s.lower(), subset.lower())
for s in onode["subsets"]
)
):
continue
@ -694,7 +697,8 @@ def get_imageio_node_override_setting(
# find matching override node
override_imageio_node = None
for onode in override_nodes:
log.info(onode)
log.debug("__ onode: {}".format(onode))
log.debug("__ subset: {}".format(subset))
if node_class not in onode["nukeNodeClass"]:
continue
@ -703,7 +707,10 @@ def get_imageio_node_override_setting(
if (
onode["subsets"]
and not any(re.search(s, subset) for s in onode["subsets"])
and not any(
re.search(s.lower(), subset.lower())
for s in onode["subsets"]
)
):
continue

View file

@ -8,7 +8,7 @@ from wsrpc_aiohttp import (
WebSocketAsync
)
from Qt import QtCore
from qtpy import QtCore
from openpype.lib import Logger
from openpype.pipeline import legacy_io

View file

@ -3,7 +3,7 @@ import sys
import contextlib
import traceback
from Qt import QtWidgets
from qtpy import QtWidgets
from openpype.lib import env_value_to_bool, Logger
from openpype.modules import ModulesManager

View file

@ -1,5 +1,5 @@
import os
from Qt import QtWidgets
from qtpy import QtWidgets
import pyblish.api

View file

@ -1,6 +1,6 @@
import re
from Qt import QtWidgets
from qtpy import QtWidgets
from openpype.pipeline import create
from openpype.hosts.photoshop import api as photoshop

View file

@ -6,7 +6,7 @@ import ctypes
import platform
import logging
from Qt import QtWidgets, QtCore, QtGui
from qtpy import QtWidgets, QtCore, QtGui
from openpype import style
from openpype.pipeline import install_host

View file

@ -207,8 +207,8 @@ class CreateRenderlayer(plugin.Creator):
)
def _ask_user_subset_override(self, instance):
from Qt import QtCore
from Qt.QtWidgets import QMessageBox
from qtpy import QtCore
from qtpy.QtWidgets import QMessageBox
title = "Subset \"{}\" already exist".format(instance["subset"])
text = (

View file

@ -1,5 +1,5 @@
import sys
from Qt import QtWidgets, QtCore, QtGui
from qtpy import QtWidgets, QtCore, QtGui
from openpype import (
resources,

View file

@ -74,22 +74,52 @@ class EventCallback(object):
"Registered callback is not callable. \"{}\""
).format(str(func)))
# Collect additional data about function
# - name
# - path
# - if expect argument or not
# Collect function name and path to file for logging
func_name = func.__name__
func_path = os.path.abspath(inspect.getfile(func))
# Get expected arguments from function spec
# - positional arguments are always preferred
expect_args = False
expect_kwargs = False
fake_event = "fake"
if hasattr(inspect, "signature"):
# Python 3 using 'Signature' object where we try to bind arg
# or kwarg. Using signature is recommended approach based on
# documentation.
sig = inspect.signature(func)
expect_args = len(sig.parameters) > 0
try:
sig.bind(fake_event)
expect_args = True
except TypeError:
pass
try:
sig.bind(event=fake_event)
expect_kwargs = True
except TypeError:
pass
else:
expect_args = len(inspect.getargspec(func)[0]) > 0
# In Python 2 'signature' is not available so 'getcallargs' is used
# - 'getcallargs' is marked as deprecated since Python 3.0
try:
inspect.getcallargs(func, fake_event)
expect_args = True
except TypeError:
pass
try:
inspect.getcallargs(func, event=fake_event)
expect_kwargs = True
except TypeError:
pass
self._func_ref = func_ref
self._func_name = func_name
self._func_path = func_path
self._expect_args = expect_args
self._expect_kwargs = expect_kwargs
self._ref_valid = func_ref is not None
self._enabled = True
@ -157,6 +187,10 @@ class EventCallback(object):
try:
if self._expect_args:
callback(event)
elif self._expect_kwargs:
callback(event=event)
else:
callback()

View file

@ -57,7 +57,7 @@ class AvalonModule(OpenPypeModule, ITrayModule):
if not self._library_loader_imported:
return
from Qt import QtWidgets
from qtpy import QtWidgets
# Actions
action_library_loader = QtWidgets.QAction(
"Loader", tray_menu
@ -75,7 +75,7 @@ class AvalonModule(OpenPypeModule, ITrayModule):
def show_library_loader(self):
if self._library_loader_window is None:
from Qt import QtCore
from qtpy import QtCore
from openpype.tools.libraryloader import LibraryLoaderWindow
from openpype.pipeline import install_openpype_plugins

View file

@ -183,7 +183,7 @@ class ClockifyModule(
# Definition of Tray menu
def tray_menu(self, parent_menu):
# Menu for Tray App
from Qt import QtWidgets
from qtpy import QtWidgets
menu = QtWidgets.QMenu("Clockify", parent_menu)
menu.setProperty("submenu", "on")

View file

@ -1,4 +1,4 @@
from Qt import QtCore, QtGui, QtWidgets
from qtpy import QtCore, QtGui, QtWidgets
from openpype import resources, style

View file

@ -1,4 +1,4 @@
from Qt import QtWidgets
from qtpy import QtWidgets
from openpype.style import load_stylesheet

View file

@ -3,9 +3,9 @@ import time
import datetime
import threading
from Qt import QtCore, QtWidgets, QtGui
import ftrack_api
from qtpy import QtCore, QtWidgets, QtGui
from openpype import resources
from openpype.lib import Logger
from openpype_modules.ftrack import resolve_ftrack_url, FTRACK_MODULE_DIR

View file

@ -1,10 +1,13 @@
import os
import requests
from qtpy import QtCore, QtGui, QtWidgets
from openpype import style
from openpype_modules.ftrack.lib import credentials
from . import login_tools
from openpype import resources
from Qt import QtCore, QtGui, QtWidgets
from . import login_tools
class CredentialsDialog(QtWidgets.QDialog):

View file

@ -222,7 +222,7 @@ class ITrayAction(ITrayModule):
pass
def tray_menu(self, tray_menu):
from Qt import QtWidgets
from qtpy import QtWidgets
if self.admin_action:
menu = self.admin_submenu(tray_menu)
@ -247,7 +247,7 @@ class ITrayAction(ITrayModule):
@staticmethod
def admin_submenu(tray_menu):
if ITrayAction._admin_submenu is None:
from Qt import QtWidgets
from qtpy import QtWidgets
admin_submenu = QtWidgets.QMenu("Admin", tray_menu)
admin_submenu.menuAction().setVisible(False)
@ -279,7 +279,7 @@ class ITrayService(ITrayModule):
@staticmethod
def services_submenu(tray_menu):
if ITrayService._services_submenu is None:
from Qt import QtWidgets
from qtpy import QtWidgets
services_submenu = QtWidgets.QMenu("Services", tray_menu)
services_submenu.menuAction().setVisible(False)
@ -294,7 +294,7 @@ class ITrayService(ITrayModule):
@staticmethod
def _load_service_icons():
from Qt import QtGui
from qtpy import QtGui
ITrayService._failed_icon = QtGui.QIcon(
resources.get_resource("icons", "circle_red.png")
@ -325,7 +325,7 @@ class ITrayService(ITrayModule):
return ITrayService._failed_icon
def tray_menu(self, tray_menu):
from Qt import QtWidgets
from qtpy import QtWidgets
action = QtWidgets.QAction(
self.label,

View file

@ -1,4 +1,4 @@
from Qt import QtWidgets, QtCore, QtGui
from qtpy import QtWidgets, QtCore, QtGui
from openpype import style
from openpype.modules.kitsu.utils.credentials import (

View file

@ -22,7 +22,7 @@ class LogViewModule(OpenPypeModule, ITrayModule):
# Definition of Tray menu
def tray_menu(self, tray_menu):
from Qt import QtWidgets
from qtpy import QtWidgets
# Menu for Tray App
menu = QtWidgets.QMenu('Logging', tray_menu)

View file

@ -1,4 +1,4 @@
from Qt import QtWidgets, QtCore
from qtpy import QtWidgets, QtCore
from .widgets import LogsWidget, OutputWidget
from openpype import style

View file

@ -1,5 +1,5 @@
import collections
from Qt import QtCore, QtGui
from qtpy import QtCore, QtGui
from openpype.lib import Logger

View file

@ -1,5 +1,5 @@
import html
from Qt import QtCore, QtWidgets
from qtpy import QtCore, QtWidgets
import qtawesome
from .models import LogModel, LogsFilterProxy

View file

@ -53,7 +53,7 @@ class MusterModule(OpenPypeModule, ITrayModule):
# Definition of Tray menu
def tray_menu(self, parent):
"""Add **change credentials** option to tray menu."""
from Qt import QtWidgets
from qtpy import QtWidgets
# Menu for Tray App
menu = QtWidgets.QMenu('Muster', parent)

View file

@ -1,5 +1,4 @@
import os
from Qt import QtCore, QtGui, QtWidgets
from qtpy import QtCore, QtGui, QtWidgets
from openpype import resources, style

View file

@ -5,7 +5,7 @@ import collections
from code import InteractiveInterpreter
import appdirs
from Qt import QtCore, QtWidgets, QtGui
from qtpy import QtCore, QtWidgets, QtGui
from openpype import resources
from openpype.style import load_stylesheet

View file

@ -1,5 +1,5 @@
import os
from Qt import QtCore, QtWidgets, QtGui
from qtpy import QtCore, QtWidgets, QtGui
from openpype import style
from openpype import resources

View file

@ -1,7 +1,7 @@
import os
import webbrowser
from Qt import QtWidgets
from qtpy import QtWidgets
from openpype.modules.shotgrid.lib import credentials
from openpype.modules.shotgrid.tray.credential_dialog import (

View file

@ -1244,7 +1244,7 @@ class SyncServerModule(OpenPypeModule, ITrayModule):
if not self.enabled:
return
from Qt import QtWidgets
from qtpy import QtWidgets
"""Add menu or action to Tray(or parent)'s menu"""
action = QtWidgets.QAction(self.label, parent_menu)
action.triggered.connect(self.show_widget)

View file

@ -1,4 +1,4 @@
from Qt import QtWidgets, QtCore, QtGui
from qtpy import QtWidgets, QtCore, QtGui
from openpype.tools.settings import style

View file

@ -1,5 +1,5 @@
import os
from Qt import QtCore, QtWidgets, QtGui
from qtpy import QtCore, QtWidgets, QtGui
from openpype.lib import Logger

View file

@ -3,8 +3,7 @@ import attr
from bson.objectid import ObjectId
import datetime
from Qt import QtCore
from Qt.QtCore import Qt
from qtpy import QtCore
import qtawesome
from openpype.tools.utils.delegates import pretty_timestamp
@ -79,16 +78,16 @@ class _SyncRepresentationModel(QtCore.QAbstractTableModel):
def columnCount(self, _index=None):
return len(self._header)
def headerData(self, section, orientation, role=Qt.DisplayRole):
def headerData(self, section, orientation, role=QtCore.Qt.DisplayRole):
if section >= len(self.COLUMN_LABELS):
return
if role == Qt.DisplayRole:
if orientation == Qt.Horizontal:
if role == QtCore.Qt.DisplayRole:
if orientation == QtCore.Qt.Horizontal:
return self.COLUMN_LABELS[section][1]
if role == HEADER_NAME_ROLE:
if orientation == Qt.Horizontal:
if orientation == QtCore.Qt.Horizontal:
return self.COLUMN_LABELS[section][0] # return name
def data(self, index, role):
@ -123,7 +122,7 @@ class _SyncRepresentationModel(QtCore.QAbstractTableModel):
return item.status == lib.STATUS[2] and \
item.remote_progress < 1
if role in (Qt.DisplayRole, Qt.EditRole):
if role in (QtCore.Qt.DisplayRole, QtCore.Qt.EditRole):
# because of ImageDelegate
if header_value in ['remote_site', 'local_site']:
return ""
@ -146,7 +145,7 @@ class _SyncRepresentationModel(QtCore.QAbstractTableModel):
if role == STATUS_ROLE:
return item.status
if role == Qt.UserRole:
if role == QtCore.Qt.UserRole:
return item._id
@property
@ -409,7 +408,7 @@ class _SyncRepresentationModel(QtCore.QAbstractTableModel):
"""
for i in range(self.rowCount(None)):
index = self.index(i, 0)
value = self.data(index, Qt.UserRole)
value = self.data(index, QtCore.Qt.UserRole)
if value == id:
return index
return None
@ -917,7 +916,7 @@ class SyncRepresentationSummaryModel(_SyncRepresentationModel):
if not self.can_edit:
return
repre_id = self.data(index, Qt.UserRole)
repre_id = self.data(index, QtCore.Qt.UserRole)
representation = get_representation_by_id(self.project, repre_id)
if representation:
@ -1353,7 +1352,7 @@ class SyncRepresentationDetailModel(_SyncRepresentationModel):
if not self.can_edit:
return
file_id = self.data(index, Qt.UserRole)
file_id = self.data(index, QtCore.Qt.UserRole)
updated_file = None
representation = get_representation_by_id(self.project, self._id)

View file

@ -3,8 +3,7 @@ import subprocess
import sys
from functools import partial
from Qt import QtWidgets, QtCore, QtGui
from Qt.QtCore import Qt
from qtpy import QtWidgets, QtCore, QtGui
import qtawesome
from openpype.tools.settings import style
@ -260,7 +259,7 @@ class _SyncRepresentationWidget(QtWidgets.QWidget):
self._selected_ids = set()
for index in idxs:
self._selected_ids.add(self.model.data(index, Qt.UserRole))
self._selected_ids.add(self.model.data(index, QtCore.Qt.UserRole))
def _set_selection(self):
"""
@ -291,7 +290,7 @@ class _SyncRepresentationWidget(QtWidgets.QWidget):
self.table_view.openPersistentEditor(index)
return
_id = self.model.data(index, Qt.UserRole)
_id = self.model.data(index, QtCore.Qt.UserRole)
detail_window = SyncServerDetailWindow(
self.sync_server, _id, self.model.project, parent=self)
detail_window.exec()
@ -615,7 +614,7 @@ class SyncRepresentationSummaryWidget(_SyncRepresentationWidget):
table_view.setSelectionBehavior(
QtWidgets.QAbstractItemView.SelectRows)
table_view.horizontalHeader().setSortIndicator(
-1, Qt.AscendingOrder)
-1, QtCore.Qt.AscendingOrder)
table_view.setAlternatingRowColors(True)
table_view.verticalHeader().hide()
table_view.viewport().setAttribute(QtCore.Qt.WA_Hover, True)
@ -773,7 +772,8 @@ class SyncRepresentationDetailWidget(_SyncRepresentationWidget):
QtWidgets.QAbstractItemView.ExtendedSelection)
table_view.setSelectionBehavior(
QtWidgets.QTableView.SelectRows)
table_view.horizontalHeader().setSortIndicator(-1, Qt.AscendingOrder)
table_view.horizontalHeader().setSortIndicator(
-1, QtCore.Qt.AscendingOrder)
table_view.horizontalHeader().setSortIndicatorShown(True)
table_view.setAlternatingRowColors(True)
table_view.verticalHeader().hide()

View file

@ -1,5 +1,5 @@
import time
from Qt import QtCore
from qtpy import QtCore
from pynput import mouse, keyboard
from openpype.lib import Logger

View file

@ -1,4 +1,4 @@
from Qt import QtCore, QtGui, QtWidgets
from qtpy import QtCore, QtGui, QtWidgets
from openpype import resources, style

View file

@ -3,7 +3,7 @@ from aiohttp import web
import json
import logging
from concurrent.futures import CancelledError
from Qt import QtWidgets
from qtpy import QtWidgets
from openpype.modules import ITrayService

View file

@ -1,7 +1,7 @@
import os
import json
from Qt import QtWidgets, QtCore, QtGui
from qtpy import QtWidgets, QtCore, QtGui
from openpype import style
from openpype.pipeline import AvalonMongoDB

View file

@ -1,6 +1,6 @@
import os
from Qt import QtWidgets, QtGui
from qtpy import QtWidgets, QtGui
from openpype import PLUGINS_DIR
from openpype import style

View file

@ -1,4 +1,4 @@
from Qt import QtCore
from qtpy import QtCore
ACTION_ROLE = QtCore.Qt.UserRole

View file

@ -1,5 +1,5 @@
import time
from Qt import QtCore, QtWidgets, QtGui
from qtpy import QtCore, QtWidgets, QtGui
from .constants import (
ANIMATION_START_ROLE,
ANIMATION_STATE_ROLE,

View file

@ -1,5 +1,5 @@
import os
from Qt import QtGui
from qtpy import QtGui
import qtawesome
from openpype import resources

View file

@ -6,7 +6,7 @@ import collections
import time
import appdirs
from Qt import QtCore, QtGui
from qtpy import QtCore, QtGui
import qtawesome
from openpype.client import (

View file

@ -1,7 +1,7 @@
import copy
import time
import collections
from Qt import QtWidgets, QtCore, QtGui
from qtpy import QtWidgets, QtCore, QtGui
import qtawesome
from openpype.tools.flickcharm import FlickCharm

View file

@ -1,7 +1,7 @@
import copy
import logging
from Qt import QtWidgets, QtCore, QtGui
from qtpy import QtWidgets, QtCore, QtGui
from openpype import style
from openpype import resources

View file

@ -44,7 +44,7 @@ from .window import ProjectManagerWindow
def main():
import sys
from Qt import QtWidgets
from qtpy import QtWidgets
app = QtWidgets.QApplication([])

View file

@ -1,5 +1,5 @@
import re
from Qt import QtCore
from qtpy import QtCore
# Item identifier (unique ID - uuid4 is used)

View file

@ -1,4 +1,4 @@
from Qt import QtWidgets, QtCore
from qtpy import QtWidgets, QtCore
from .widgets import (
NameTextEdit,

View file

@ -5,7 +5,7 @@ from uuid import uuid4
from pymongo import UpdateOne, DeleteOne
from Qt import QtCore, QtGui
from qtpy import QtCore, QtGui
from openpype.client import (
get_projects,

View file

@ -1,4 +1,4 @@
from Qt import QtCore, QtWidgets
from qtpy import QtCore, QtWidgets
class ComboItemDelegate(QtWidgets.QStyledItemDelegate):

View file

@ -1,5 +1,5 @@
import os
from Qt import QtGui
from qtpy import QtGui
import qtawesome
from openpype.tools.utils import paint_image_with_color

View file

@ -1,7 +1,7 @@
import collections
from queue import Queue
from Qt import QtWidgets, QtCore, QtGui
from qtpy import QtWidgets, QtCore, QtGui
from openpype.client import get_project
from .delegates import (

View file

@ -16,7 +16,7 @@ from openpype.tools.utils import (
get_warning_pixmap
)
from Qt import QtWidgets, QtCore, QtGui
from qtpy import QtWidgets, QtCore, QtGui
class NameTextEdit(QtWidgets.QLineEdit):

View file

@ -1,4 +1,4 @@
from Qt import QtWidgets, QtCore, QtGui
from qtpy import QtWidgets, QtCore, QtGui
from openpype import resources
from openpype.style import load_stylesheet

View file

@ -35,5 +35,8 @@ __all__ = (
"SORT_VALUE_ROLE",
"IS_GROUP_ROLE",
"CREATOR_IDENTIFIER_ROLE",
"FAMILY_ROLE"
"CREATOR_THUMBNAIL_ENABLED_ROLE",
"FAMILY_ROLE",
"GROUP_ROLE",
"CONVERTER_IDENTIFIER_ROLE",
)

View file

@ -43,24 +43,14 @@ from ..constants import (
)
class SelectionType:
def __init__(self, name):
self.name = name
def __eq__(self, other):
if isinstance(other, SelectionType):
other = other.name
return self.name == other
class SelectionTypes:
clear = SelectionType("clear")
extend = SelectionType("extend")
extend_to = SelectionType("extend_to")
clear = "clear"
extend = "extend"
extend_to = "extend_to"
class BaseGroupWidget(QtWidgets.QWidget):
selected = QtCore.Signal(str, str, SelectionType)
selected = QtCore.Signal(str, str, str)
removed_selected = QtCore.Signal()
def __init__(self, group_name, parent):
@ -269,7 +259,7 @@ class InstanceGroupWidget(BaseGroupWidget):
class CardWidget(BaseClickableFrame):
"""Clickable card used as bigger button."""
selected = QtCore.Signal(str, str, SelectionType)
selected = QtCore.Signal(str, str, str)
# Group identifier of card
# - this must be set because if send when mouse is released with card id
_group_identifier = None
@ -755,11 +745,11 @@ class InstanceCardView(AbstractInstanceView):
group_widget = self._widgets_by_group[group_name]
new_widget = group_widget.get_widget_by_item_id(instance_id)
if selection_type is SelectionTypes.clear:
if selection_type == SelectionTypes.clear:
self._select_item_clear(instance_id, group_name, new_widget)
elif selection_type is SelectionTypes.extend:
elif selection_type == SelectionTypes.extend:
self._select_item_extend(instance_id, group_name, new_widget)
elif selection_type is SelectionTypes.extend_to:
elif selection_type == SelectionTypes.extend_to:
self._select_item_extend_to(instance_id, group_name, new_widget)
self.selection_changed.emit()

View file

@ -4,7 +4,7 @@ import ctypes
import signal
from bson.objectid import ObjectId
from Qt import QtWidgets, QtCore, QtGui
from qtpy import QtWidgets, QtCore, QtGui
from openpype.client import get_asset_by_id

View file

@ -1,4 +1,4 @@
from Qt import QtCore
from qtpy import QtCore
HelpRole = QtCore.Qt.UserRole + 2
FamilyRole = QtCore.Qt.UserRole + 3

View file

@ -1,7 +1,7 @@
import logging
import collections
from Qt import QtCore, QtGui
from qtpy import QtCore, QtGui
import qtawesome
from openpype.client import get_assets

View file

@ -1,4 +1,4 @@
from Qt import QtCore
from qtpy import QtCore
class ExactMatchesFilterProxyModel(QtCore.QSortFilterProxyModel):

View file

@ -1,5 +1,5 @@
from Qt import QtCore
import re
from qtpy import QtCore
class RecursiveSortFilterProxyModel(QtCore.QSortFilterProxyModel):

View file

@ -1,4 +1,4 @@
from Qt import QtCore
from qtpy import QtCore
import qtawesome
from openpype.style import get_default_entity_icon_color

View file

@ -1,4 +1,4 @@
from Qt import QtCore
from qtpy import QtCore
from . import Node

View file

@ -1,4 +1,4 @@
from Qt import QtWidgets, QtCore
from qtpy import QtWidgets, QtCore
class DeselectableTreeView(QtWidgets.QTreeView):

View file

@ -1,5 +1,5 @@
import contextlib
from Qt import QtWidgets, QtCore
from qtpy import QtWidgets, QtCore
import qtawesome
from openpype.client import (

View file

@ -1,5 +1,5 @@
import os
from Qt import QtCore, QtGui, QtWidgets
from qtpy import QtCore, QtGui, QtWidgets
from .resources import get_resource

View file

@ -4,7 +4,7 @@ import tempfile
import random
import string
from Qt import QtWidgets, QtCore
from qtpy import QtWidgets, QtCore
from openpype.pipeline import legacy_io
from openpype.lib import (

View file

@ -1,4 +1,4 @@
from Qt import QtWidgets
from qtpy import QtWidgets
class ComponentsList(QtWidgets.QTableWidget):

View file

@ -1,4 +1,4 @@
from Qt import QtWidgets, QtCore, QtGui
from qtpy import QtWidgets, QtCore, QtGui
class DropEmpty(QtWidgets.QWidget):

View file

@ -4,7 +4,7 @@ import json
import clique
import subprocess
import openpype.lib
from Qt import QtWidgets, QtCore
from qtpy import QtWidgets, QtCore
from . import DropEmpty, ComponentsList, ComponentItem

View file

@ -1,6 +1,6 @@
import re
from Qt import QtWidgets, QtCore
from qtpy import QtWidgets, QtCore
from openpype.client import (
get_asset_by_name,

View file

@ -1,5 +1,5 @@
import six
from Qt import QtWidgets, QtCore, QtGui
from qtpy import QtWidgets, QtCore, QtGui
import qtawesome
from . import FamilyRole, PluginRole

View file

@ -1,4 +1,4 @@
from Qt import QtWidgets, QtCore, QtGui
from qtpy import QtWidgets, QtCore, QtGui
class ShadowWidget(QtWidgets.QWidget):

View file

@ -1,7 +1,7 @@
import re
import collections
from Qt import QtWidgets
from qtpy import QtWidgets
from openpype import style

View file

@ -2,7 +2,7 @@ import os
import json
import collections
from Qt import QtCore, QtGui, QtWidgets
from qtpy import QtCore, QtGui, QtWidgets
from openpype import style
from openpype import resources

View file

@ -6,7 +6,7 @@ import subprocess
import platform
from Qt import QtCore, QtGui, QtWidgets
from qtpy import QtCore, QtGui, QtWidgets
import openpype.version
from openpype import resources, style

View file

@ -8,7 +8,7 @@ publishing plugins.
import platform
from Qt import QtWidgets, QtCore
from qtpy import QtWidgets, QtCore
import qtawesome
import appdirs

View file

@ -1,3 +1,3 @@
# -*- coding: utf-8 -*-
"""Package declaring Pype version."""
__version__ = "3.14.9-nightly.4"
__version__ = "3.14.9"