Posts

Showing posts from May, 2019

Maya GUI Tool: Scale animCurve Keys

Image
GUI: Scale animCurve Keys GUI tool to stretch out or shrink specified range of animCurve keys. Start: Enter first frame of the scaling range. End: Enter last frame of the scaling range. New end: Enter a new end frame. Scale button: Enable scaling. If nothing selected, all animCurve keys in the scene will be scaled. Before the stretch(scaling) 22 in Start, 55 in End and 100 in New end. Then press Scale button. After the stretch(scaling) 22-55 is now stretched out to 22-100. Prerequisites: Download i3d pyc files. https://ironthreed.blogspot.com/2019/02/i3d-2019-version-i3d-python-script-files.html Python command: import i3d,i3d_anim as iA;iA.scaleAnimCurveKeys().GUI("iA");

Python: Refreshing window function

# Refresh window function. class initWindow:     def create(self,winObj):         import maya.cmds as mc;         if mc.window(winObj,ex=1):mc.deleteUI(winObj);         WIN= mc.window(winObj);         return( WIN );     def main(self,winObj,title,wd,hg,vis):         import maya.cmds as mc;         WIN= self.create(winObj);         mc.window(WIN,e=1,w=wd,h=hg,t=title);         if vis:mc.showWindow(WIN);         return( WIN ); # Sample code. windowObject= "testWindow"; windowTitle= "Empty Window"; width= 400; height= 100; windowVisibility= True; WIN= initWindow().main(windowObject,windowTitle,width,height,windowVisibility);