generated from ynput/ayon-addon-template
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #67 from ynput/enhancement/collect-render-layer-na…
…me-from-rop Render layer name collector
- Loading branch information
Showing
3 changed files
with
93 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
client/ayon_houdini/plugins/publish/collect_renderlayer.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
"""Collect Render layer name from ROP. | ||
This simple collector will take name of the ROP node and set it as the render | ||
layer name for the instance. | ||
This aligns with the behavior of Maya and possibly others, even though there | ||
is nothing like render layer explicitly in Houdini. | ||
""" | ||
import hou | ||
import pyblish.api | ||
from ayon_houdini.api import plugin | ||
|
||
|
||
class CollectRendelayerFromROP(plugin.HoudiniInstancePlugin): | ||
label = "Collect Render layer name from ROP" | ||
order = pyblish.api.CollectorOrder - 0.499 | ||
families = ["mantra_rop", | ||
"karma_rop", | ||
"redshift_rop", | ||
"arnold_rop", | ||
"vray_rop", | ||
"usdrender"] | ||
|
||
def process(self, instance): | ||
rop = hou.node(instance.data.get("instance_node")) | ||
instance.data["renderlayer"] = rop.name() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters