Create a gist now

Instantly share code, notes, and snippets.

@fereria /focalLengthSet.py Secret
Last active Aug 29, 2015

Embed
import pymel.core as pm
#FocalLength を10刻みで+する or ー する
selectCam = pm.ls(sl=True)
#増減する量をセット(マイナスにする時は -10)のように値を変更する
inDec = 10
for sel in selectCam:
camNode = sel.getShape()
if pm.objectType(camNode) == "camera":
val = camNode.focalLength.get()
camNode.focalLength.set(val + inDec)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment