kiryha Posted July 27, 2018 Share Posted July 27, 2018 How to create a Shaders tab on Geometry SOP with Python (to store material stylesheets)? Quote Link to comment Share on other sites More sharing options...
kiryha Posted July 30, 2018 Author Share Posted July 30, 2018 # Create Material Stylesheet parameter interface # Select Geometry node, run script import hou # Get selected geometry node to create Stylesheet parameter OBJ = hou.selectedNodes()[0] # Define tags dataTags = {'script_action_icon':'DATATYPES_stylesheet', 'script_action_help':'Open in Material Style Sheet editor.', 'spare_category':'Shaders', 'script_action':"import toolutils\np = toolutils.dataTree('Material Style Sheets')\np.setCurrentPath(kwargs['node'].path() + '/Style Sheet Parameter')", 'editor':'1'} # Create parameter interface group = OBJ.parmTemplateGroup() folder = hou.FolderParmTemplate('folder', 'Shaders') folder.addParmTemplate(hou.StringParmTemplate('shop_materialstylesheet', 'Material Style Sheet', 1, tags = dataTags)) group.append(folder) OBJ.setParmTemplateGroup(group) Thanks to Houdini Tricks! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.