Skip to content

Instantly share code, notes, and snippets.

@fereria
Last active August 29, 2015 13:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fereria/b1a48d79ea295d9342d6 to your computer and use it in GitHub Desktop.
Save fereria/b1a48d79ea295d9342d6 to your computer and use it in GitHub Desktop.
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