Testing embedded python code & gist
Test post with embedded code & gist. Embed python code:
import random
import pymel.core as pm
# Create new shader
shader, shadingGrp = pm.createSurfaceShader('lambert', name='my_material')
# Randomize color
shader.setColor([random.random(), random.random(), random.random()])
# Assign new shader to selected object
pm.sets(shadingGrp, forceElement=pm.selected())
Embed Gist test:
Maya python script for doing cube reset on selected object