Maya cmds pymel scriptJob() 和 undoInfo() 在回调中撤销(undo)
Maya cmds pymel scriptJob() 和 undoInfo() 在回调中撤销(undo)
def myEventFun():
cmds.undoInfo(stateWithoutFlush = 0)
# your code
pass
cmds.undoInfo(stateWithoutFlush = 1)
cmds.scriptJob(event = ['SelectionChanged', myEventFun], killWithScene = 1)
stateWithoutFlush 的意思是把 undo 关掉,但是还保留之前的序列
这样就可以 CTRL + Z 直接把回调中的所有步骤一次撤销
Maya cmds pymel scriptJob() 和 undoInfo() 在回调中撤销(undo)的更多相关文章
- maya cmds pymel undoInfo chunk 撤销束
maya cmds pymel undoInfo chunk 撤销束 cmds.undoInfo(openChunk = 1) # your code cmds.undoInfo(closeChunk ...
- maya cmds pymel 选择 uv area(uv 面积) 为0 的面
maya cmds pymel 选择 uv area(uv 面积) 为0 的面 cmds.selectType( pf=True ) cmds.polySelectConstraint( m=3, t ...
- maya cmds pymel selectType() 选择类型切换
maya cmds pymel selectType() 选择类型切换 import maya.cmds as cmds cmds.selectType( polymeshFace = True ) ...
- maya cmds pymel 'ESC' 退出 while, for 循环
maya cmds pymel 'ESC' 退出 while, for 循环 import maya.cmds as cmds cmds.progressWindow(isInterruptable= ...
- maya cmds pymel polyEvaluate 获取 bounding box
maya cmds pymel polyEvaluate 获取 bounding box cmds.polyEvaluate(bc = 1) #模型 cmds.polyEvaluate(bc2 = ...
- Maya cmds pymel 获取安装选择顺序选择的物体
Maya cmds pymel 获取安装选择顺序选择的物体 import maya.cmds as cmds 先设置选择顺序 cmds.selectPref(trackSelectionOrder = ...
- Maya cmds pymel 单位和轴向设置
Maya cmds pymel 单位和轴向设置 import maya.cmds as cmds # 1. to make the Y-axis of the world to be the up a ...
- Maya cmds pymel 快速选择hard edges(硬边)
Maya cmds pymel 快速选择hard edges(硬边) import maya.cmds as cmds cmds.polySelectConstraint(m = 3, t = 0x8 ...
- Maya cmds filterExpand 列出 选择的 uvs vertices faces edges 等 component 类型
Maya cmds filterExpand 列出 选择的 uvs vertices faces edges 等 component 类型 cmds.ls() 的 flags 中没有指明 uvs 等这 ...
随机推荐
- Thinkphp5.1 ORM UML
Thinkphp5.1 ORM UML think-orm
- (字符串 数组 递归 双指针) leetcode 344. Reverse String
Write a function that reverses a string. The input string is given as an array of characters char[]. ...
- NOI-OJ 2.2 ID:6261 汉诺塔
思路 汉诺塔是递归思想最经典的例子,通过递归不断缩小问题,将n个盘子的问题简化n-1个,直至1个. 三个盘子,分别为A:from,B:to,C:by(A为起点盘,B为目标盘,C为中转盘) 过程 将1- ...
- [再寄小读者之数学篇](2014-06-23 Gronwall-type inequality)
Suppose that $$\bex \cfrac{\rd f}{\rd t}+h\leq gf\quad (f,g,h\geq 0,\ t\in [0,T]). \eex$$ Then for $ ...
- POJ 2398 Toy Storage(叉积+二分)
Description Mom and dad have a problem: their child, Reza, never puts his toys away when he is finis ...
- python 进程、线程与协程的区别
进程.线程与协程区别总结 - 1.进程是计算器最小资源分配单位 - 2.线程是CPU调度的最小单位 - 3.进程切换需要的资源很最大,效率很低 - 4.线程切换需要的资源一般,效率一般(当然了在不考虑 ...
- 【转】Python3 操作符重载方法
Python3 操作符重载方法 本文由 Luzhuo 编写,转发请保留该信息. 原文: http://blog.csdn.net/Rozol/article/details/70769628 以下代码 ...
- 墨水屏 E-Paper module【转】
转自:https://blog.csdn.net/smallmount123/article/details/77489196 https://www.digikey.com/product-deta ...
- JMeter学习笔记01-安装环境
记录关于JMeter学习的内容.方便复习. 1)JMeter运行环境 因为JMeter是用纯java写的.所以运行的时候需要java的运行环境. 去java官网下载,点免费下载或所有Java下载都行, ...
- codeforces 787D - Legacy 线段树优化建图,最短路
题意: 有n个点,q个询问, 每次询问有一种操作. 操作1:u→[l,r](即u到l,l+1,l+2,...,r距离均为w)的距离为w: 操作2:[l,r]→u的距离为w 操作3:u到v的距离为w 最 ...