Merge remote-tracking branch 'origin/develop' into enhancement/OP-3075_houdini-new-publisher

This commit is contained in:
Ondřej Samohel 2022-10-27 16:26:14 +02:00
commit 1799fb67f4
No known key found for this signature in database
GPG key ID: 02376E18990A97C6
16 changed files with 48 additions and 34 deletions

View file

@ -2,7 +2,7 @@ name: Milestone - assign to PRs
on:
pull_request_target:
types: [opened, reopened, edited]
types: [opened, reopened, edited, synchronize]
jobs:
run_if_release:

View file

@ -815,6 +815,13 @@ class BootstrapRepos:
except Exception as e:
self._print(str(e), LOG_ERROR, exc_info=True)
return None
if not destination_dir.exists():
destination_dir.mkdir(parents=True)
elif not destination_dir.is_dir():
self._print(
"Destination exists but is not directory.", LOG_ERROR)
return None
try:
shutil.move(zip_file.as_posix(), destination_dir.as_posix())
except shutil.Error as e:

View file

@ -133,7 +133,7 @@ class ExtractPlayblast(publish.Extractor):
preset.update(panel_preset)
cmds.setFocus(panel)
path = capture.capture(**preset)
path = capture.capture(log=self.log, **preset)
self.log.debug("playblast path {}".format(path))

View file

@ -1,11 +1,11 @@
import os
import tempfile
import pyblish.api
import openpype.api
from openpype.lib import (
get_ffmpeg_tool_path,
get_ffprobe_streams,
path_to_subprocess_arg,
run_subprocess,
)
@ -96,7 +96,7 @@ class ExtractThumbnailSP(pyblish.api.InstancePlugin):
# run subprocess
self.log.debug("Executing: {}".format(subprocess_jpeg))
openpype.api.run_subprocess(
run_subprocess(
subprocess_jpeg, shell=True, logger=self.log
)
@ -118,6 +118,7 @@ class ExtractThumbnailSP(pyblish.api.InstancePlugin):
'files': filename,
"stagingDir": staging_dir,
"tags": ["thumbnail", "delete"],
"thumbnail": True
}
if width and height:
representation["width"] = width

View file

