Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
159 commits
Select commit Hold shift + click to select a range
998154b
Implement Hardware Renderer 2.0 support for Render Products
BigRoy Jan 30, 2022
0e96071
Add shotgrid module
victorbartel Mar 18, 2022
00285ca
Fix hound complaints
victorbartel Mar 18, 2022
feae04f
Fix hound Exception complaints
victorbartel Mar 18, 2022
521b562
Add fixes after first PR
victorbartel Mar 25, 2022
68941da
Add fixes for hound
victorbartel Mar 25, 2022
1214cb9
Remove an empty line
victorbartel Mar 25, 2022
d106ba4
Reformat code after hound barking
victorbartel Mar 25, 2022
3c1ecfb
Drawn back to the obsolete version of python
victorbartel Apr 8, 2022
3a3e552
Make the publish work under maya 2018
BenoitConnan Apr 8, 2022
0c85093
Add memoize implementation for settings purposes
victorbartel Apr 11, 2022
16dc433
Fix after hound notes
victorbartel Apr 11, 2022
57386db
Fix after hound notes, part 2
victorbartel Apr 11, 2022
e5f3d28
OP-3113 - moved plugins into addon
kalisp Apr 26, 2022
604263b
OP-3113 - added Background task to default Task enum
kalisp Apr 26, 2022
0ca5f93
Layout loading will load assets in a different directory
simonebarbieri Apr 28, 2022
337df2d
Reworked update and remove operation for layouts
simonebarbieri Apr 28, 2022
9c2a725
Fix naming problem when loading animation for the asset container
simonebarbieri Apr 22, 2022
f3ed8d8
Use anatomy for the render path
simonebarbieri Apr 22, 2022
7724f4b
Fix remove for camera assets
simonebarbieri Apr 22, 2022
8d062e8
Fixed camera update
simonebarbieri Apr 28, 2022
2f7ca63
Use anatomy for render path when collecting render instances
simonebarbieri Apr 27, 2022
6120efc
Fix animation loading to find the correct skeleton
simonebarbieri Apr 28, 2022
af3c8d0
Fix raise calls
simonebarbieri Apr 28, 2022
523a52c
Hound fixes
simonebarbieri Apr 29, 2022
10fd26e
moved enable review from creator into publish collector
iLLiCiTiT Apr 29, 2022
1ea991f
added right click callback for menu
iLLiCiTiT Apr 29, 2022
b74b309
fixed split sequence action
iLLiCiTiT Apr 29, 2022
0647a5d
moved create button to right side
iLLiCiTiT Apr 29, 2022
7924aff
make FileDef with vertical label as default
iLLiCiTiT Apr 29, 2022
889f17d
wrapped header widgets into single widget
iLLiCiTiT Apr 29, 2022
b17a71f
simplified btns height in assets widget
iLLiCiTiT Apr 29, 2022
1bc4d6c
keep creators view label at same height as asset filtering
iLLiCiTiT Apr 29, 2022
48e887f
modified description heights
iLLiCiTiT Apr 29, 2022
542efb5
change style of detailed description
iLLiCiTiT Apr 29, 2022
9909626
change separator size
iLLiCiTiT Apr 29, 2022
833027f
animate description showing
iLLiCiTiT Apr 29, 2022
4f09306
Merge branch 'develop' of github.com:pypeclub/OpenPype into chore/OP-…
kalisp May 2, 2022
c966bdc
Merge branch 'feature/OP-2833_Expose-write-attributes-to-config' into…
jakubjezek001 May 2, 2022
d0b3cf7
nuke: extracting method for knob types
jakubjezek001 May 2, 2022
4b7f17c
nuke: adding hex and color types to nuke knob schema
jakubjezek001 May 2, 2022
a72aaec
nuke: solving hex and color knob types
jakubjezek001 May 2, 2022
e632657
help button is resized and has more content
iLLiCiTiT May 2, 2022
b7f859c
fixed description min/max sizes
iLLiCiTiT May 2, 2022
9e2f7f3
Cleanup some Loader docstrings
BigRoy May 2, 2022
8e7b27c
nuke: change `string` type to `text`
jakubjezek001 May 3, 2022
7903437
nuke: converting schema knobs to template schema
jakubjezek001 May 3, 2022
dc94809
added icon to asset input dialog
iLLiCiTiT May 3, 2022
b17d9d2
fixed empty files def
iLLiCiTiT May 3, 2022
33c3d1b
resize properly families and subset names
iLLiCiTiT May 3, 2022
1c2b640
nuke: refectory imageio settings for plugin nodes
jakubjezek001 May 3, 2022
9eb9c62
different asset dialog size
iLLiCiTiT May 3, 2022
5ca7b53
fix styles
iLLiCiTiT May 3, 2022
c23b55f
changed default sizes of create dialog
iLLiCiTiT May 3, 2022
d82480b
fix variant value changes
iLLiCiTiT May 3, 2022
06a1e48
fix property changes
iLLiCiTiT May 3, 2022
50e19bb
create attributes use same grid layout logic
iLLiCiTiT May 3, 2022
8db65d5
hound fix
iLLiCiTiT May 3, 2022
289e35d
added stretches
iLLiCiTiT May 3, 2022
0161e3d
Merge branch 'develop' into enhancement/OP-3149_Publisher-UI-modifica…
iLLiCiTiT May 3, 2022
0dd91e8
Nuke: adding `formatable` to node knob keys
jakubjezek001 May 3, 2022
3ddb464
nuke: updating create_write_node inputs and docs
jakubjezek001 May 3, 2022
3fd5a53
nuke: adding prenodes to settings
jakubjezek001 May 3, 2022
890e108
nuke: updating plugins with new settings with prenodes
jakubjezek001 May 3, 2022
c18abc1
nuke: extracting prenodes creation
jakubjezek001 May 4, 2022
bc07da3
nuke: fixing create write still
jakubjezek001 May 4, 2022
a6ff017
Nuke: fixing lib functions for prenodes
jakubjezek001 May 4, 2022
656ea5d
Merge branch 'develop' into feature/OP-2748_Nuke-CreateWriteRender-re…
jakubjezek001 May 4, 2022
0c8b7e3
nuke: improving add write node function
jakubjezek001 May 4, 2022
3744b21
fix the output dir
antirotor May 5, 2022
6a123fc
nuke: change hex type to color_gui in settings
jakubjezek001 May 6, 2022
d640ea3
nuke: remove redundant code
jakubjezek001 May 6, 2022
e7a1c84
nuke: implementing `color_gui` type
jakubjezek001 May 6, 2022
0633920
Merge branch 'develop' of github.com:pypeclub/OpenPype into chore/OP-…
kalisp May 6, 2022
166ca1b
OP-3113 - added timeit module to requirements
kalisp May 6, 2022
b374e8e
nuke: returning legacy code for backward compatibility
jakubjezek001 May 6, 2022
89499e9
nuke: skipping override if no node was found
jakubjezek001 May 6, 2022
106c0fb
Merge branch 'develop' into feature/OP-2748_Nuke-CreateWriteRender-re…
jakubjezek001 May 6, 2022
f14cabb
hound
jakubjezek001 May 6, 2022
a0284fd
nuke: adding legacy type
jakubjezek001 May 6, 2022
e87024d
added backwards compatibility for imageio values
iLLiCiTiT May 6, 2022
b9c211c
fixed order of variables in ftrack action delete old versions
iLLiCiTiT May 6, 2022
0659645
fix key access
iLLiCiTiT May 6, 2022
ec49131
add support for compressed bgeo to standalone and simple loader to ho…
antirotor May 6, 2022
d746f94
add comment and get renderer from instance
antirotor May 6, 2022
97a7b31
Merge pull request #3144 from pypeclub/bugfix/deadline-output-dir-issue
antirotor May 9, 2022
e078833
Merge pull request #3152 from pypeclub/bugfix/ftrack_delete_versions_…
iLLiCiTiT May 9, 2022
1cbd778
Merge pull request #3153 from pypeclub/enhancement/OP-3120_compressed…
antirotor May 9, 2022
d685b49
Merge remote-tracking branch 'origin/develop' into chore/maya-hw-rend…
antirotor May 9, 2022
7226d82
add support for hw prefixes
antirotor May 9, 2022
634914e
Merge pull request #3143 from pypeclub/feature/OP-2748_Nuke-CreateWri…
jakubjezek001 May 10, 2022
10e4764
OP-3113 - removed unnecessary default
kalisp May 10, 2022
a1c0179
Merge pull request #3093 from pypeclub/chore/OP-3113_SAP-ExtractBGMai…
kalisp May 10, 2022
7ff23fd
fix extension collection
iLLiCiTiT May 10, 2022
95f2061
Merge pull request #3139 from pypeclub/enhancement/OP-3149_Publisher-…
iLLiCiTiT May 10, 2022
235baf4
store width and height into thumbnail representation
iLLiCiTiT May 10, 2022
5da19f0
integrate ftrack instance is collecting width and height from represe…
iLLiCiTiT May 10, 2022
a20891e
fix line length
iLLiCiTiT May 10, 2022
b80bb7f
OP-3137 - use validation settings to create subset name
kalisp May 10, 2022
734258c
OP-3137 - use validation settings to create subset name
kalisp May 10, 2022
edef0cc
OP-3137 - fix naming validator
kalisp May 10, 2022
368b1b3
Merge pull request #3157 from pypeclub/feature/OP-3108_Single-file-fo…
iLLiCiTiT May 10, 2022
dbbc633
Fix - added missing task
kalisp May 11, 2022
e92b530
Merge pull request #3160 from pypeclub/bugfix/develop_OP-3137_Webpubl…
kalisp May 11, 2022
4bb5e87
Merge pull request #3163 from pypeclub/bugfix/harmony_farm_missing_task
kalisp May 11, 2022
1b5ef66
Merge pull request #6 from pypeclub/chore/maya-hw-render-merge-develop
BigRoy May 11, 2022
97e2bd1
fix setting of subset group and primary family
antirotor May 11, 2022
45a1cb8
Update validate_rendersettings.py
BigRoy May 11, 2022
497094c
Remove invalid submodules
BigRoy May 11, 2022
7ac464b
Merge pull request #3131 from BigRoy/cleanup_loader_docstrings
mkolar May 11, 2022
cf8422d
Merge pull request #2611 from BigRoy/maya_render_hardware_support
antirotor May 11, 2022
7b225fe
it is properly checked for not allowed characters
iLLiCiTiT May 11, 2022
9640a74
fix not allowed characters properly
iLLiCiTiT May 11, 2022
6156553
Merge pull request #3166 from pypeclub/bugfix/oiio_conversion_chars_c…
iLLiCiTiT May 11, 2022
3615c79
handle subsetGroup in attached renders
antirotor May 11, 2022
e7e6bf1
Add maya 2023 to defaults
mkolar May 12, 2022
2e5dd57
general: calculation of duration should not exclude one frame
jakubjezek001 May 12, 2022
1c43403
hiero: fitting new duration calculation
jakubjezek001 May 12, 2022
b105287
extract jpeg exr does not create multiple representation names with "…
iLLiCiTiT May 12, 2022
bbdc0ce
create only one thumbnail representation
iLLiCiTiT May 12, 2022
7c61e36
integrate ftrack instances does not query location entities only set …
iLLiCiTiT May 12, 2022
968ff4c
Merge pull request #3177 from pypeclub/bugfix/ftrack_locations_copy_i…
iLLiCiTiT May 13, 2022
00e99b6
Merge pull request #3176 from pypeclub/bugfix/avoid_same_name_represe…
iLLiCiTiT May 13, 2022
6438078
creators can be filtered by host name
iLLiCiTiT May 13, 2022
e125327
Merge pull request #3167 from pypeclub/feature/add_maya_2023
mkolar May 13, 2022
7fbb1df
Merge pull request #3116 from simonebarbieri/enhancement/unreal-layou…
mkolar May 13, 2022
d2afd26
implemented collecting of creator plugins for host
iLLiCiTiT May 13, 2022
29cbc12
install creator plugins from modules on openpype plugin install
iLLiCiTiT May 13, 2022
7e23f1c
fix typo
iLLiCiTiT May 13, 2022
c4907af
traypublisher creator has host name filter
iLLiCiTiT May 13, 2022
40ea037
register module publish plugins during openpype plugin installation i…
iLLiCiTiT May 13, 2022
cf7a83e
remove unused import
iLLiCiTiT May 13, 2022
ec6542c
Merge branch 'feature/OP-3220_Creators-in-Addons-issues' into feature…
iLLiCiTiT May 13, 2022
dadf816
fix registering of paths
iLLiCiTiT May 13, 2022
6a75497
OP-2790 - added clean_import option to Maya's Import loader
kalisp May 13, 2022
f7c0f3b
don't create ftrackreview-image if there are mp4 reviews
iLLiCiTiT May 13, 2022
0ed1caa
add write family to default nuke version sync settings
mkolar May 13, 2022
d2f7c59
Merge pull request #3183 from pypeclub/bugfix/ftrack_review_image_lim…
iLLiCiTiT May 16, 2022
34c6cab
Avalon repo removed from Jobs workflow
64qam May 17, 2022
bad3b6d
Merge pull request #3193 from pypeclub/bugfix/removing_avalon_from_wo…
mkolar May 17, 2022
ddc010b
Merge pull request #3164 from pypeclub/bugfix/OP-2673_attaching-rende…
antirotor May 17, 2022
d0c66d2
Merge pull request #3179 from pypeclub/feature/OP-3220_Creators-in-Ad…
iLLiCiTiT May 17, 2022
9b8dcfd
Merge branch 'develop' into feature/modules_plugins_register_in_host
iLLiCiTiT May 17, 2022
e9a855a
added ability to know if project is enabled without prequerying all o…
iLLiCiTiT May 17, 2022
96247b4
cache sync server data to avoid refreshing of modules manager all the…
iLLiCiTiT May 17, 2022
625b74d
Fix - skip collector in PS when automatic testing
kalisp May 18, 2022
b2e1c4b
Fix - skip collector in PS when automatic testing
kalisp May 18, 2022
e993004
Merge pull request #3202 from pypeclub/bugfix/photoshop_no_plugin_whe…
kalisp May 18, 2022
dc475f5
Merge pull request #3185 from pypeclub/bugfix/nuke_sync_render_and_wo…
mkolar May 18, 2022
85c5b7a
Merge pull request #3199 from pypeclub/enhancement/OP-3261_Loader-spe…
iLLiCiTiT May 18, 2022
42fd8d6
always create new thumbnail representation in standalone publisher no…
iLLiCiTiT May 18, 2022
20f2fd5
remove temp json file after publishing
iLLiCiTiT May 18, 2022
0c196d1
Merge pull request #3203 from pypeclub/bugfix/OP-3265_JPEG-from-stand…
iLLiCiTiT May 18, 2022
99a273c
OP-3154 - reworked logic
kalisp May 18, 2022
f0ad33a
Merge pull request #3180 from pypeclub/feature/modules_plugins_regist…
iLLiCiTiT May 18, 2022
373930c
Merge pull request #3169 from pypeclub/bugfix/framerange_op_wrong_dur…
jakubjezek001 May 18, 2022
9bc5a3b
Merge pull request #3181 from pypeclub/enhancement/OP-3154_regenerate…
kalisp May 19, 2022
892ce5a
Merge branch 'shotgrid_module' of https://github.com/Ellipsanime/Open…
zhoub May 19, 2022
46c0d47
Merge branch 'develop' of https://github.com/pypeclub/OpenPype into f…
zhoub May 19, 2022
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
16 changes: 0 additions & 16 deletions .github/workflows/prerelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,22 +62,6 @@ jobs:
- name: "🖨️ Print changelog to console"
if: steps.version_type.outputs.type != 'skip'
run: cat CHANGELOG.md

