Skip to content
This repository has been archived by the owner on Sep 20, 2024. It is now read-only.

Commit

Permalink
Merge branch 'develop' into release/3.15.x
Browse files Browse the repository at this point in the history
  • Loading branch information
iLLiCiTiT committed Jan 9, 2023
2 parents 1959a42 + 5dfd92d commit 078c5ff
Show file tree
Hide file tree
Showing 72 changed files with 1,628 additions and 331 deletions.
4 changes: 2 additions & 2 deletions openpype/hosts/hiero/api/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -276,8 +276,8 @@ def populate_widgets(self, data, content_layout=None):
elif v["type"] == "QSpinBox":
data[k]["value"] = self.create_row(
content_layout, "QSpinBox", v["label"],
setRange=(1, 9999999), setValue=v["value"],
setToolTip=tool_tip)
setValue=v["value"], setMinimum=0,
setMaximum=100000, setToolTip=tool_tip)
return data


Expand Down
2 changes: 1 addition & 1 deletion openpype/hosts/hiero/plugins/publish/extract_thumbnail.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def create_thumbnail(self, staging_dir, instance):
track_item_name, thumb_frame, ".png")
thumb_path = os.path.join(staging_dir, thumb_file)

thumbnail = track_item.thumbnail(thumb_frame).save(
thumbnail = track_item.thumbnail(thumb_frame, "colour").save(
thumb_path,
format='png'
)
Expand Down
2 changes: 1 addition & 1 deletion openpype/hosts/houdini/plugins/create/create_hda.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def _check_existing(self, subset_name):
}
return subset_name.lower() in existing_subset_names_low

def _create_instance_node(
def create_instance_node(
self, node_name, parent, node_type="geometry"):
import hou

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def process(self, instance):

# Check bypass state and reverse
active = True
node = hou.node(instance.get("instance_node"))
node = hou.node(instance.data.get("instance_node"))
if hasattr(node, "isBypassed"):
active = not node.isBypassed()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ class CollectRedshiftROPRenderProducts(pyblish.api.InstancePlugin):

def process(self, instance):

rop = hou.node(instance.get("instance_node"))
rop = hou.node(instance.data.get("instance_node"))

# Collect chunkSize
chunk_size_parm = rop.parm("chunkSize")
Expand Down
3 changes: 2 additions & 1 deletion openpype/hosts/houdini/plugins/publish/collect_usd_layers.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def process(self, instance):
self.log.debug("No output node found..")
return

rop_node = hou.node(instance.get("instance_node"))
rop_node = hou.node(instance.data["instance_node"])

save_layers = []
for layer in usdlib.get_configured_save_layers(rop_node):
Expand Down Expand Up @@ -56,6 +56,7 @@ def process(self, instance):
layer_inst.data["subset"] = "__stub__"
layer_inst.data["label"] = label
layer_inst.data["asset"] = instance.data["asset"]
layer_inst.data["instance_node"] = instance.data["instance_node"]
# include same USD ROP
layer_inst.append(rop_node)
# include layer data
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class ExtractRedshiftProxy(publish.Extractor):

def process(self, instance):

ropnode = hou.node(instance.get("instance_node"))
ropnode = hou.node(instance.data.get("instance_node"))

# Get the filename from the filename parameter
# `.evalParm(parameter)` will make sure all tokens are resolved
Expand Down
2 changes: 1 addition & 1 deletion openpype/hosts/houdini/plugins/publish/extract_usd.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class ExtractUSD(publish.Extractor):

def process(self, instance):

ropnode = hou.node(instance.get("instance_node"))
ropnode = hou.node(instance.data.get("instance_node"))

# Get the filename from the filename parameter
output = ropnode.evalParm("lopoutput")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ def process(self, instance):

# Main ROP node, either a USD Rop or ROP network with
# multiple USD ROPs
node = hou.node(instance.get("instance_node"))
node = hou.node(instance.data["instance_node"])

# Collect any output dependencies that have not been processed yet
# during extraction of other instances
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class ExtractVDBCache(publish.Extractor):

def process(self, instance):

ropnode = hou.node(instance.get("instance_node"))
ropnode = hou.node(instance.data["instance_node"])

# Get the filename from the filename parameter
# `.evalParm(parameter)` will make sure all tokens are resolved
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,7 @@ def process(self, instance):
@classmethod
def get_invalid(cls, instance):

node = hou.node(instance.get("instance_node"))

node = hou.node(instance.data["instance_node"])
# Check trange parm, 0 means Render Current Frame
frame_range = node.evalParm("trange")
if frame_range == 0:
Expand Down
2 changes: 1 addition & 1 deletion openpype/hosts/houdini/plugins/publish/validate_bypass.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,6 @@ def process(self, instance):
@classmethod
def get_invalid(cls, instance):

rop = hou.node(instance.get("instance_node"))
rop = hou.node(instance.data["instance_node"])
if hasattr(rop, "isBypassed") and rop.isBypassed():
return [rop]
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def get_invalid(cls, instance):
)