@ -132,7 +132,7 @@ class UserAssigmentEvent(BaseEvent):
"""
Get data to fill template from task
.. seealso:: :mod:`openpype.api.Anatomy`
.. seealso:: :mod:`openpype.pipeline.Anatomy`
:param task: Task entity
:type task: dict

View file

@ -195,7 +195,7 @@ class FtrackModule(
app_definitions_from_app_manager,
tool_definitions_from_app_manager
)
from openpype.api import ApplicationManager
from openpype.lib import ApplicationManager
query_keys = [
"id",
"key",

View file

@ -151,7 +151,7 @@ class IntegrateFtrackInstance(pyblish.api.InstancePlugin):
first_thumbnail_component = None
first_thumbnail_component_repre = None
if has_movie_review:
if not review_representations or has_movie_review:
for repre in thumbnail_representations:
repre_path = self._get_repre_path(instance, repre, False)
if not repre_path:

View file

@ -1,5 +1,5 @@
import os
from openpype.api import ApplicationManager
from openpype.lib import ApplicationManager
from openpype.pipeline import load

View file

@ -1,6 +1,7 @@
import os
import pyblish.api
import openpype.api as pype
from openpype.lib import get_version_from_path
class CollectSceneVersion(pyblish.api.ContextPlugin):
@ -46,7 +47,7 @@ class CollectSceneVersion(pyblish.api.ContextPlugin):
if '<shell>' in filename:
return
version = pype.get_version_from_path(filename)
version = get_version_from_path(filename)
assert version, "Cannot determine version"
rootVersion = int(version)

View file

@ -1,9 +1,8 @@
import os
import pyblish
import openpype.api
from openpype.lib import (
get_ffmpeg_tool_path,
path_to_subprocess_arg
run_subprocess
)
import tempfile
import opentimelineio as otio
@ -102,9 +101,7 @@ class ExtractOtioAudioTracks(pyblish.api.ContextPlugin):
# run subprocess
self.log.debug("Executing: {}".format(" ".join(cmd)))
openpype.api.run_subprocess(
cmd, logger=self.log
)
run_subprocess(cmd, logger=self.log)
else:
audio_fpath = recycling_file.pop()
@ -225,7 +222,7 @@ class ExtractOtioAudioTracks(pyblish.api.ContextPlugin):
# run subprocess
self.log.debug("Executing: {}".format(" ".join(cmd)))
openpype.api.run_subprocess(
run_subprocess(
cmd, logger=self.log
)
@ -308,7 +305,7 @@ class ExtractOtioAudioTracks(pyblish.api.ContextPlugin):
# run subprocess
self.log.debug("Executing: {}".format(args))
openpype.api.run_subprocess(args, logger=self.log)
run_subprocess(args, logger=self.log)
os.remove(filters_tmp_filepath)

View file

@ -10,12 +10,13 @@ import six
import clique
import pyblish.api
import openpype.api
from openpype.lib import (
get_ffmpeg_tool_path,
get_ffprobe_streams,
path_to_subprocess_arg,
run_subprocess,
should_convert_for_ffmpeg,
convert_input_paths_for_ffmpeg,
@ -354,9 +355,7 @@ class ExtractReview(pyblish.api.InstancePlugin):
# run subprocess
self.log.debug("Executing: {}".format(subprcs_cmd))
openpype.api.run_subprocess(
subprcs_cmd, shell=True, logger=self.log
)
run_subprocess(subprcs_cmd, shell=True, logger=self.log)
# delete files added to fill gaps
if files_to_clean:

View file

@ -4,8 +4,8 @@ import os
import shutil
import pyblish.api
import openpype.api
import openpype.lib
from openpype.lib import run_subprocess, get_oiio_tools_path
class ExtractScanlineExr(pyblish.api.InstancePlugin):
@ -45,7 +45,7 @@ class ExtractScanlineExr(pyblish.api.InstancePlugin):
stagingdir = os.path.normpath(repre.get("stagingDir"))
oiio_tool_path = openpype.lib.get_oiio_tools_path()
oiio_tool_path = get_oiio_tools_path()
if not os.path.exists(oiio_tool_path):
self.log.error(
"OIIO tool not found in {}".format(oiio_tool_path))
@ -65,7 +65,7 @@ class ExtractScanlineExr(pyblish.api.InstancePlugin):
subprocess_exr = " ".join(oiio_cmd)
self.log.info(f"running: {subprocess_exr}")
openpype.api.run_subprocess(subprocess_exr, logger=self.log)
run_subprocess(subprocess_exr, logger=self.log)
# raise error if there is no ouptput
if not os.path.exists(os.path.join(stagingdir, original_name)):

View file

@ -164,9 +164,9 @@ class ExperimentalTools:
def _show_publisher(self):
if self._publisher_tool is None:
from openpype.tools import publisher
from openpype.tools.publisher.window import PublisherWindow
self._publisher_tool = publisher.PublisherWindow(
self._publisher_tool = PublisherWindow(
parent=self._parent_widget
)

View file

@ -5,7 +5,7 @@ import traceback
from Qt import QtWidgets
from pymongo.errors import ServerSelectionTimeoutError
from openpype.api import change_openpype_mongo_url
from openpype.lib import change_openpype_mongo_url
from openpype.tools.utils import PlaceholderLineEdit

View file

@ -7,6 +7,7 @@ Playblasting with independent viewport, camera and display options
import re
import sys
import contextlib
import logging
from maya import cmds
from maya import mel
@ -21,6 +22,7 @@ version_info = (2, 3, 0)
__version__ = "%s.%s.%s" % version_info
__license__ = "MIT"
logger = logging.getLogger("capture")
def capture(camera=None,
@ -46,7 +48,8 @@ def capture(camera=None,
display_options=None,
viewport_options=None,
viewport2_options=None,
complete_filename=None):
complete_filename=None,
log=None):
"""Playblast in an independent panel
Arguments:
@ -91,6 +94,7 @@ def capture(camera=None,
options, using `Viewport2Options`
complete_filename (str, optional): Exact name of output file. Use this
to override the output of `filename` so it excludes frame padding.
log (logger, optional): pass logger for logging messages.
Example:
>>> # Launch default capture
@ -109,7 +113,9 @@ def capture(camera=None,
"""
global logger
if log:
logger = log
camera = camera or "persp"
# Ensure camera exists
@ -736,7 +742,10 @@ def _applied_viewport_options(options, panel):
plugin_options[plugin] = options.pop(plugin)
# default options
cmds.modelEditor(panel, edit=True, **options)
try:
cmds.modelEditor(panel, edit=True, **options)
except TypeError as e:
logger.error("Cannot apply options {}".format(e))
# plugin display filter options
for plugin, state in plugin_options.items():

View file

@ -39,13 +39,13 @@ Pype needs site-wide installation of **MongoDB**. It should be installed on
reliable server, that all workstations (and possibly render nodes) can connect. This
server holds **Avalon** database that is at the core of everything
Depending on project size and number of artists working connection speed and
Depending on project size and number of artists working, connection speed and
latency influence performance experienced by artists. If remote working is required, this mongodb
server must be accessible from Internet or cloud solution can be used. Reasonable backup plan
or high availability options are recommended. *Replication* feature of MongoDB should be considered. This is beyond the
scope of this documentation, please refer to [MongoDB Documentation](https://docs.mongodb.com/manual/replication/).
Pype can run it's own instance of mongodb, mostly for testing and development purposes.
Pype can run its own instance of mongodb, mostly for testing and development purposes.
For that it uses locally installed MongoDB.
Download it from [mognoDB website](https://www.mongodb.com/download-center/community), install it and
@ -69,7 +69,7 @@ the major DCCs, it most probably can run openPYPE.
Installed, it takes around 400MB of space, depending on the platform
For well functioning ftrack event server, we recommend a linux virtual server with Ubuntu or CentOS. CPU and RAM allocation needs differ based on the studio size, but a 2GB of ram, with a dual core CPU and around 4GB of storage should suffice
For a well functioning ftrack event server, we recommend a linux virtual server with Ubuntu or CentOS. CPU and RAM allocation needs differ based on the studio size, but a 2GB of ram, with a dual core CPU and around 4GB of storage should suffice
## Deployment