Merge pull request #4236 from pypeclub/bugfix/houdini-publisher-fixes

This commit is contained in:
Ondřej Samohel 2022-12-22 13:35:56 +01:00 committed by GitHub
commit c34359e416
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
19 changed files with 20 additions and 21 deletions

View file

@ -34,7 +34,7 @@ class CreateHDA(plugin.HoudiniCreator):
}
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

View file

@ -25,7 +25,7 @@ class CollectInstanceActiveState(pyblish.api.InstancePlugin):
# 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()

View file

@ -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")

View file

@ -21,7 +21,7 @@ class CollectUsdLayers(pyblish.api.InstancePlugin):
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):
@ -56,6 +56,7 @@ class CollectUsdLayers(pyblish.api.InstancePlugin):
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

View file

@ -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

View file

@ -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")

View file

@ -187,7 +187,7 @@ class ExtractUSDLayered(publish.Extractor):
# 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

View file

@ -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

View file

@ -37,8 +37,7 @@ class ValidateAnimationSettings(pyblish.api.InstancePlugin):
@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:

View file

@ -37,6 +37,6 @@ class ValidateBypassed(pyblish.api.InstancePlugin):
@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]

View file

@ -48,7 +48,7 @@ class ValidateCopOutputNode(pyblish.api.InstancePlugin):
)
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()

View file

@ -37,8 +37,7 @@ class ValidateFrameToken(pyblish.api.InstancePlugin):
@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:

View file

@ -38,7 +38,7 @@ class ValidateNoErrors(pyblish.api.InstancePlugin):
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)

View file

@ -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)

View file

@ -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)

View file

@ -36,7 +36,7 @@ class ValidateUSDOutputNode(pyblish.api.InstancePlugin):
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()

View file

@ -24,7 +24,7 @@ class ValidateUsdSetDress(pyblish.api.InstancePlugin):
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)

View file

@ -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()

View file

@ -38,7 +38,7 @@ class ValidateVDBOutputNode(pyblish.api.InstancePlugin):
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]