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
# float | |
p = hou.FloatParmTemplate("float1", "Float 1", 1) | |
# button | |
p = hou.ButtonParmTemplate( | |
"btn1", | |
"Button 1", | |
script_callback='print("Hello World!")', | |
script_callback_language=hou.scriptLanguage.Python | |
), |
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
# define new folder | |
f = hou.FolderParmTemplate("myFolder", "My Folder") | |
# define new simple folder (no tab) | |
f = hou.FolderParmTemplate("myFolder", "My Folder", folder_type=hou.folderType.Simple) | |
# add parameter at bottom of folder | |
f.addParmTemplate(p) | |
# remove item from folder (same as for group) |
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
# cd to folder in Terminal, then run script using python. | |
import os | |
def createFolder(folder): | |
try: | |
if not os.path.exists(folder): | |
os.makedirs(folder) | |
except OSError: | |
print ('Error creating folder: ' + folder) |
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
# cd to folder in Terminal, then run script. | |
import os | |
def createFolder(folder): | |
try: | |
if not os.path.exists(folder): | |
os.makedirs(folder) | |
except OSError: | |
print ('Error creating folder: ' + folder) |
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
import os | |
def createFolder(folder): | |
try: | |
if not os.path.exists(folder): | |
os.makedirs(folder) | |
except OSError: | |
print('Error creating folder: ' + folder) | |
createFolder('My New Folder') |
NewerOlder