Last active
June 5, 2023 06:44
-
-
Save attilam/8a64ebfc67eedcfe2a208a6f153a6971 to your computer and use it in GitHub Desktop.
Houdini Shelf Tool to enable the albedo texture of Quixel Bridge RedShift materials in the OGL viewport
This file contains hidden or 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
for node in hou.selectedNodes(): | |
if (node.type().name() != "redshift_vopnet"): continue | |
ptg = node.parmTemplateGroup() | |
folder = ptg.findFolder("RS Mat") | |
if (folder): continue | |
node.layoutChildren() | |
folder = hou.FolderParmTemplate("rs_mat", "RS Mat", folder_type = hou.folderType.Tabs) | |
toggle = hou.ToggleParmTemplate("use_diffuse", "Use Diffuse", tags = {"ogl_use_tex#": "1"}) | |
file = hou.StringParmTemplate("diffuse_tex", "Diffuse", 1, string_type = hou.stringParmType.FileReference, file_type = hou.fileType.Image, tags = {"ogl_tex#": "1"}) | |
toggle.setDefaultValue(True) | |
file.setDefaultValue(("`chs(\"albedo/tex0\")`",)) | |
folder.addParmTemplate(toggle) | |
folder.addParmTemplate(file) | |
ptg.append(folder) | |
node.setParmTemplateGroup(ptg) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment