-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use render targets in a similar fashion to Nuke + set houdini parms a…
…ccording to render target value
- Loading branch information
1 parent
c7e0821
commit bcb1c2a
Showing
8 changed files
with
128 additions
and
96 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
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
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
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
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
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 |
---|---|---|
|
@@ -16,12 +16,40 @@ class CollectFarmInstances(pyblish.api.InstancePlugin): | |
label = "Collect farm instances" | ||
|
||
def process(self, instance): | ||
import hou | ||
|
||
creator_attribute = instance.data["creator_attributes"] | ||
farm_enabled = creator_attribute["farm"] | ||
instance.data["farm"] = farm_enabled | ||
if not farm_enabled: | ||
product_type = instance.data["productType"] | ||
rop_node = hou.node(instance.data.get("instance_node")) | ||
|
||
# Align split parameter value on rop node to the render target. | ||
This comment has been minimized.
Sorry, something went wrong.
BigRoy
Collaborator
|
||
if creator_attribute.get("render_target") == "farm_split": | ||
if product_type == "arnold_rop": | ||
rop_node.setParms({"ar_ass_export_enable": 1}) | ||
elif product_type == "mantra_rop": | ||
rop_node.setParms({"soho_outputmode": 1}) | ||
elif product_type == "redshift_rop": | ||
rop_node.setParms({"RS_archive_enable": 1}) | ||
elif product_type == "vray_rop": | ||
rop_node.setParms({"render_export_mode": "2"}) | ||
else: | ||
if product_type == "arnold_rop": | ||
rop_node.setParms({"ar_ass_export_enable": 0}) | ||
elif product_type == "mantra_rop": | ||
rop_node.setParms({"soho_outputmode": 0}) | ||
elif product_type == "redshift_rop": | ||
rop_node.setParms({"RS_archive_enable": 0}) | ||
elif product_type == "vray_rop": | ||
rop_node.setParms({"render_export_mode": "1"}) | ||
|
||
# Collect Render Target | ||
if creator_attribute.get("render_target") not in { | ||
"farm_split", "farm" | ||
}: | ||
instance.data["farm"] = False | ||
self.log.debug("Render on farm is disabled. " | ||
"Skipping farm collecting.") | ||
return | ||
|
||
instance.data["farm"] = True | ||
instance.data["families"].append("render.farm.hou") |
Oops, something went wrong.
Can we for consistency stick with the same keys as used in Nuke and Fusion, so
local_no_render
would beframes
.frames
isn't necessarily a better key - I agree. But there's something to argue for consistency across all applications ;) especially if a render target might also influence how e.g. other plug-ins (e.g. deadline) wants to behave.ayon-core/client/ayon_core/hosts/nuke/api/plugin.py
Lines 329 to 336 in 85e5854
ayon-core/client/ayon_core/hosts/fusion/api/plugin.py
Lines 223 to 229 in 98bed9f
Also note how there it's abstracted to a base creator plug-in instead of duplicated code across all render creators. I'd recommend that here too.