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

Commit

Permalink
[Automated] Merged develop into main
Browse files Browse the repository at this point in the history
  • Loading branch information
ynbot authored Nov 7, 2023
2 parents bd94b8d + 4bb7c58 commit 0ede108
Show file tree
Hide file tree
Showing 79 changed files with 748 additions and 455 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ body:
label: Version
description: What version are you running? Look to OpenPype Tray
options:
- 3.17.5-nightly.3
- 3.17.5-nightly.2
- 3.17.5-nightly.1
- 3.17.4
Expand Down Expand Up @@ -134,7 +135,6 @@ body:
- 3.15.1-nightly.5
- 3.15.1-nightly.4
- 3.15.1-nightly.3
- 3.15.1-nightly.2
validations:
required: true
- type: dropdown
Expand Down
7 changes: 5 additions & 2 deletions openpype/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,9 @@ def run(script):
"--app_variant",
help="Provide specific app variant for test, empty for latest",
default=None)
@click.option("--app_group",
help="Provide specific app group for test, empty for default",
default=None)
@click.option("-t",
"--timeout",
help="Provide specific timeout value for test case",
Expand All @@ -294,11 +297,11 @@ def run(script):
help="MongoDB for testing.",
default=None)
def runtests(folder, mark, pyargs, test_data_folder, persist, app_variant,
timeout, setup_only, mongo_url):
timeout, setup_only, mongo_url, app_group):
"""Run all automatic tests after proper initialization via start.py"""
PypeCommands().run_tests(folder, mark, pyargs, test_data_folder,
persist, app_variant, timeout, setup_only,
mongo_url)
mongo_url, app_group)


@main.command(help="DEPRECATED - run sync server")
Expand Down
10 changes: 0 additions & 10 deletions openpype/hosts/aftereffects/api/pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,6 @@ def install(self):

register_loader_plugin_path(LOAD_PATH)
register_creator_plugin_path(CREATE_PATH)
log.info(PUBLISH_PATH)

pyblish.api.register_callback(
"instanceToggled", on_pyblish_instance_toggled
)

register_event_callback("application.launched", application_launch)

Expand Down Expand Up @@ -186,11 +181,6 @@ def application_launch():
check_inventory()


def on_pyblish_instance_toggled(instance, old_value, new_value):
"""Toggle layer visibility on instance toggles."""
instance[0].Visible = new_value


def ls():
"""Yields containers from active AfterEffects document.
Expand Down
7 changes: 4 additions & 3 deletions openpype/hosts/houdini/api/creator_node_shelves.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ def install():
os.remove(filepath)

icon = get_openpype_icon_filepath()
tab_menu_label = os.environ.get("AVALON_LABEL") or "AYON"

# Create context only to get creator plugins, so we don't reset and only
# populate what we need to retrieve the list of creator plugins
Expand All @@ -197,14 +198,14 @@ def install():
if not network_categories:
continue

key = "openpype_create.{}".format(identifier)
key = "ayon_create.{}".format(identifier)
log.debug(f"Registering {key}")
script = CREATE_SCRIPT.format(identifier=identifier)
data = {
"script": script,
"language": hou.scriptLanguage.Python,
"icon": icon,
"help": "Create OpenPype publish instance for {}".format(
"help": "Create Ayon publish instance for {}".format(
creator.label
),
"help_url": None,
Expand All @@ -213,7 +214,7 @@ def install():
"cop_viewer_categories": [],
"network_op_type": None,
"viewer_op_type": None,
"locations": ["OpenPype"]
"locations": [tab_menu_label]
}
label = "Create {}".format(creator.label)
tool = hou.shelves.tool(key)
Expand Down
22 changes: 7 additions & 15 deletions openpype/hosts/houdini/api/lib.py
Original file line number Diff line number Diff line change
Expand Up @@ -569,30 +569,27 @@ def get_template_from_value(key, value):
return parm


def get_frame_data(node, handle_start=0, handle_end=0, log=None):
"""Get the frame data: start frame, end frame, steps,
start frame with start handle and end frame with end handle.
def get_frame_data(node, log=None):
"""Get the frame data: `frameStartHandle`, `frameEndHandle`
and `byFrameStep`.
This function uses Houdini node's `trange`, `t1, `t2` and `t3`
parameters as the source of truth for the full inclusive frame
range to render, as such these are considered as the frame
range including the handles.
The non-inclusive frame start and frame end without handles
are computed by subtracting the handles from the inclusive
can be computed by subtracting the handles from the inclusive
frame range.
Args:
node (hou.Node): ROP node to retrieve frame range from,
the frame range is assumed to be the frame range
*including* the start and end handles.
handle_start (int): Start handles.
handle_end (int): End handles.
log (logging.Logger): Logger to log to.
Returns:
dict: frame data for start, end, steps,
start with handle and end with handle
dict: frame data for `frameStartHandle`, `frameEndHandle`
and `byFrameStep`.
"""

