maya 判断相机是否移动

import maya.cmds as cmds
        
def if_camera(*args) :
    modernCam=modelPanel("modelPanel4", q=1, cam=1)
    keyedCount = cmds.keyframe(modernCam, query=True, keyframeCount=True)
    if keyedCount > 2:
        print ('yes')
   
    else:
        print ('no')
        
    
if_camera()

 

posted @ 2022-04-04 22:19  CGRun  阅读(64)  评论(0编辑  收藏  举报