Posts

Showing posts from March, 2019

i3d: Rebuildng a hierarchy from .anim file

I experieced that .anim files are no longer usable if the controller rigs used to do animExport has been hierarchically changed. So, I wrote codes to read .anim file context and extract all node names and hierarchy info to rebuild using transform nodes in Maya. The second command includes copy/paste functionality. Select a top node of hierarchy you want to import animations to and execute the command. Usage: A dialog window will show up when excuting below command. Specify a .anim file you saved using animImportExport. It will rebuild an entire hierarchy with transform nodes from the anim file. Command: import i3d,i3d_anim; i3d_anim .animImpExp().imp(); import i3d,i3d_anim;i3d_anim.animImpExp().main(); # The second Prerequisites: Download i3d pyc files. https://ironthreed.blogspot.com/2019/02/i3d-2019-version-i3d-python-script-files.html

Python: Show by type in active modelPanel

# Show by type in active modelPanel def _modelEditor():     import maya.cmds as mc;     mod = mc.getModifiers();     val = 1;     if mod: val = 0;     aPnl = mc.getPanel(wf=1);     mPnl = "modelPanel";     num = len(mPnl);     if len(aPnl)>=num and aPnl[0:num]==mPnl:         attrs = [             "controllers",             "nurbsCurves",             "nurbsSurfaces",             "cv",             "hulls",             "polymeshes",             "subdivSurfaces",             "planes",             "lights",             "cameras",             "ima...

i3d: Open current folder in explorer

i3d: Open current folder in explorer Open a current folder in windows explorer. Command: import i3d;from i3d_utility import windowsOps as iWO;iWO().openExplorer("currentDir"); Prerequisites: Download i3d pyc files.

i3d: Quick Save

i3d: Quick Save Handy quick saving scene command Command: import i3d;from i3d_utility import quickSave as qS;qS().sequantial(1,3,""); Input Arguments: int1, int2, string int1: This number will be added when current scene does not have a number at the end of its name. int2: Digit when adding a number. string: string can be added before a new number Example1: Your current scene file is "test_maya_file.mb". Execute  import i3d;from i3d_utility import quickSave as qS;qS().sequantial(4,3,"_"); in python script editor. This will save current scene as " test_maya_file _004 .mb". Example2: Your current scene file is now "test_maya_file_004.mb". Execute  import i3d;from i3d_utility import quickSave as qS;qS().sequantial(4,3,"_");  in python script editor. This time, it will save current scene as  " test_maya_file _005 .mb". When the current scene has number at the end of its name, it ignores all input ...