Expand Down Expand Up @@ -623,11 +620,6 @@ def get_frame_data(node, handle_start=0, handle_end=0, log=None):
data["frameEndHandle"] = int(node.evalParm("f2"))
data["byFrameStep"] = node.evalParm("f3")

data["handleStart"] = handle_start
data["handleEnd"] = handle_end
data["frameStart"] = data["frameStartHandle"] + data["handleStart"]
data["frameEnd"] = data["frameEndHandle"] - data["handleEnd"]

return data


Expand Down Expand Up @@ -1018,7 +1010,7 @@ def self_publish():
def add_self_publish_button(node):
"""Adds a self publish button to the rop node."""

label = os.environ.get("AVALON_LABEL") or "OpenPype"
label = os.environ.get("AVALON_LABEL") or "AYON"

button_parm = hou.ButtonParmTemplate(
"ayon_self_publish",
Expand Down
56 changes: 0 additions & 56 deletions openpype/hosts/houdini/api/pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import os
import sys
import logging
import contextlib

import hou # noqa

Expand Down Expand Up @@ -66,10 +65,6 @@ def install(self):
register_event_callback("open", on_open)
register_event_callback("new", on_new)

pyblish.api.register_callback(
"instanceToggled", on_pyblish_instance_toggled
)

self._has_been_setup = True
# add houdini vendor packages
hou_pythonpath = os.path.join(HOUDINI_HOST_DIR, "vendor")
Expand Down Expand Up @@ -406,54 +401,3 @@ def _set_context_settings():

lib.reset_framerange()
lib.update_houdini_vars_context()


def on_pyblish_instance_toggled(instance, new_value, old_value):
"""Toggle saver tool passthrough states on instance toggles."""
@contextlib.contextmanager
def main_take(no_update=True):
"""Enter root take during context"""
original_take = hou.takes.currentTake()
original_update_mode = hou.updateModeSetting()
root = hou.takes.rootTake()
has_changed = False
try:
if original_take != root:
has_changed = True
if no_update:
hou.setUpdateMode(hou.updateMode.Manual)
hou.takes.setCurrentTake(root)
yield
finally:
if has_changed:
if no_update:
hou.setUpdateMode(original_update_mode)
hou.takes.setCurrentTake(original_take)

if not instance.data.get("_allowToggleBypass", True):
return

nodes = instance[:]
if not nodes:
return

# Assume instance node is first node
instance_node = nodes[0]

if not hasattr(instance_node, "isBypassed"):
# Likely not a node that can actually be bypassed
log.debug("Can't bypass node: %s", instance_node.path())
return

if instance_node.isBypassed() != (not old_value):
print("%s old bypass state didn't match old instance state, "
"updating anyway.." % instance_node.path())

try:
# Go into the main take, because when in another take changing
# the bypass state of a note cannot be done due to it being locked
# by default.
with main_take(no_update=True):
instance_node.bypass(not new_value)
except hou.PermissionError as exc:
log.warning("%s - %s", instance_node.path(), exc)
8 changes: 7 additions & 1 deletion openpype/hosts/houdini/plugins/create/create_bgeo.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from openpype.hosts.houdini.api import plugin
from openpype.pipeline import CreatedInstance, CreatorError
from openpype.lib import EnumDef
import hou


class CreateBGEO(plugin.HoudiniCreator):
Expand All @@ -13,7 +14,6 @@ class CreateBGEO(plugin.HoudiniCreator):
icon = "gears"

def create(self, subset_name, instance_data, pre_create_data):
import hou

instance_data.pop("active", None)

Expand Down Expand Up @@ -90,3 +90,9 @@ def get_pre_create_attr_defs(self):
return attrs + [
EnumDef("bgeo_type", bgeo_enum, label="BGEO Options"),
]

def get_network_categories(self):
return [
hou.ropNodeTypeCategory(),
hou.sopNodeTypeCategory()
]
5 changes: 5 additions & 0 deletions openpype/hosts/houdini/plugins/create/create_composite.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,11 @@ def create(self, subset_name, instance_data, pre_create_data):

instance_node.setParms(parms)

# Manually set f1 & f2 to $FSTART and $FEND respectively
# to match other Houdini nodes default.
instance_node.parm("f1").setExpression("$FSTART")
instance_node.parm("f2").setExpression("$FEND")

# Lock any parameters in this list
to_lock = ["prim_to_detail_pattern"]
self.lock_parameters(instance_node, to_lock)
Expand Down
7 changes: 6 additions & 1 deletion openpype/hosts/houdini/plugins/create/create_hda.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
get_subsets,
)
from openpype.hosts.houdini.api import plugin
import hou


