Skip to content

Instantly share code, notes, and snippets.

View gfxhacks's full-sized avatar

Gfxhacks gfxhacks

View GitHub Profile
# 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
),
# 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)
@gfxhacks
gfxhacks / AfterEffectsTemplate.py
Last active May 14, 2020 17:34
After Effects Project Template. More at: gfxhacks.com/project-folder-templates-in-finder-using-python
# 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)
@gfxhacks
gfxhacks / MotionGraphicsTemplate.py
Last active May 14, 2020 17:34
A complete motion graphics project template, ready to customize... More at: gfxhacks.com/project-folder-templates-in-finder-using-python
# 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)
@gfxhacks
gfxhacks / myProjectTemplate.py
Created May 14, 2020 17:33
Example of how to use at: gfxhacks.com/project-folder-templates-in-finder-using-python
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')