Posts

Showing posts from April, 2019

OpenMaya api2.0

OpenMaya api2.0 # Object alignment def alignObjects():     import maya.cmds as mc;     sel= mc.ls(sl=1,l=1);     num= len(sel);     if num>1:         import maya.api.OpenMaya as om2;         mat= om2.MMatrix(mc.getAttr(sel[num-1]+".matrix"));         for i in range(0,num-1):mc.xform(sel[i],matrix=tuple(mat)); # Selection, node name import maya.api.OpenMaya as om2; sel= om2.MGlobal.getActiveSelectionList(); num= sel.length(); for i in range(0,num):     dNode= sel.getDependNode(i);     MFnDNode= om2.MFnDependencyNode( dNode );     print MFnDNode.name();

Maya GUI Tool: Change manipulator's Move/Rotate context window

Image
Command: import i3d,i3d_GUI as iG;iG.manip().GUI("iG"); Prerequisites: Download i3d pyc files. https://ironthreed.blogspot.com/2019/02/i3d-2019-version-i3d-python-script-files.html

i3d: list of classes and functions

19.05.24 #i3d_anim.pyc i3d_anim.py # getAttrValsAsText(attrs,nodes): # deleteAnim(attrs,mod): #posing: # savePose(self,attrs,fldrName, fileName, key, mod): # loadPose(self,fldrName, fileName, key, mod): #keyBake: # doBake(self,bakes): #animImpExp: # loadPlugin(self,pluginName): # imp(self): # rebuildHierarchyFromAnimFile(self,animFile): # getChilds(self,nodes,top): # main(self): #FBX: # findItem(self,topFldr,fldr): # getMayaFiles(self,fldr): # getContext(self,textfile): # bakeAndExport(self,context,mayafiles,fldr,fbxfldrname): # logmessege(self,st,et,elt,results): # batchExport(self,topFldrName): #scaleAnimCurveKeys(): # filterDoScale(self,F1,F2,F3): # updateGUI(self,uiObj): # initWin(self,winObj): # doScale(self,sf,f1,f2): # GUI(self,cmdStr): #i3d_GUI.pyc #printout: # context(self): #common: # initWindow(self,winObjName): # initWinColumn(self,winObjName): #spaceLoc: # _exec(self,method,locSizeUI,cbUI): # updatei3dPref(self,iF1): # changeLocSize(self,iF1,v): # GUI...

i3d: FBX Batch Exporter

Batch command to export FBX(.fbx) files from Maya(.ma,.mb) files in a folder. Specified nodes and attributes will be baked. Top node(s) of hierarchy of those baked nodes will be selected when exporting. Usage: In a folder, place all Maya files(.ma or .mb). Also place bake.txt in this folder. This folder need to be in your Documents folder. (Windows only) It should look like this(Windows only): \Users\Documents\foldername\ Sample: bake.txt   (this case, HIK bones and attributes) needs to be in  \Users\Documents\foldername\ FBX files: All FBX files will be exported to foldername\fbx\ folder. Command: import i3d,i3d_anim as iA;iA.FBX().batchExport("foldername"); Prerequisites: Download i3d pyc files. https://ironthreed.blogspot.com/2019/02/i3d-2019-version-i3d-python-script-files.html