if output_node is None:
node = hou.node(instance.get("instance_node"))
node = hou.node(instance.data.get("instance_node"))
cls.log.error(
"COP Output node in '%s' does not exist. "
"Ensure a valid COP output path is set." % node.path()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,7 @@ def process(self, instance):
@classmethod
def get_invalid(cls, instance):

node = hou.node(instance.get("instance_node"))

node = hou.node(instance.data["instance_node"])
# Check trange parm, 0 means Render Current Frame
frame_range = node.evalParm("trange")
if frame_range == 0:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def process(self, instance):
validate_nodes = []

if len(instance) > 0:
validate_nodes.append(hou.node(instance.get("instance_node")))
validate_nodes.append(hou.node(instance.data.get("instance_node")))
output_node = instance.data.get("output_node")
if output_node:
validate_nodes.append(output_node)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class ValidateUSDLayerPathBackslashes(pyblish.api.InstancePlugin):

def process(self, instance):

rop = hou.node(instance.get("instance_node"))
rop = hou.node(instance.data.get("instance_node"))
lop_path = hou_usdlib.get_usd_rop_loppath(rop)
stage = lop_path.stage(apply_viewport_overrides=False)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class ValidateUsdModel(pyblish.api.InstancePlugin):

def process(self, instance):

rop = hou.node(instance.get("instance_node"))
rop = hou.node(instance.data.get("instance_node"))
lop_path = hou_usdlib.get_usd_rop_loppath(rop)
stage = lop_path.stage(apply_viewport_overrides=False)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def get_invalid(cls, instance):
output_node = instance.data["output_node"]

if output_node is None:
node = hou.node(instance.get("instance_node"))
node = hou.node(instance.data.get("instance_node"))
cls.log.error(
"USD node '%s' LOP path does not exist. "
"Ensure a valid LOP path is set." % node.path()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def process(self, instance):
from pxr import UsdGeom
import hou

rop = hou.node(instance.get("instance_node"))
rop = hou.node(instance.data.get("instance_node"))
lop_path = hou_usdlib.get_usd_rop_loppath(rop)
stage = lop_path.stage(apply_viewport_overrides=False)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class ValidateUsdShadeWorkspace(pyblish.api.InstancePlugin):

def process(self, instance):

rop = hou.node(instance.get("instance_node"))
rop = hou.node(instance.data.get("instance_node"))
workspace = rop.parent()

definition = workspace.type().definition()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def get_invalid(cls, instance):
if node is None:
cls.log.error(
"SOP path is not correctly set on "
"ROP node '%s'." % instance.get("instance_node")
"ROP node '%s'." % instance.data.get("instance_node")
)
return [instance]

Expand Down
4 changes: 2 additions & 2 deletions openpype/hosts/maya/api/workfile_template_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def import_template(self, path):
Args:
path (str): A path to current template (usually given by
get_template_path implementation)
get_template_preset implementation)
Returns:
bool: Wether the template was succesfully imported or not
Expand Down Expand Up @@ -240,7 +240,7 @@ def cleanup_placeholder(self, placeholder, failed):
cmds.setAttr(node + ".hiddenInOutliner", True)

def load_succeed(self, placeholder, container):
self._parent_in_hierarhchy(placeholder, container)
self._parent_in_hierarchy(placeholder, container)

def _parent_in_hierarchy(self, placeholder, container):
"""Parent loaded container to placeholder's parent.
Expand Down
42 changes: 24 additions & 18 deletions openpype/hosts/maya/plugins/create/create_render.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,15 +72,19 @@ class CreateRender(plugin.Creator):
def __init__(self, *args, **kwargs):
"""Constructor."""
super(CreateRender, self).__init__(*args, **kwargs)
deadline_settings = get_system_settings()["modules"]["deadline"]
if not deadline_settings["enabled"]:
self.deadline_servers = {}
return

# Defaults
self._project_settings = get_project_settings(
legacy_io.Session["AVALON_PROJECT"])
if self._project_settings["maya"]["RenderSettings"]["apply_render_settings"]: # noqa
lib_rendersettings.RenderSettings().set_default_renderer_settings()

# Deadline-only
manager = ModulesManager()
deadline_settings = get_system_settings()["modules"]["deadline"]
if not deadline_settings["enabled"]:
self.deadline_servers = {}
return
self.deadline_module = manager.modules_by_name["deadline"]
try:
default_servers = deadline_settings["deadline_urls"]
Expand Down Expand Up @@ -193,8 +197,6 @@ def _create_render_settings(self):
pool_names = []
default_priority = 50

self.server_aliases = list(self.deadline_servers.keys())
self.data["deadlineServers"] = self.server_aliases
self.data["suspendPublishJob"] = False
self.data["review"] = True
self.data["extendFrames"] = False
Expand Down Expand Up @@ -233,6 +235,9 @@ def _create_render_settings(self):
raise RuntimeError("Both Deadline and Muster are enabled")

if deadline_enabled:
self.server_aliases = list(self.deadline_servers.keys())
self.data["deadlineServers"] = self.server_aliases

try:
deadline_url = self.deadline_servers["default"]
except KeyError:
Expand All @@ -254,6 +259,19 @@ def _create_render_settings(self):
default_priority)
self.data["tile_priority"] = tile_priority

pool_setting = (self._project_settings["deadline"]
["publish"]
["CollectDeadlinePools"])
primary_pool = pool_setting["primary_pool"]
self.data["primaryPool"] = self._set_default_pool(pool_names,
primary_pool)
# We add a string "-" to allow the user to not
# set any secondary pools
pool_names = ["-"] + pool_names
secondary_pool = pool_setting["secondary_pool"]
self.data["secondaryPool"] = self._set_default_pool(pool_names,
secondary_pool)

if muster_enabled:
self.log.info(">>> Loading Muster credentials ...")
self._load_credentials()
Expand All @@ -273,18 +291,6 @@ def _create_render_settings(self):
self.log.info(" - pool: {}".format(pool["name"]))
pool_names.append(pool["name"])

pool_setting = (self._project_settings["deadline"]
["publish"]
["CollectDeadlinePools"])
primary_pool = pool_setting["primary_pool"]
self.data["primaryPool"] = self._set_default_pool(pool_names,
primary_pool)
# We add a string "-" to allow the user to not
# set any secondary pools
pool_names = ["-"] + pool_names
secondary_pool = pool_setting["secondary_pool"]
self.data["secondaryPool"] = self._set_default_pool(pool_names,
secondary_pool)
self.options = {"useSelection": False} # Force no content

def _set_default_pool(self, pool_names, pool_value):
Expand Down
Loading

0 comments on commit 078c5ff

Please sign in to comment.