- name: 💾 Commit and Tag
id: git_commit
if: steps.version_type.outputs.type != 'skip'
run: |
git config user.email ${{ secrets.CI_EMAIL }}
git config user.name ${{ secrets.CI_USER }}
cd repos/avalon-core
git checkout main
git pull
cd ../..
git add .
git commit -m "[Automated] Bump version"
tag_name="CI/${{ steps.version.outputs.next_tag }}"
echo $tag_name
git tag -a $tag_name -m "nightly build"

- name: Push to protected main branch
uses: CasperWA/push-protected@v2.10.0
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -102,3 +102,6 @@ website/.docusaurus

.poetry/
.python-version
.editorconfig
.pre-commit-config.yaml
mypy.ini
6 changes: 3 additions & 3 deletions .hound.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
flake8:
enabled: true
config_file: setup.cfg
flake8:
enabled: true
config_file: setup.cfg
4 changes: 2 additions & 2 deletions openpype/hosts/fusion/plugins/load/actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@


class FusionSetFrameRangeLoader(load.LoaderPlugin):
"""Specific loader of Alembic for the avalon.animation family"""
"""Set frame range excluding pre- and post-handles"""

families = ["animation",
"camera",
Expand Down Expand Up @@ -40,7 +40,7 @@ def load(self, context, name, namespace, data):


class FusionSetFrameRangeWithHandlesLoader(load.LoaderPlugin):
"""Specific loader of Alembic for the avalon.animation family"""
"""Set frame range including pre- and post-handles"""

families = ["animation",
"camera",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ def get_instances(self, context):
label=node.split("/")[1],
subset=subset_name,
asset=legacy_io.Session["AVALON_ASSET"],
task=task_name,
attachTo=False,
setMembers=[node],
publish=info[4],
Expand Down
2 changes: 1 addition & 1 deletion openpype/hosts/hiero/api/otio/hiero_export.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ def create_otio_reference(clip):
padding = media_source.filenamePadding()
file_head = media_source.filenameHead()
is_sequence = not media_source.singleFile()
frame_duration = media_source.duration()
frame_duration = media_source.duration() - 1
fps = utils.get_rate(clip) or self.project_fps
extension = os.path.splitext(path)[-1]

Expand Down
2 changes: 2 additions & 0 deletions openpype/hosts/hiero/plugins/publish/precollect_instances.py
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,8 @@ def get_otio_clip_instance_data(self, track_item):
continue
if otio_clip.name not in track_item.name():
continue
self.log.debug("__ parent_range: {}".format(parent_range))
self.log.debug("__ timeline_range: {}".format(timeline_range))
if openpype.lib.is_overlapping_otio_ranges(
parent_range, timeline_range, strict=True):

Expand Down
4 changes: 2 additions & 2 deletions openpype/hosts/houdini/plugins/load/actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@


class SetFrameRangeLoader(load.LoaderPlugin):
"""Set Houdini frame range"""
"""Set frame range excluding pre- and post-handles"""

families = [
"animation",
Expand Down Expand Up @@ -44,7 +44,7 @@ def load(self, context, name, namespace, data):


class SetFrameRangeWithHandlesLoader(load.LoaderPlugin):
"""Set Maya frame range including pre- and post-handles"""
"""Set frame range including pre- and post-handles"""

families = [
"animation",
Expand Down
2 changes: 1 addition & 1 deletion openpype/hosts/houdini/plugins/load/load_alembic.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@


class AbcLoader(load.LoaderPlugin):
"""Specific loader of Alembic for the avalon.animation family"""
"""Load Alembic"""

families = ["model", "animation", "pointcache", "gpuCache"]
label = "Load Alembic"
Expand Down
107 changes: 107 additions & 0 deletions openpype/hosts/houdini/plugins/load/load_bgeo.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
# -*- coding: utf-8 -*-
import os
import re

from openpype.pipeline import (
load,
get_representation_path,
)
from openpype.hosts.houdini.api import pipeline


class BgeoLoader(load.LoaderPlugin):
"""Load bgeo files to Houdini."""

label = "Load bgeo"
families = ["model", "pointcache", "bgeo"]
representations = [
"bgeo", "bgeosc", "bgeogz",
"bgeo.sc", "bgeo.gz", "bgeo.lzma", "bgeo.bz2"]
order = -10
icon = "code-fork"
color = "orange"

def load(self, context, name=None, namespace=None, data=None):

import hou

# Get the root node
obj = hou.node("/obj")

# Define node name
namespace = namespace if namespace else context["asset"]["name"]
node_name = "{}_{}".format(namespace, name) if namespace else name

# Create a new geo node
container = obj.createNode("geo", node_name=node_name)
is_sequence = bool(context["representation"]["context"].get("frame"))

# Remove the file node, it only loads static meshes
# Houdini 17 has removed the file node from the geo node
file_node = container.node("file1")
if file_node:
file_node.destroy()

# Explicitly create a file node
file_node = container.createNode("file", node_name=node_name)
file_node.setParms({"file": self.format_path(self.fname, is_sequence)})

# Set display on last node
file_node.setDisplayFlag(True)

nodes = [container, file_node]
self[:] = nodes

return pipeline.containerise(
node_name,
namespace,
nodes,
context,
self.__class__.__name__,
suffix="",
)

@staticmethod
def format_path(path, is_sequence):
"""Format file path correctly for single bgeo or bgeo sequence."""
if not os.path.exists(path):
raise RuntimeError("Path does not exist: %s" % path)

# The path is either a single file or sequence in a folder.
if not is_sequence:
filename = path
print("single")
else:
filename = re.sub(r"(.*)\.(\d+)\.(bgeo.*)", "\\1.$F4.\\3", path)

filename = os.path.join(path, filename)

filename = os.path.normpath(filename)
filename = filename.replace("\\", "/")

return filename

def update(self, container, representation):

node = container["node"]
try:
file_node = next(
n for n in node.children() if n.type().name() == "file"
)
except StopIteration:
self.log.error("Could not find node of type `alembic`")
return

# Update the file path
file_path = get_representation_path(representation)
file_path = self.format_path(file_path)

file_node.setParms({"fileName": file_path})

# Update attribute
node.setParms({"representation": str(representation["_id"])})

def remove(self, container):

node = container["node"]
node.destroy()
2 changes: 1 addition & 1 deletion openpype/hosts/houdini/plugins/load/load_camera.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def transfer_non_default_values(src, dest, ignore=None):


class CameraLoader(load.LoaderPlugin):
"""Specific loader of Alembic for the avalon.animation family"""
"""Load camera from an Alembic file"""

families = ["camera"]
label = "Load Camera (abc)"
Expand Down
4 changes: 2 additions & 2 deletions openpype/hosts/houdini/plugins/load/load_image.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ def get_image_avalon_container():


class ImageLoader(load.LoaderPlugin):
"""Specific loader of Alembic for the avalon.animation family"""
"""Load images into COP2"""

families = ["colorbleed.imagesequence"]
families = ["imagesequence"]
label = "Load Image (COP2)"
representations = ["*"]
order = -10
Expand Down
2 changes: 1 addition & 1 deletion openpype/hosts/houdini/plugins/load/load_vdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@


class VdbLoader(load.LoaderPlugin):
"""Specific loader of Alembic for the avalon.animation family"""
"""Load VDB"""

families = ["vdbcache"]
label = "Load VDB"
Expand Down
65 changes: 64 additions & 1 deletion openpype/hosts/maya/api/lib_renderproducts.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@
"arnold": "defaultRenderGlobals.imageFilePrefix",
"renderman": "rmanGlobals.imageFileFormat",
"redshift": "defaultRenderGlobals.imageFilePrefix",
"mayahardware2": "defaultRenderGlobals.imageFilePrefix"
}

RENDERMAN_IMAGE_DIR = "maya/<scene>/<layer>"
Expand Down Expand Up @@ -155,7 +156,8 @@ class Instance(object):
"arnold": RenderProductsArnold,
"vray": RenderProductsVray,
"redshift": RenderProductsRedshift,
"renderman": RenderProductsRenderman
"renderman": RenderProductsRenderman,
"mayahardware2": RenderProductsMayaHardware
}.get(renderer_name.lower(), None)
if renderer is None:
raise UnsupportedRendererException(
Expand Down Expand Up @@ -1124,6 +1126,67 @@ def get_files(self, product):
return new_files


class RenderProductsMayaHardware(ARenderProducts):
"""Expected files for MayaHardware renderer."""

renderer = "mayahardware2"

extensions = [
{"label": "JPEG", "index": 8, "extension": "jpg"},
{"label": "PNG", "index": 32, "extension": "png"},
{"label": "EXR(exr)", "index": 40, "extension": "exr"}
]

def _get_extension(self, value):
result = None
if isinstance(value, int):
extensions = {
extension["index"]: extension["extension"]
for extension in self.extensions
}
try:
result = extensions[value]
except KeyError:
raise NotImplementedError(
"Could not find extension for {}".format(value)
)

if isinstance(value, six.string_types):
extensions = {
extension["label"]: extension["extension"]
for extension in self.extensions
}
try:
result = extensions[value]
except KeyError:
raise NotImplementedError(
"Could not find extension for {}".format(value)
)

if not result:
raise NotImplementedError(
"Could not find extension for {}".format(value)
)

return result

def get_render_products(self):
"""Get all AOVs.
See Also:
:func:`ARenderProducts.get_render_products()`
"""
ext = self._get_extension(
self._get_attr("defaultRenderGlobals.imageFormat")
)

products = []
for cam in self.get_renderable_cameras():
product = RenderProduct(productName="beauty", ext=ext, camera=cam)
products.append(product)

return products


class AOVError(Exception):
"""Custom exception for determining AOVs."""

Expand Down
6 changes: 4 additions & 2 deletions openpype/hosts/maya/plugins/create/create_render.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,8 @@ class CreateRender(plugin.Creator):
'vray': 'vraySettings.fileNamePrefix',
'arnold': 'defaultRenderGlobals.imageFilePrefix',
'renderman': 'rmanGlobals.imageFileFormat',
'redshift': 'defaultRenderGlobals.imageFilePrefix'
'redshift': 'defaultRenderGlobals.imageFilePrefix',
'mayahardware2': 'defaultRenderGlobals.imageFilePrefix',
}

_image_prefixes = {
Expand All @@ -87,7 +88,8 @@ class CreateRender(plugin.Creator):
# this needs `imageOutputDir`
# (<ws>/renders/maya/<scene>) set separately
'renderman': '<layer>_<aov>.<f4>.<ext>',
'redshift': 'maya/<Scene>/<RenderLayer>/<RenderLayer>' # noqa
'redshift': 'maya/<Scene>/<RenderLayer>/<RenderLayer>', # noqa
'mayahardware2': 'maya/<Scene>/<RenderLayer>/<RenderLayer>', # noqa
}

_aov_chars = {
Expand Down
Loading