About maya python commands that cannot be found in the Script Editor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I'm writing a script recently, and the last function involved is the scaling curve. First, you can find that the scaling curve corresponds to the
scaleKeycommand.
Various parameters are also known. You can achieve the effect of scaling the animation curve through the given vs value.
I posted the code:
cmds.scaleKey('', attribute='tz', iub=0, ts=1, tp=0, fs=1, fp=0, vs= ,vp=0)The first quotation mark is the object, and vs is equal to a number, you can scale the curve.
but! The problem is that every time I pass in a value, the curve changes, and the next change is based on the last change. So whether I write the UI externally, create a slider, link the value of the slider to the function, or pass the value to the function, I can’t achieve it. In Maya, press and hold the left mouse button on the zoom curve slider. Drop and drag the effect of the slider.
So I want to know if there is a corresponding command, or other solutions?
最近在写一个脚本,最后涉及一个功能是缩放曲线,首先可以查到缩放曲线是对应ScaleKey这个命令,各种参数也知道了,可以通过给定的vs值,达到对动画曲线进行缩放的效果。
我把代码贴下来:
cmds.scaleKey('', attribute='tz', iub=0, ts=1, tp=0, fs=1, fp=0, vs= ,vp=0)第一个引号是物体, vs等于一个数,就可以对曲线进行缩放。
但是!问题在于,每次我传入一个值,曲线都会发生变化,而且下次变化是基于上次变化的。所以无论我是在外部写了UI,创建滑块,链接滑块的值传入函数,还是传值给函数,都没法达成,在maya里面按住鼠标左键在缩放曲线的滑块上不放,拖动滑块的那个效果。
所以想知道有没有对应的命令,或者其他解决方法?