class CreateHDA(plugin.HoudiniCreator):
Expand Down Expand Up @@ -35,7 +36,6 @@ def _check_existing(self, subset_name):

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

parent_node = hou.node("/obj")
if self.selected_nodes:
Expand Down Expand Up @@ -81,3 +81,8 @@ def create(self, subset_name, instance_data, pre_create_data):
pre_create_data) # type: plugin.CreatedInstance

return instance

def get_network_categories(self):
return [
hou.objNodeTypeCategory()
]
12 changes: 9 additions & 3 deletions openpype/hosts/houdini/plugins/create/create_redshift_proxy.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
"""Creator plugin for creating Redshift proxies."""
from openpype.hosts.houdini.api import plugin
from openpype.pipeline import CreatedInstance
import hou


class CreateRedshiftProxy(plugin.HoudiniCreator):
Expand All @@ -12,7 +12,7 @@ class CreateRedshiftProxy(plugin.HoudiniCreator):
icon = "magic"

def create(self, subset_name, instance_data, pre_create_data):
import hou # noqa

# Remove the active, we are checking the bypass flag of the nodes
instance_data.pop("active", None)

Expand All @@ -28,7 +28,7 @@ def create(self, subset_name, instance_data, pre_create_data):
instance = super(CreateRedshiftProxy, self).create(
subset_name,
instance_data,
pre_create_data) # type: CreatedInstance
pre_create_data)

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

Expand All @@ -44,3 +44,9 @@ def create(self, subset_name, instance_data, pre_create_data):
# Lock some Avalon attributes
to_lock = ["family", "id", "prim_to_detail_pattern"]
self.lock_parameters(instance_node, to_lock)

def get_network_categories(self):
return [
hou.ropNodeTypeCategory(),
hou.sopNodeTypeCategory()
]
1 change: 1 addition & 0 deletions openpype/hosts/houdini/plugins/create/create_staticmesh.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ def create(self, subset_name, instance_data, pre_create_data):
def get_network_categories(self):
return [
hou.ropNodeTypeCategory(),
hou.objNodeTypeCategory(),
hou.sopNodeTypeCategory()
]

Expand Down
1 change: 1 addition & 0 deletions openpype/hosts/houdini/plugins/create/create_vbd_cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ def create(self, subset_name, instance_data, pre_create_data):
def get_network_categories(self):
return [
hou.ropNodeTypeCategory(),
hou.objNodeTypeCategory(),
hou.sopNodeTypeCategory()
]

Expand Down
3 changes: 2 additions & 1 deletion openpype/hosts/houdini/plugins/load/load_image.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,8 @@ def remove(self, container):
if not parent.children():
parent.destroy()

def _get_file_sequence(self, root):
def _get_file_sequence(self, file_path):
root = os.path.dirname(file_path)
files = sorted(os.listdir(root))

first_fname = files[0]
Expand Down
4 changes: 2 additions & 2 deletions openpype/hosts/houdini/plugins/publish/collect_arnold_rop.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ class CollectArnoldROPRenderProducts(pyblish.api.InstancePlugin):

label = "Arnold ROP Render Products"
# This specific order value is used so that
# this plugin runs after CollectRopFrameRange
order = pyblish.api.CollectorOrder + 0.4999
# this plugin runs after CollectFrames
order = pyblish.api.CollectorOrder + 0.11
hosts = ["houdini"]
families = ["arnold_rop"]

Expand Down
Loading

0 comments on commit 0ede108

Please sign in to comment.