validate_project_editorial_info.py 文件源码

python
阅读 25 收藏 0 点赞 0 评论 0

项目:config 作者: mindbender-studio 项目源码 文件源码
def process(self, context):
        from maya import cmds

        scene_in = cmds.playbackOptions(query=True, animationStartTime=True)
        scene_out = cmds.playbackOptions(query=True, animationEndTime=True)
        scene_fps = {
            "12fps": 12,
            "game": 15,
            "16fps": 16,
            "film": 24,
            "pal": 25,
            "ntsc": 30,
            "show": 48,
            "palf": 50,
            "ntscf": 60}.get(cmds.currentUnit(query=True, time=True))

        if scene_fps is None:
            scene_fps = "a strange "

        env = context.data.get("environment", dict())

        valid_fps = env.get("avalonFps")
        valid_edit_in = env.get("avalonEditIn")
        valid_edit_out = env.get("avalonEditOut")

        skip_on_none = [valid_fps, valid_edit_in, valid_edit_out]

        if None in skip_on_none:
            self.log.debug(" environment not set")
            return

        assert int(valid_fps) == int(scene_fps), (
            "The FPS is set to %sfps and not to %sfps"
            % (scene_fps, valid_fps))

        assert int(scene_in) == int(valid_edit_in), (
            "Animation Start is set to %s and not set to \"%s\""
            % (scene_in, valid_edit_in))

        assert int(scene_out) == int(valid_edit_out), (
            "Animation End is set to %s and not set to \"%s\""
            % (scene_out, valid_edit_out))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号