Maya 项目路径设置和查询
作者:互联网
# encoding:utf-8 """ @Author: Meng @software: PyCharm @file: out_ch_bg.py @time: 2023/08/22 20:39 """ import maya.cmds as cmds import pymel.core as pm cmds.workspace(directory='C:/Users/meng/Desktop/cg/wangcai_walk1_lgt/ao') sceneFile = cmds.workspace( q=1, dir=1)#查找当前的工作空间区域 newproject_set = "C:/Users/meng/Desktop/cg/wangcai_walk1_lgt/" pm.mel.setProject(newproject_set)#设置定义工作项目路径 project_set = cmds.workspace(q=1, rd=1)#查找当前工作项目路径 dir_q = str(cmds.file(q=1, sn=1))#查找当前打开的文件完整路径 dirbuffer = [] dirbufferzz = dir_q.split("/")[-1]#过滤出文件场景名称
标签:set,Maya,路径,cmds,查找,workspace,查询,dir 来源: https://www.cnblogs.com/CGRun/p/16626274.html