Skip to content

Instantly share code, notes, and snippets.

View AndresMWeber's full-sized avatar
💭
Katas for Life!

Andres Weber AndresMWeber

💭
Katas for Life!
View GitHub Profile
@AndresMWeber
AndresMWeber / automation.md
Created June 17, 2016 19:55 — forked from cube-drone/automation.md
Automation For The People

Automation for the People

Long ago, the first time I read "The Pragmatic Programmer", I read some advice that really stuck with me.

"Don't Use Manual Procedures".

This in the chapter on Ubiquitous Automation. To summarize, they want you to automate all the things.

The trouble was that I hadn't much of an idea how to actually go

@AndresMWeber
AndresMWeber / set_all_aovIds.py
Last active January 20, 2017 21:30 — forked from anonymous/set_shader_attribute.py
Set all shader attributes to a new prefixed and indexed string
import pymel.core as pm
def set_all_aovIds(value, targets=None, object_type='alSurface', padding=2, attr_basename='aovId', number_of_indexes=8, use_selection=True):
if not targets:
targets = pm.ls(type=object_type, sl=use_selection)
for target in targets:
for index in range(1, number_of_indexes+1):
try:
new_value = '%s_%{PAD}d'.format(PAD='0' + str(padding)) % (value, index)